2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00

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 ubuntu 20.04.

Acked-by: Mike Pattrick <mkp@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Simon Jones <batmanustc@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Simon Jones 2023-07-28 09:41:22 +08:00 committed by Ilya Maximets
parent 47520b33bd
commit 20a7654d24

View File

@ -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(