提交 aa7da937 编写于 作者: E Eric W. Biederman 提交者: David S. Miller

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: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0f7bbd58
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册