Browse Source

Use if instead of switch

master
Your Name 3 years ago
parent
commit
907f677e2d
  1. 6
      p4src/static-mapping.p4

6
p4src/static-mapping.p4

@ -84,10 +84,8 @@ control MyIngress(inout headers hdr,
hdr.ipv4.protocol = hdr.ipv6.next_header;
switch(hdr.ipv6.next_header) {
PROTO_ICMP6: {
nat64_icmp6;
}
if(hdr.ipv6.next_header == PROTO_ICMP6) {
nat64_icmp6;
}
hdr.ipv6.setInvalid();

Loading…
Cancel
Save