Bridged packets should retain the same TTL
Change-Id: Ia685002cddffd9aeac1f43147efc8b68e4b26f16
diff --git a/pipelines/fabric/impl/src/main/resources/include/control/next.p4 b/pipelines/fabric/impl/src/main/resources/include/control/next.p4
index 58b97b1..0a624b2 100644
--- a/pipelines/fabric/impl/src/main/resources/include/control/next.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/control/next.p4
@@ -369,12 +369,12 @@
hdr.mpls.ttl = hdr.mpls.ttl - 1;
if (hdr.mpls.ttl == 0) mark_to_drop(standard_metadata);
} else {
- if(hdr.ipv4.isValid()) {
+ if(hdr.ipv4.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING) {
hdr.ipv4.ttl = hdr.ipv4.ttl - 1;
if (hdr.ipv4.ttl == 0) mark_to_drop(standard_metadata);
}
#ifdef WITH_IPV6
- else if (hdr.ipv6.isValid()) {
+ else if (hdr.ipv6.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING) {
hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1;
if (hdr.ipv6.hop_limit == 0) mark_to_drop(standard_metadata);
}