Thomas Vachuska

Fixing reactive forwarding not to forward LLDP & BDDP.

Change-Id: Iea03aaeeb0679f2732246329e72306cc47bec5c1
...@@ -132,6 +132,11 @@ public class ReactiveForwarding { ...@@ -132,6 +132,11 @@ public class ReactiveForwarding {
132 InboundPacket pkt = context.inPacket(); 132 InboundPacket pkt = context.inPacket();
133 Ethernet ethPkt = pkt.parsed(); 133 Ethernet ethPkt = pkt.parsed();
134 134
135 + // Bail if this is deemed to be a control packet.
136 + if (isControlPacket(ethPkt)) {
137 + return;
138 + }
139 +
135 HostId id = HostId.hostId(ethPkt.getDestinationMAC()); 140 HostId id = HostId.hostId(ethPkt.getDestinationMAC());
136 141
137 // Do not process link-local addresses in any way. 142 // Do not process link-local addresses in any way.
...@@ -180,6 +185,13 @@ public class ReactiveForwarding { ...@@ -180,6 +185,13 @@ public class ReactiveForwarding {
180 // Otherwise forward and be done with it. 185 // Otherwise forward and be done with it.
181 installRule(context, path.src().port()); 186 installRule(context, path.src().port());
182 } 187 }
188 +
189 + }
190 +
191 + // Indicates whether this is a control packet, e.g. LLDP, BDDP
192 + private boolean isControlPacket(Ethernet eth) {
193 + short type = eth.getEtherType();
194 + return type == Ethernet.TYPE_LLDP || type == Ethernet.TYPE_BSN;
183 } 195 }
184 196
185 // Selects a path from the given set that does not lead back to the 197 // Selects a path from the given set that does not lead back to the
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
49 <plugin> 49 <plugin>
50 <groupId>org.apache.maven.plugins</groupId> 50 <groupId>org.apache.maven.plugins</groupId>
51 <artifactId>maven-shade-plugin</artifactId> 51 <artifactId>maven-shade-plugin</artifactId>
52 - <version>2.3</version>
53 <executions> 52 <executions>
54 <execution> 53 <execution>
55 <phase>package</phase> 54 <phase>package</phase>
......
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
49 <repository> 49 <repository>
50 <id>onlab-temp</id> 50 <id>onlab-temp</id>
51 <name>ON.lab temporary repository</name> 51 <name>ON.lab temporary repository</name>
52 - <url>http://mavenrepo.onlab.us:8081/nexus/content/groups/public</url> 52 + <url>http://mavenrepo.onlab.us:8081/nexus/content/groups/public
53 + </url>
53 <snapshots> 54 <snapshots>
54 <enabled>true</enabled> 55 <enabled>true</enabled>
55 </snapshots> 56 </snapshots>
...@@ -421,6 +422,12 @@ ...@@ -421,6 +422,12 @@
421 </plugin> 422 </plugin>
422 423
423 <plugin> 424 <plugin>
425 + <groupId>org.apache.maven.plugins</groupId>
426 + <artifactId>maven-shade-plugin</artifactId>
427 + <version>2.3</version>
428 + </plugin>
429 +
430 + <plugin>
424 <groupId>org.codehaus.mojo</groupId> 431 <groupId>org.codehaus.mojo</groupId>
425 <artifactId>findbugs-maven-plugin</artifactId> 432 <artifactId>findbugs-maven-plugin</artifactId>
426 <version>3.0.0</version> 433 <version>3.0.0</version>
......