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
4efd6bd2
Commit
4efd6bd2
authored
8 years ago
by
Ryan Izard
Browse files
Options
Downloads
Patches
Plain Diff
Forwarding should use OFMessageUtils.getInPort(packet-in) instead of getting the in-port itself.
parent
fd24f400
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/forwarding/Forwarding.java
+3
-4
3 additions, 4 deletions
.../java/net/floodlightcontroller/forwarding/Forwarding.java
with
3 additions
and
4 deletions
src/main/java/net/floodlightcontroller/forwarding/Forwarding.java
+
3
−
4
View file @
4efd6bd2
...
...
@@ -245,7 +245,7 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF
protected
void
doDropFlow
(
IOFSwitch
sw
,
OFPacketIn
pi
,
IRoutingDecision
decision
,
FloodlightContext
cntx
)
{
OFPort
inPort
=
(
pi
.
getVersion
().
compareTo
(
OFVersion
.
OF_12
)
<
0
?
pi
.
getInPort
()
:
pi
.
getMatch
().
get
(
MatchField
.
IN_PORT
)
);
OFPort
inPort
=
OFMessageUtils
.
getInPort
(
pi
);
Match
m
=
createMatchFromPacket
(
sw
,
inPort
,
cntx
);
OFFlowMod
.
Builder
fmb
=
sw
.
getOFFactory
().
buildFlowAdd
();
// this will be a drop-flow; a flow that will not output to any ports
List
<
OFAction
>
actions
=
new
ArrayList
<
OFAction
>();
// set no action to drop
...
...
@@ -274,7 +274,7 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF
}
protected
void
doForwardFlow
(
IOFSwitch
sw
,
OFPacketIn
pi
,
IRoutingDecision
decision
,
FloodlightContext
cntx
,
boolean
requestFlowRemovedNotifn
)
{
OFPort
inPort
=
(
pi
.
getVersion
().
compareTo
(
OFVersion
.
OF_12
)
<
0
?
pi
.
getInPort
()
:
pi
.
getMatch
().
get
(
MatchField
.
IN_PORT
)
);
OFPort
inPort
=
OFMessageUtils
.
getInPort
(
pi
);
IDevice
dstDevice
=
IDeviceService
.
fcStore
.
get
(
cntx
,
IDeviceService
.
CONTEXT_DST_DEVICE
);
DatapathId
source
=
sw
.
getId
();
...
...
@@ -503,8 +503,7 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF
* @param cntx The FloodlightContext associated with this OFPacketIn
*/
protected
void
doFlood
(
IOFSwitch
sw
,
OFPacketIn
pi
,
IRoutingDecision
decision
,
FloodlightContext
cntx
)
{
OFPort
inPort
=
(
pi
.
getVersion
().
compareTo
(
OFVersion
.
OF_12
)
<
0
?
pi
.
getInPort
()
:
pi
.
getMatch
().
get
(
MatchField
.
IN_PORT
));
// Set Action to flood
OFPort
inPort
=
OFMessageUtils
.
getInPort
(
pi
);
OFPacketOut
.
Builder
pob
=
sw
.
getOFFactory
().
buildPacketOut
();
List
<
OFAction
>
actions
=
new
ArrayList
<
OFAction
>();
Set
<
OFPort
>
broadcastPorts
=
this
.
topologyService
.
getSwitchBroadcastPorts
(
sw
.
getId
());
...
...
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