commit | 3328a03d14d83601fe49ffc023ba1dc71203869e | [log] [tgz] |
---|---|---|
author | Charles Chan <rascov@gmail.com> | Tue Jun 27 18:48:32 2017 -0700 |
committer | Charles Chan <rascov@gmail.com> | Fri Jun 30 13:43:56 2017 -0700 |
tree | f0ec1b4e14aabf36e80667ea037f0931168a0ea8 | |
parent | 8daf45c6f54c21a80a59b3e898e2d614c4373178 [diff] |
ONOS-6768 Punt ARP/NDP even when a device is not configured Change-Id: I39f3e7e5e0252ecc548f44ce35806641838d01dd
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java index 550dc11..fe4c6e0 100644 --- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java +++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -642,9 +642,6 @@ * @param deviceId Switch ID to set the rules */ public void populatePortAddressingRules(DeviceId deviceId) { - rulePopulator.populateIpPunts(deviceId); - rulePopulator.populateArpNdpPunts(deviceId); - // Although device is added, sometimes device store does not have the // ports for this device yet. It results in missing filtering rules in the // switch. We will attempt it a few times. If it still does not work,
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java index bcbefc8..6eab6f2 100644 --- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java +++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -946,6 +946,12 @@ private void processDeviceAdded(Device device) { log.info("** DEVICE ADDED with ID {}", device.id()); + + // NOTE: Punt ARP/NDP even when the device is not configured. + // Host learning without network config is required for CORD config generator. + routingRulePopulator.populateIpPunts(device.id()); + routingRulePopulator.populateArpNdpPunts(device.id()); + if (deviceConfiguration == null || !deviceConfiguration.isConfigured(device.id())) { log.warn("Device configuration uploading. Device {} will be " + "processed after config completes.", device.id());