diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index 77c7602..7f60884 100644 --- a/p4src/static-mapping.p4 +++ b/p4src/static-mapping.p4 @@ -46,8 +46,12 @@ control MyIngress(inout headers hdr, } apply { - v6_routing.apply() - v4_routing.apply() + if(hdr.ipv6.isValid()) { + v6_routing.apply(); + } + if(hdr.ipv4.isValid()) { + v4_routing.apply(); + } } }