Rate limit for IPv6 NS punt packets. 85/77185/7
authorSomashekar Byrappa <somashekar.b@altencalsoftlabs.com>
Tue, 23 Oct 2018 06:53:08 +0000 (12:23 +0530)
committerSam Hague <shague@redhat.com>
Mon, 29 Oct 2018 12:18:02 +0000 (12:18 +0000)
commit1a6c06fe0783d3d746e6fa1d103a0b6cc4402a63
tree31fb28495086627528ca97e36fba336a178eae57
parent6ab063f45dd4db41ab31538ca4bcd6dddda4fcf1
Rate limit for IPv6 NS punt packets.

+ NS punt controller flow is updated with learn action which adds NS
  drop flow per port for a specific ND target.
+ The drop flow will have higher priority (60) than the punt controller
  flow (50) to make sure subsequent NS packets from the same port and
  for same ND target is dropped till the hard_timeout value (10 secs).
+ The drop flow will match on LPORT tag metadata and ND target to make
  sure it drops NS packets per port and for same ND target.

"cookie=0x4000000, duration=0.100s, table=45, n_packets=0, n_bytes=0,
  hard_timeout=10, priority=60,icmp6,
  metadata=0x60000000000/0xfffff0000000000,icmp_type=135,icmp_code=0,
  nd_target=fe80::f816:3eff:fe45:ad28 actions=drop"

"cookie=0x4000000, duration=219.531s, table=45, n_packets=0, n_bytes=0,
  priority=50,icmp6,metadata=0x138a000000/0xffff000000,icmp_type=135,
  icmp_code=0,nd_target=2001:db8:0:2::1 actions=controller:65535,
  learn(table=45,hard_timeout=10,priority=60,cookie=0x4000000,
  eth_type=0x86dd,nw_proto=58,icmpv6_type=135,nxm_nx_icmpv6_code[],
  oxm_of_metadata[40..59],nxm_nx_nd_target[])"

"cookie=0x4000000, duration=219.531s, table=45, n_packets=1,
  n_bytes=86, priority=50,icmp6,metadata=0x138a000000/0xffff000000,
  icmp_type=135,icmp_code=0,nd_target=fe80::f816:3eff:fe45:ad28
  actions=controller:65535,learn(table=45,hard_timeout=10,priority=60,
  cookie=0x4000000,eth_type=0x86dd,nw_proto=58,icmpv6_type=135,
  nxm_nx_icmpv6_code[],oxm_of_metadata[40..59],nxm_nx_nd_target[])"

Change-Id: If410a56477e5dc4602e78a365faa5a32dc1d241d
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/utils/Ipv6ServiceConstants.java
ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/utils/Ipv6ServiceUtils.java
ipv6service/impl/src/main/resources/initial/netvirt-ipv6service-config.xml
ipv6service/impl/src/main/yang/ipv6service-config.yang