Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-2006

L2/L3 cross-connect allows pinging an interface located in a deleted netns

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • None

      Problem:

      I create two tap interfaces in different network namespaces and L2 cross-connect inside a vpp instance. Set up addresses - ping works.
      But, if i delete the target namespace from the host - ping continues to work.
      I've tested it with l2xc/l3xc + tap/tun - the result is the same.
      Moreover, I see the same behavior with af-packet if I configure it via vpp api. But unfortunately I can't reproduce it using vppctl...
      Does anyone have any idea?

      Steps to reproduce:

      l2xc + tap
      1. Create two netns vpp1 and vpp2 on host:

      # ip netns add vpp1
      # ip netns add vpp2

      2. Create two tap interfaces on vpp:

      DBGvpp# create tap host-ns vpp1
      DBGvpp# set int state tap0 up 
      DBGvpp# create tap host-ns vpp2 
      DBGvpp# set int state tap1 up

      3.  Let's create l2xc:

      DBGvpp# set interface l2 xconnect tap0 tap1
      DBGvpp# set interface l2 xconnect tap1 tap0

      4. Finish setting up interfaces in target network namespaces:

      # ip netns exec vpp1 ip link set tap0 up
      # ip netns exec vpp2 ip link set tap0 up
      # ip netns exec vpp1 ip address add 10.10.1.1/24 dev tap0
      # ip netns exec vpp2 ip address add 10.10.1.2/24 dev tap0

      5. Ping:

      # ip netns exec vpp1 ping 10.10.1.2

      It works fine.
      6. Let's delete vpp2 netns:

      # ip netns delete vpp2

      7. Ping continues to work!

      Additional information

      DBGvpp# show version
      vpp v22.02-rc0~492-gf715b33f1 built by art on art-c at 2022-01-13T07:06:48

       

            Unassigned Unassigned
            ArtemGlazychev Artem Glazychev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: