[VOL-2713] Sending a single DHCP Discovery packet
Recent changes in openolt-adapter are sending one flow for each P-Bit,
thus BBSim needs to account for only one of them.
Change-Id: I8460c95a9045120d61d1347f07775790640deea2
diff --git a/internal/bbsim/devices/onu.go b/internal/bbsim/devices/onu.go
index c0bdb46..237c353 100644
--- a/internal/bbsim/devices/onu.go
+++ b/internal/bbsim/devices/onu.go
@@ -621,6 +621,7 @@
"EthType": fmt.Sprintf("%x", msg.Flow.Classifier.EthType),
"FlowId": msg.Flow.FlowId,
"FlowType": msg.Flow.FlowType,
+ "GemportId": msg.Flow.GemportId,
"InnerVlan": msg.Flow.Classifier.IVid,
"IntfId": msg.Flow.AccessIntfId,
"IpProto": msg.Flow.Classifier.IpProto,
@@ -630,6 +631,7 @@
"PortNo": msg.Flow.PortNo,
"SrcPort": msg.Flow.Classifier.SrcPort,
"UniID": msg.Flow.UniId,
+ "ClassifierOPbits": msg.Flow.Classifier.OPbits,
}).Debug("ONU receives Flow")
if msg.Flow.UniId != 0 {
@@ -669,7 +671,8 @@
}
} else if msg.Flow.Classifier.EthType == uint32(layers.EthernetTypeIPv4) &&
msg.Flow.Classifier.SrcPort == uint32(68) &&
- msg.Flow.Classifier.DstPort == uint32(67) {
+ msg.Flow.Classifier.DstPort == uint32(67) &&
+ msg.Flow.Classifier.OPbits == 0 {
// keep track that we received the DHCP Flows so that we can transition the state to dhcp_started
o.DhcpFlowReceived = true