Thomas Vachuska

Fixing reactive forwarding not to forward LLDP & BDDP.

Change-Id: Iea03aaeeb0679f2732246329e72306cc47bec5c1
......@@ -132,6 +132,11 @@ public class ReactiveForwarding {
InboundPacket pkt = context.inPacket();
Ethernet ethPkt = pkt.parsed();
// Bail if this is deemed to be a control packet.
if (isControlPacket(ethPkt)) {
return;
}
HostId id = HostId.hostId(ethPkt.getDestinationMAC());
// Do not process link-local addresses in any way.
......@@ -180,6 +185,13 @@ public class ReactiveForwarding {
// Otherwise forward and be done with it.
installRule(context, path.src().port());
}
}
// Indicates whether this is a control packet, e.g. LLDP, BDDP
private boolean isControlPacket(Ethernet eth) {
short type = eth.getEtherType();
return type == Ethernet.TYPE_LLDP || type == Ethernet.TYPE_BSN;
}
// Selects a path from the given set that does not lead back to the
......
......@@ -49,7 +49,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
......
......@@ -49,7 +49,8 @@
<repository>
<id>onlab-temp</id>
<name>ON.lab temporary repository</name>
<url>http://mavenrepo.onlab.us:8081/nexus/content/groups/public</url>
<url>http://mavenrepo.onlab.us:8081/nexus/content/groups/public
</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
......@@ -421,6 +422,12 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.0</version>
......