increase whitelist timeout from 10s to 1min for considerable traffic drop to show in evaluation

parent 6ce547d4
......@@ -119,7 +119,6 @@ class TopoNetController(ControllerBase):
# we whitelist in IP space - as of now IPV4
eth_type = ether.ETH_TYPE_IP
ip_proto = inet.IPPROTO_UDP
ipv4_src = post_values.get('ipv4_src',0)
ipv4_dst = post_values.get('ipv4_dst',0)
......@@ -133,13 +132,18 @@ class TopoNetController(ControllerBase):
return Response(status=404)
priority_to_set =255
flow_timeout = 60
ids_table = 20
#Drop UDP packets
ip_proto = inet.IPPROTO_UDP
match = ofp.OFPMatch(eth_type=eth_type, ip_proto=ip_proto, ipv4_src=ipv4_src, ipv4_dst=ipv4_dst)
#set hardtime out to be 10s for now :)
mod_flow(dp, table_id=20, command=of.OFPFC_ADD, priority=priority_to_set, hard_timeout=10, match=match)
mod_flow(dp, table_id=ids_table, command=of.OFPFC_ADD, priority=priority_to_set, hard_timeout=flow_timeout, match=match)
#Drop TCP packets
ip_proto = inet.IPPROTO_TCP
match = ofp.OFPMatch(eth_type=eth_type, ip_proto=ip_proto, ipv4_src=ipv4_src, ipv4_dst=ipv4_dst)
#set hardtime out to be 10s for now :)
mod_flow(dp, table_id=20, command=of.OFPFC_ADD, priority=priority_to_set, hard_timeout=10, match=match)
mod_flow(dp, table_id=ids_table, command=of.OFPFC_ADD, priority=priority_to_set, hard_timeout=flow_timeout, 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