Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
croft1
floodlight
Commits
4cca8f3e
Commit
4cca8f3e
authored
12 years ago
by
Srinivasan Ramasubramanian
Browse files
Options
Downloads
Patches
Plain Diff
Link discovery manager must ignore all addresses in the link-local range.
parent
8671b6af
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
+10
-16
10 additions, 16 deletions
...ntroller/linkdiscovery/internal/LinkDiscoveryManager.java
with
10 additions
and
16 deletions
src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
+
10
−
16
View file @
4cca8f3e
...
...
@@ -24,7 +24,6 @@ import java.net.NetworkInterface;
import
java.net.SocketAddress
;
import
java.nio.ByteBuffer
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.HashMap
;
...
...
@@ -140,16 +139,13 @@ public class LinkDiscoveryManager
protected
IFloodlightProviderService
floodlightProvider
;
protected
IStorageSourceService
storageSource
;
protected
IThreadPoolService
threadPool
;
protected
SingletonTask
sendLLDPTask
;
private
static
final
byte
[]
LLDP_STANDARD_DST_MAC_STRING
=
HexString
.
fromHexString
(
"01:80:c2:00:00:0e"
);
private
static
final
byte
[]
LLDP_STANDARD_DST_MAC_STRING_00
=
HexString
.
fromHexString
(
"01:80:c2:00:00:00"
);
private
static
final
byte
[]
LLDP_STANDARD_DST_MAC_STRING_03
=
HexString
.
fromHexString
(
"01:80:c2:00:00:03"
);
private
static
final
byte
[]
LLDP_STANDARD_DST_MAC_STRING_0E
=
HexString
.
fromHexString
(
"01:80:c2:00:00:0e"
);
private
static
final
long
LINK_LOCAL_MASK
=
0xfffffffffff0
L
;
private
static
final
long
LINK_LOCAL_VALUE
=
0x0180c2000000
L
;
// BigSwitch OUI is 5C:16:C7, so 5D:16:C7 is the multicast version
// private static final String LLDP_BSN_DST_MAC_STRING = "5d:16:c7:00:00:01";
private
static
final
String
LLDP_BSN_DST_MAC_STRING
=
"ff:ff:ff:ff:ff:ff"
;
...
...
@@ -555,17 +551,15 @@ public class LinkDiscoveryManager
}
else
if
(
eth
.
getEtherType
()
==
Ethernet
.
TYPE_LLDP
)
{
return
handleLldp
((
LLDP
)
eth
.
getPayload
(),
sw
,
pi
,
true
,
cntx
);
}
else
if
(
eth
.
getEtherType
()
<
1500
)
{
if
(
Arrays
.
equals
(
eth
.
getDestinationMACAddress
(),
LLDP_STANDARD_DST_MAC_STRING_00
)
||
Arrays
.
equals
(
eth
.
getDestinationMACAddress
(),
LLDP_STANDARD_DST_MAC_STRING_03
)
||
Arrays
.
equals
(
eth
.
getDestinationMACAddress
(),
LLDP_STANDARD_DST_MAC_STRING_0E
))
{
// drop any other link discovery/spanning tree protocols
long
destMac
=
eth
.
getDestinationMAC
().
toLong
();
if
((
destMac
&
LINK_LOCAL_MASK
)
==
LINK_LOCAL_VALUE
){
if
(
log
.
isTraceEnabled
())
{
log
.
trace
(
"Ignoring packet addressed to 802.1D/Q "
+
"reserved address."
);
}
return
Command
.
STOP
;
}
}
return
Command
.
CONTINUE
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment