Fixed wrong S1U address in filter table and DL handling
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/protocols/DpnP4Communicator.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/protocols/DpnP4Communicator.java
index b22f63f..609275a 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/protocols/DpnP4Communicator.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/protocols/DpnP4Communicator.java
@@ -169,10 +169,8 @@
// If old session is there. We keep the old rules.
SESS_ID_TO_FLOWS.putIfAbsent(sessionId, Sets.newHashSet());
SESS_ID_TO_UE_ADDR.put(sessionId, ueIpv4);
- SESS_ID_TO_S1U_ADDR.put(sessionId, s1USgwIpv4);
SESS_ID_TO_FLOWS.get(sessionId).add(ueFilterRule(ueIpv4));
- SESS_ID_TO_FLOWS.get(sessionId).add(s1uFilterRule(s1USgwIpv4));
applySessionRules(sessionId);
@@ -208,18 +206,14 @@
sessionId);
return;
}
- if (!SESS_ID_TO_S1U_ADDR.containsKey(sessionId)) {
- log.error("Missing sess ID in SESS_ID_TO_S1U_ADDR map: {}",
- sessionId);
- return;
- }
-
final Ip4Address ueAddr = SESS_ID_TO_UE_ADDR.get(sessionId);
- final Ip4Address s1uAddr = SESS_ID_TO_S1U_ADDR.get(sessionId);
+ SESS_ID_TO_S1U_ADDR.put(sessionId, s1USgwIpv4);
+
+ SESS_ID_TO_FLOWS.get(sessionId).add(s1uFilterRule(s1USgwIpv4));
SESS_ID_TO_FLOWS.get(sessionId)
.add(dlSessLookupRule(ueAddr, s1UEnodebTeid,
- s1UEnodebIpv4, s1uAddr));
+ s1UEnodebIpv4, s1USgwIpv4));
applySessionRules(sessionId);