mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-27 06:11:47 +01:00
Merge "Fixing reactive forwarding not to forward LLDP & BDDP."
This commit is contained in:
commit
71379f47c9
@ -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>
|
||||
|
||||
9
pom.xml
9
pom.xml
@ -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>
|
||||
@ -420,6 +421,12 @@
|
||||
<extensions>true</extensions>
|
||||
</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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user