From 907f677e2d5b35adc01e9ff09e1ef3ee7f9f8105 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Mar 2019 13:09:27 +0000 Subject: [PATCH] Use if instead of switch --- p4src/static-mapping.p4 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index a3e5cda..b3e543e 100644 --- a/p4src/static-mapping.p4 +++ b/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();