-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
None
Problem
I want to create two tun interfaces and do l3xc. It works fine. Then I want to delete the interfaces and l3xc and create them again.
If the order is:
1. Create tun1, tun2, l3xc
2. Del l3xc, tun2, tun1
3. Create tun1, tun2, l3xc
All is fine.
But if:
1. Create tun1, tun2, l3xc
2. Del tun1, tun2, l3xc
3. Create tun1, tun2, l3xc
L3xc doesn't work after re-creation.
Steps to reproduce
1. Create two netns ns1 and ns2 on the host:
# ip netns add ns1 # ip netns add ns2
2. Create two tun interfaces on vpp and l3xc:
DBGvpp# create tap tun host-ns ns1 DBGvpp# set int state tun0 up DBGvpp# create tap tun host-ns ns2 DBGvpp# set int state tun1 up DBGvpp# l3xc add ip4 tun0 via 10.10.3.1 tun1 DBGvpp# l3xc add ip4 tun1 via 10.10.3.2 tun0
3. Finish setting up interfaces in the target network namespaces:
# ip netns exec ns1 ip link set tun0 up # ip netns exec ns1 ip address add 10.10.3.1/24 dev tun0 # ip netns exec ns2 ip link set tun0 up # ip netns exec ns2 ip address add 10.10.3.2/24 dev tun0
4. Ping works fine:
# ip netns exec ns1 ping 10.10.3.2 PING 10.10.3.2 (10.10.3.2) 56(84) bytes of data. 64 bytes from 10.10.3.2: icmp_seq=1 ttl=63 time=0.158 ms 64 bytes from 10.10.3.2: icmp_seq=2 ttl=63 time=0.794 ms 64 bytes from 10.10.3.2: icmp_seq=3 ttl=63 time=0.093 ms ...
5. Delete tun interfaces and l3xc (it's impossible, but still):
DBGvpp# delete tap tun0 DBGvpp# delete tap tun1 DBGvpp# l3xc del ip4 tun0 via 10.10.3.1 tun1 l3xc: unknown input 'tun0 via 10.10.3.1 tun1' DBGvpp# l3xc del ip4 tun1 via 10.10.3.2 tun0 l3xc: unknown input 'tun1 via 10.10.3.2 tun0'
6. Re-create. Do 2-3 steps again
7. Add trace before pinging :
DBGvpp# trace add virtio-input 10
8. Ping is not working:
# ip netns exec ns1 ping 10.10.3.2 PING 10.10.3.2 (10.10.3.2) 56(84) bytes of data. ...
9. Show commands:
DBGvpp# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1
00:06:08:631654: virtio-input
virtio: hw_if_index 2 next-index 1 vring 0 len 84
hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0 csum_offset 0 num_buffers 1
00:06:08:631666: ip4-input
ICMP: 10.10.3.1 -> 10.10.3.2
tos 0x00, ttl 64, length 84, checksum 0xd8f7 dscp CS0 ecn NON_ECN
fragment id 0x479b, flags DONT_FRAGMENT
ICMP echo_request checksum 0xac12 id 41724
00:06:08:631673: ip4-not-enabled
ICMP: 10.10.3.1 -> 10.10.3.2
tos 0x00, ttl 64, length 84, checksum 0xd8f7 dscp CS0 ecn NON_ECN
fragment id 0x479b, flags DONT_FRAGMENT
ICMP echo_request checksum 0xac12 id 41724
00:06:08:631679: error-drop
rx:tun0
00:06:08:631683: drop
null-node: blackholed packets
DBGvpp# show l3xc l3xc:[0]: tun1 path-list:[13] locks:1 flags:shared,no-uRPF, uRPF-list: None path:[13] pl-index:13 ip4 weight=1 pref=0 attached-nexthop: oper-flags:resolved, 10.10.3.2 tun0 (p2p) [@0]: ipv4 via 0.0.0.0 tun0: mtu:9000 next:3 flags:[] [@3]: dpo-drop ip4 l3xc:[1]: tun0 path-list:[14] locks:1 flags:shared,no-uRPF, uRPF-list: None path:[14] pl-index:14 ip4 weight=1 pref=0 attached-nexthop: oper-flags:resolved, 10.10.3.1 tun1 (p2p) [@0]: ipv4 via 0.0.0.0 tun1: mtu:9000 next:4 flags:[] [@3]: dpo-drop ip4
How I can delete l3xc after the interface deletion?
Is it possible to fix the behavior of l3xc on deletion and re-creation?
Thanks!
Additional information
DBGvpp# show version vpp v22.06-rc0~184-g7fc0ee7f6 built by art on art-c at 2022-03-10T05:03:21