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
888f3937
Commit
888f3937
authored
11 years ago
by
Shudong Zhou
Browse files
Options
Downloads
Patches
Plain Diff
Add app id to overload block flows
parent
99802faa
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/core/OFSwitchBase.java
+7
-5
7 additions, 5 deletions
...main/java/net/floodlightcontroller/core/OFSwitchBase.java
with
7 additions
and
5 deletions
src/main/java/net/floodlightcontroller/core/OFSwitchBase.java
+
7
−
5
View file @
888f3937
...
...
@@ -41,6 +41,7 @@ import net.floodlightcontroller.core.annotations.LogMessageDocs;
import
net.floodlightcontroller.core.internal.Controller
;
import
net.floodlightcontroller.core.internal.OFFeaturesReplyFuture
;
import
net.floodlightcontroller.core.internal.OFStatisticsFuture
;
import
net.floodlightcontroller.core.util.AppCookie
;
import
net.floodlightcontroller.core.web.serializers.DPIDSerializer
;
import
net.floodlightcontroller.devicemanager.SwitchPort
;
import
net.floodlightcontroller.packet.Ethernet
;
...
...
@@ -144,9 +145,8 @@ public abstract class OFSwitchBase implements IOFSwitch {
}
};
// for managing our map sizes
protected
static
int
MAX_MACS_PER_SWITCH
=
1000
;
public
static
final
int
OFSWITCH_APP_ID
=
5
;
public
OFSwitchBase
()
{
this
.
stringId
=
null
;
this
.
attributes
=
new
ConcurrentHashMap
<
Object
,
Object
>();
...
...
@@ -930,7 +930,8 @@ public abstract class OFSwitchBase implements IOFSwitch {
int
port
=
pin
.
getInPort
();
SwitchPort
swPort
=
new
SwitchPort
(
getId
(),
port
);
ForwardingBase
.
blockHost
(
floodlightProvider
,
swPort
,
srcMac
.
toLong
(),
(
short
)
5
,
0
);
swPort
,
srcMac
.
toLong
(),
(
short
)
5
,
AppCookie
.
makeCookie
(
OFSWITCH_APP_ID
,
0
));
log
.
info
(
"Excessive packet in from {} on {}, block host for 5 sec"
,
srcMac
.
toString
(),
swPort
);
}
...
...
@@ -954,7 +955,8 @@ public abstract class OFSwitchBase implements IOFSwitch {
// write out drop flow per port
SwitchPort
swPort
=
new
SwitchPort
(
getId
(),
port
);
ForwardingBase
.
blockHost
(
floodlightProvider
,
swPort
,
-
1L
,
(
short
)
5
,
0
);
swPort
,
-
1L
,
(
short
)
5
,
AppCookie
.
makeCookie
(
OFSWITCH_APP_ID
,
1
));
log
.
info
(
"Excessive packet in from {}, block port for 5 sec"
,
swPort
);
}
...
...
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