From: ebiederm@xmission.com (Eric W. Biederman)
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: [PATCH net-next 4/6] mpls: Correct the ttl decrement.
Date: Sat, 07 Mar 2015 16:23:23 -0600 [thread overview]
Message-ID: <87a8zo4fc4.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <874mpw5u3x.fsf@x220.int.ebiederm.org> (Eric W. Biederman's message of "Sat, 07 Mar 2015 16:18:58 -0600")
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@xmission.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
next prev parent reply other threads:[~2015-03-07 22:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-07 22:18 [PATCH net-next 0/6] mpls: Minor fixes and cleanups Eric W. Biederman
2015-03-07 22:19 ` [PATCH net-next 1/6] mpls: Fix the kzalloc argument order in mpls_rt_alloc Eric W. Biederman
2015-03-07 22:21 ` [PATCH net-next 2/6] mpls: Cleanup the rcu usage in the code Eric W. Biederman
2015-03-07 22:22 ` [PATCH net-next 3/6] mpls: Better error code for unsupported option Eric W. Biederman
2015-03-07 22:23 ` Eric W. Biederman [this message]
2015-03-07 22:24 ` [PATCH net-next 5/6] mpls: Fix the openvswitch select of NET_MPLS_GSO Eric W. Biederman
2015-03-08 9:09 ` Simon Horman
2015-03-07 22:25 ` [PATCH net-next 6/6] neigh: Use neigh table index for neigh_packet_xmit Eric W. Biederman
2015-03-08 23:33 ` [PATCH net-next 0/6] mpls: Minor fixes and cleanups David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8zo4fc4.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).