Due to a change of behavior in scapy 2.6.x, the current CoPP system test no longer works.
One of the changes we need to do is to switch to using sendp() instead of send(), which requires adding Ethernet frames. I discovered that scapy 2.6.x includes a BFD contrib module, so while we're already updating the scapy code, let's switch to using the BFD class in the same breath. To ensure we catch such regresssions in the future, unpin scapy in the CI container image. Reported-at: https://launchpad.net/bugs/2104222 Signed-off-by: Frode Nordahl <fnord...@ubuntu.com> --- tests/system-ovn.at | 21 +++++++++++---------- utilities/containers/py-requirements.txt | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tests/system-ovn.at b/tests/system-ovn.at index 66deeb30e..07cc31ba3 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -7867,19 +7867,20 @@ bfd: bfd-meter ]) check ovn-nbctl --wait=hv --bfd lr-route-add R1 240.0.0.0/8 172.16.1.50 rp-public -printf "%08x" $(ovn-sbctl get bfd . disc) > /tmp/disc +ovn_discriminator=$(printf "%08x" $(ovn-sbctl get bfd . disc)) NETNS_START_TCPDUMP([server], [-nn -i s1 udp port 3784 and ip[[29]]==0x90 -Q in], [bfd]) ip netns exec server scapy -H <<-EOF -import binascii -f = open("/tmp/disc", "r") -# scapy does not support BFD protocol -# let's hardcode a BFD payload with the proper my-disc field read from the db -bfd = binascii.unhexlify("20600518a899e77b" + f.readline().strip() + "000f4240000f424000000000") -p = IP(src="172.16.1.50", dst="172.16.1.1") / UDP(dport = 3784, sport = 49152) / Raw(load = bfd) -send (p, iface='s1', loop = 0, verbose = 0, count = 100) -f.close() +from scapy.contrib import bfd +BFD_STA_DOWN = 1 +BFD_FLAG_POLL = 1 << 5 +p = (Ether(src="f0:00:00:01:02:05", dst="00:00:02:01:02:03") / + IP(src="172.16.1.50", dst="172.16.1.1") / + UDP(dport = 3784, sport = 49152) / + bfd.BFD(sta=BFD_STA_DOWN, + flags=BFD_FLAG_POLL, + your_discriminator=0x$ovn_discriminator)) +sendp (p, iface='s1', loop = 0, verbose = 0, count = 100) EOF -rm /tmp/disc # 1pps OVS_WAIT_UNTIL([ diff --git a/utilities/containers/py-requirements.txt b/utilities/containers/py-requirements.txt index 1b55042c8..f308cc331 100644 --- a/utilities/containers/py-requirements.txt +++ b/utilities/containers/py-requirements.txt @@ -1,6 +1,6 @@ flake8>=6.1.0 meson>=1.4,<1.5 -scapy==2.5.0 +scapy>=2.6.1 sphinx<8.0 # https://github.com/sphinx-doc/sphinx/issues/12711 setuptools pyelftools -- 2.43.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev