Don't fail when we get a UDP checksum of 0xffff.
scapy doesn't appear to change a zero checksum to 0xffff for UDP
packets as required by RFC 768, but unsurprisingly, the kernel
does. That can cause the test to fail because assertPacketMatches
does a byte comparison and sees that 0 != ffff. Fix this by
rewriting ffff to 0 for UDP packets.
Change-Id: I6ab13ae5597dcc8ce34f591076ac7dd87f81a96f
diff --git a/net/test/multinetwork_base.py b/net/test/multinetwork_base.py
index 7010a0f..0ed14db 100644
--- a/net/test/multinetwork_base.py
+++ b/net/test/multinetwork_base.py
@@ -543,6 +543,9 @@
if expectedudp.sport is None:
actualudp.sport = None
actualudp.chksum = None
+ elif actualudp.chksum == 0xffff:
+ # Scapy does not appear to change 0 to 0xffff as required by RFC 768.
+ actualudp.chksum = 0
# Since the TCP code below messes with options, recalculate the length.
if actualip: