Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2014-09-09 15:04:13 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
505bc6baac9ad8a7684d8608dfd596d0796d2963
505bc6ba
1 parent
ddf02db9
block packet context after handling lldp
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/LinkDiscovery.java
providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/LinkDiscovery.java
View file @
505bc6b
...
...
@@ -277,7 +277,7 @@ public class LinkDiscovery implements TimerTask {
* Handles an incoming LLDP packet. Creates link in topology and sends ACK
* to port where LLDP originated.
*/
public
void
handleLLDP
(
final
byte
[]
pkt
,
Integer
inPort
)
{
public
boolean
handleLLDP
(
final
byte
[]
pkt
,
Integer
inPort
)
{
short
ethType
=
ONLabLddp
.
isOVXLLDP
(
pkt
);
if
(
ethType
==
Ethernet
.
TYPE_LLDP
||
ethType
==
Ethernet
.
TYPE_BSN
)
{
...
...
@@ -286,7 +286,7 @@ public class LinkDiscovery implements TimerTask {
final
OpenFlowSwitch
srcSwitch
=
ctrl
.
getSwitch
(
new
Dpid
(
dp
.
getDpid
()));
final
Integer
srcPort
=
dp
.
getPort
();
if
(
srcSwitch
==
null
)
{
return
;
return
true
;
}
this
.
ackProbe
(
srcPort
);
ConnectPoint
src
=
new
ConnectPoint
(
...
...
@@ -303,8 +303,10 @@ public class LinkDiscovery implements TimerTask {
ld
=
new
DefaultLinkDescription
(
src
,
dst
,
Type
.
DIRECT
);
}
linkProvider
.
linkDetected
(
ld
);
return
true
;
}
else
{
this
.
log
.
debug
(
"Ignoring unknown LLDP"
);
return
false
;
}
}
...
...
providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
View file @
505bc6b
...
...
@@ -87,8 +87,9 @@ public class OpenFlowLinkProvider extends AbstractProvider implements LinkProvid
if
(
ld
==
null
)
{
return
;
}
ld
.
handleLLDP
(
pktCtx
.
unparsed
(),
pktCtx
.
inPort
());
if
(
ld
.
handleLLDP
(
pktCtx
.
unparsed
(),
pktCtx
.
inPort
()))
{
pktCtx
.
block
();
}
}
...
...
Please
register
or
login
to post a comment