Also add required icmp6_type
This commit is contained in:
parent
5f14967a32
commit
4d3641fc50
3 changed files with 5 additions and 5 deletions
|
@ -874,7 +874,6 @@ user@T:~# iptables -t mangle -A PREROUTING \
|
|||
5656
|
||||
**** Cisco (?)
|
||||
*** P4 based implementation
|
||||
TBD
|
||||
**** General
|
||||
|
||||
- IPv6 subnet 2001:db8::/32
|
||||
|
@ -1203,6 +1202,7 @@ But unless I am missing something obvious, P4 hides it…
|
|||
|
||||
**** ICMP6: checksum over payload
|
||||
- variable length, up to 65k
|
||||
Exists:
|
||||
**** Synchronisation with the controller
|
||||
- Double data type definition -> might differ
|
||||
- TYPE_CPU for ethernet
|
||||
|
|
|
@ -179,19 +179,21 @@ class L2Controller(object):
|
|||
def init_ndp_in_switch(self, addr):
|
||||
icmp6_addr = self.gen_ndp_multicast_addr(addr)
|
||||
icmp6_net = "{}/128".format(icmp6_addr)
|
||||
icmp6_type = 135
|
||||
mac_addr = self.info['mac_addr']
|
||||
|
||||
self.controller.table_add("icmp6",
|
||||
"icmp6_neighbor_solicitation",
|
||||
[str(icmp6_net)], [str(addr), str(mac_addr)])
|
||||
[str(icmp6_net), str(icmp6_type)], [str(addr), str(mac_addr)])
|
||||
|
||||
def init_icmp6_echo_in_switch(self, addr):
|
||||
icmp6_addr = addr
|
||||
icmp6_type = 128
|
||||
icmp6_net = "{}/128".format(icmp6_addr)
|
||||
|
||||
self.controller.table_add("icmp6",
|
||||
"icmp6_echo_reply",
|
||||
[str(icmp6_net)], [str(addr)])
|
||||
[str(icmp6_net), str(icmp6_type)], [str(addr)])
|
||||
|
||||
|
||||
def fill_tables(self):
|
||||
|
|
|
@ -301,8 +301,6 @@ control MyIngress(inout headers hdr,
|
|||
// ndp_answer.apply();
|
||||
//ndp.apply(); /* flood or if it is us - answer */
|
||||
|
||||
|
||||
|
||||
icmp6.apply();
|
||||
v6_networks.apply();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue