[P4] only apply tables on valid headers

This commit is contained in:
Nico Schottelius 2019-02-23 14:29:36 +01:00
parent bec7dc548e
commit 368ad03792

View file

@ -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();
}
}
}