[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a8zo4fc4.fsf@x220.int.ebiederm.org>
Date: Sat, 07 Mar 2015 16:23:23 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: David Miller <davem@...emloft.net>
Cc: <netdev@...r.kernel.org>
Subject: [PATCH net-next 4/6] mpls: Correct the ttl decrement.
According to RFC3032 section 2.4.2 packets with an outgoing
ttl of 0 MUST NOT be forwarded. According to section 2.4.1
an outgoing TTL of 0 comes from an incomming TTL <= 1.
Therefore any packets that is received with a ttl <= 1 should
not have it's ttl decremented and forwarded.
Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
---
net/mpls/af_mpls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index 5c99e3fc1b72..e120074157de 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -162,7 +162,7 @@ static int mpls_forward(struct sk_buff *skb, struct net_device *dev,
skb_forward_csum(skb);
/* Verify ttl is valid */
- if (dec.ttl <= 2)
+ if (dec.ttl <= 1)
goto drop;
dec.ttl -= 1;
--
2.2.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists