aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/apps/sdnip
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/apps/sdnip')
-rw-r--r--framework/src/onos/apps/sdnip/features.xml1
-rw-r--r--framework/src/onos/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java19
2 files changed, 15 insertions, 5 deletions
diff --git a/framework/src/onos/apps/sdnip/features.xml b/framework/src/onos/apps/sdnip/features.xml
index 21ae89d3..5bd0dbc4 100644
--- a/framework/src/onos/apps/sdnip/features.xml
+++ b/framework/src/onos/apps/sdnip/features.xml
@@ -15,7 +15,6 @@
~ limitations under the License.
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
- <repository>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repository>
<feature name="onos-app-sdnip" version="${project.version}"
description="${project.description}">
<feature>onos-api</feature>
diff --git a/framework/src/onos/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java b/framework/src/onos/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java
index c0001bdc..9113e013 100644
--- a/framework/src/onos/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java
+++ b/framework/src/onos/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java
@@ -83,7 +83,8 @@ public class SdnIpFib implements FibListener {
@Override
- public void update(Collection<FibUpdate> updates, Collection<FibUpdate> withdraws) {
+ public void update(Collection<FibUpdate> updates,
+ Collection<FibUpdate> withdraws) {
int submitCount = 0, withdrawCount = 0;
//
// NOTE: Semantically, we MUST withdraw existing intents before
@@ -157,7 +158,8 @@ public class SdnIpFib implements FibListener {
MacAddress nextHopMacAddress) {
// Find the attachment point (egress interface) of the next hop
- Interface egressInterface = interfaceService.getMatchingInterface(nextHopIpAddress);
+ Interface egressInterface =
+ interfaceService.getMatchingInterface(nextHopIpAddress);
if (egressInterface == null) {
log.warn("No outgoing interface found for {}",
nextHopIpAddress);
@@ -182,10 +184,19 @@ public class SdnIpFib implements FibListener {
TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
if (prefix.isIp4()) {
selector.matchEthType(Ethernet.TYPE_IPV4);
- selector.matchIPDst(prefix);
+ // if it is default route, then we do not need match destination
+ // IP address
+ if (prefix.prefixLength() != 0) {
+ selector.matchIPDst(prefix);
+ }
} else {
selector.matchEthType(Ethernet.TYPE_IPV6);
- selector.matchIPv6Dst(prefix);
+ // if it is default route, then we do not need match destination
+ // IP address
+ if (prefix.prefixLength() != 0) {
+ selector.matchIPv6Dst(prefix);
+ }
+
}
// Rewrite the destination MAC address