change whitelist to be installing drop rules on in IDS table with hard_timeout

parent 3246d2a8
......@@ -95,6 +95,7 @@ class TopoNetController(ControllerBase):
# post data must have the tap id to translate to the start switch of the
# corresponding tap id.
# install drop rules only in IDS table(20)
def whitelistEntry(self, req, **kwargs):
print "whitelist traffic"
print "using dp id instead of tap id for now :("
......@@ -152,7 +153,7 @@ class TopoNetController(ControllerBase):
match.set_tcp_dst(tcp_dst)
'''
stats = ofp.OFPFlowStatsRequest(dp, flags=0,
table_id=0,out_port=of.OFPP_ANY, out_group=of.OFPG_ANY,
table_id=20,out_port=of.OFPP_ANY, out_group=of.OFPG_ANY,
cookie=0, cookie_mask=0, match=match)
msgs = []
......@@ -167,8 +168,8 @@ class TopoNetController(ControllerBase):
print "updating priority from %d to %d" % (priority_to_set, stats.priority+1)
priority_to_set = stats.priority +1
mod_flow(dp, priority=priority_to_set, match=match)
#set hardtime out to be 10s for now :)
mod_flow(dp, table=20, priority=priority_to_set, hard_timeout=10, match=match)
return Response(status=200)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment