CORD-523 Introduce generic routing service in Segment Routing
Segment Routing now reacts to routes being added/removed through RouteService.
SR will disable SingleSwitchFibInstaller if vRouter is activated
SR will install a routing table entry on
- The leaf where next hop attaches to
- The other leaves that points packets to the leaf where next hop attaches to
Host handler no longer add any IP flow for hosts outside the configured subnet
- We need to explicitly add a per host route via RouteService when needed (vSG)
Change suppressSubnet behavior
- Before: do not push any flow
- After: ignore subnet config but still push filtering obj with VLAN 4094
ARP handler drops all packets from suppressed ports
Additional refactoring
- Remove vRouterId. Gateway router now needs to be specify through route API
- Limit the scope of some variables
- Unify handler.init method name
Change-Id: Idd2fd19fa74e3fa6209eef5cf2ed79957715c5e9
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/ArpHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
index 2cde3b9..4529389 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
@@ -33,6 +33,7 @@
import org.onosproject.net.packet.OutboundPacket;
import org.onosproject.segmentrouting.config.DeviceConfigNotFoundException;
import org.onosproject.segmentrouting.config.DeviceConfiguration;
+import org.onosproject.segmentrouting.config.SegmentRoutingAppConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -88,6 +89,13 @@
ConnectPoint connectPoint = pkt.receivedFrom();
DeviceId deviceId = connectPoint.deviceId();
+ SegmentRoutingAppConfig appConfig = srManager.cfgService
+ .getConfig(srManager.appId, SegmentRoutingAppConfig.class);
+ if (appConfig != null && appConfig.suppressSubnet().contains(connectPoint)) {
+ // Ignore ARP packets come from suppressed ports
+ return;
+ }
+
if (!validateArpSpa(connectPoint, arp)) {
log.debug("Ignore ARP packet discovered on {} with unexpected src protocol address {}.",
connectPoint, Ip4Address.valueOf(arp.getSenderProtocolAddress()));