Correct state parser to match on icmp6.type
This commit is contained in:
parent
68bb8e9edd
commit
39c280cd33
3 changed files with 14 additions and 14 deletions
|
@ -17,6 +17,7 @@ parser MyParser(packet_in packet,
|
|||
transition select(hdr.ethernet.ethertype){
|
||||
TYPE_IPV4: ipv4;
|
||||
TYPE_IPV6: ipv6;
|
||||
|
||||
default: accept;
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +49,7 @@ parser MyParser(packet_in packet,
|
|||
|
||||
state icmp6 {
|
||||
packet.extract(hdr.icmp6);
|
||||
transition select(hdr.ipv6.next_header){
|
||||
transition select(hdr.icmp6.type) {
|
||||
ICMP6_NS: icmp6_neighbor_solicitation;
|
||||
default: accept;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,6 @@ control MyIngress(inout headers hdr,
|
|||
hdr.icmp6_option_link_layer_addr.ll_length = 1; /* 1* 64 bit */
|
||||
hdr.icmp6_option_link_layer_addr.mac_addr = mac_addr;
|
||||
|
||||
|
||||
/* version1: rebuilding packet */
|
||||
/*
|
||||
truncate((bit<32>)(112 + 320 + 32)/8);
|
||||
|
|
Loading…
Reference in a new issue