Complete IGMPv3 membership report
Change-Id: I900478972675ee60928b39bbdc55858d3bea998b
diff --git a/olt.py b/olt.py
index a8e26c4..4f78f2a 100644
--- a/olt.py
+++ b/olt.py
@@ -14,7 +14,8 @@
from oftest.testutils import *
-from IGMP import IGMPv3
+from IGMP import IGMPv3, IGMPv3gr, IGMP_TYPE_V3_MEMBERSHIP_REPORT, IGMP_V3_GR_TYPE_INCLUDE
+
# These parameters can be altered from the command line using the -t or --test-params= options.
# Example: -t 'onu_port=129;olt_port=288;device_type=pmc'
@@ -171,9 +172,9 @@
match.oxm_list.append(ofp.oxm.eth_type(0x800))
match.oxm_list.append(ofp.oxm.ip_proto(2))
- pkt = scapy.Ether(dst='01:00:5E:7F:FF:FF', src='00:00:00:00:00:01')/ \
- scapy.IP(src='10.0.0.1', dst='10.0.0.2', ttl=60, tos=0, id=0, proto=2)
-
+ igmp = IGMPv3(type=IGMP_TYPE_V3_MEMBERSHIP_REPORT, max_resp_code=30, gaddr="224.0.0.1")
+ igmp.grps = [IGMPv3gr(rtype=IGMP_V3_GR_TYPE_INCLUDE, mcaddr="229.10.20.30")]
+ pkt = IGMPv3.fixup( scapy.Ether(src='00:00:00:00:be:ef') / scapy.IP() / igmp )
pkt = pkt / ("0" * (100 - len(pkt)))
testPacketIn(self, match, pkt)