提交 60258098 编写于 作者: S Sabrina Dubroca 提交者: Greg Kroah-Hartman

ip_tunnel: don't force DF when MTU is locked

[ Upstream commit 16f7eb2b ]

The various types of tunnels running over IPv4 can ask to set the DF
bit to do PMTU discovery. However, PMTU discovery is subject to the
threshold set by the net.ipv4.route.min_pmtu sysctl, and is also
disabled on routes with "mtu lock". In those cases, we shouldn't set
the DF bit.

This patch makes setting the DF bit conditional on the route's MTU
locking state.

This issue seems to be older than git history.
Signed-off-by: NSabrina Dubroca <sd@queasysnail.net>
Reviewed-by: NStefano Brivio <sbrivio@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a6870825
...@@ -80,7 +80,7 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, ...@@ -80,7 +80,7 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
iph->version = 4; iph->version = 4;
iph->ihl = sizeof(struct iphdr) >> 2; iph->ihl = sizeof(struct iphdr) >> 2;
iph->frag_off = df; iph->frag_off = ip_mtu_locked(&rt->dst) ? 0 : df;
iph->protocol = proto; iph->protocol = proto;
iph->tos = tos; iph->tos = tos;
iph->daddr = dst; iph->daddr = dst;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册