[P4] only apply tables on valid headers
This commit is contained in:
parent
bec7dc548e
commit
368ad03792
1 changed files with 6 additions and 2 deletions
|
@ -46,8 +46,12 @@ control MyIngress(inout headers hdr,
|
||||||
}
|
}
|
||||||
|
|
||||||
apply {
|
apply {
|
||||||
v6_routing.apply()
|
if(hdr.ipv6.isValid()) {
|
||||||
v4_routing.apply()
|
v6_routing.apply();
|
||||||
|
}
|
||||||
|
if(hdr.ipv4.isValid()) {
|
||||||
|
v4_routing.apply();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue