From: Simon Jones <[email protected]>

ovs-tcpdump: clear auto-assigned ipv6 address of mirror port

ovs-tcpdump will add mipxxx NIC, and on some systems this NIC has IPv6
address by default.  For vxlan topology, mipxxx, which has IPv6
address, will be treated as tunnel port, and will got error actions.

Prevent this by clearing the auto-assigned IPv6 address.  This can also
be controlled on some systems with ipv6 sysctls.

Tested on centos stream 8, and ubunto20.04

Signed-off-by: Simon Jones <[email protected]>
Acked-by: Aaron Conole <[email protected]>
---
utilities/ovs-tcpdump.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index 420c11eb8..4cbd9a5d3 100755
--- a/utilities/ovs-tcpdump.in
+++ b/utilities/ovs-tcpdump.in
@@ -96,6 +96,10 @@ def _install_dst_if_linux(tap_name, mtu_value=None):
         *(['ip', 'link', 'set', 'dev', str(tap_name), 'up']))
     pipe.wait()

+    pipe = _doexec(
+        *(['ip', '-6', 'addr', 'flush', 'dev', str(tap_name)]))
+    pipe.wait()
+

 def _remove_dst_if_linux(tap_name):
     _doexec(
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to