|
@@ -795,6 +795,7 @@ int
|
|
|
ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
|
|
|
struct ip_vs_protocol *pp)
|
|
|
{
|
|
|
+ struct netns_ipvs *ipvs = net_ipvs(skb_net(skb));
|
|
|
struct rtable *rt; /* Route to the other host */
|
|
|
__be32 saddr; /* Source for tunnel */
|
|
|
struct net_device *tdev; /* Device to other host */
|
|
@@ -830,10 +831,9 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
|
|
|
skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
|
|
|
|
|
|
/* Copy DF, reset fragment offset and MF */
|
|
|
- df = old_iph->frag_off & htons(IP_DF);
|
|
|
+ df = sysctl_pmtu_disc(ipvs) ? old_iph->frag_off & htons(IP_DF) : 0;
|
|
|
|
|
|
- if ((old_iph->frag_off & htons(IP_DF) &&
|
|
|
- mtu < ntohs(old_iph->tot_len) && !skb_is_gso(skb))) {
|
|
|
+ if (df && mtu < ntohs(old_iph->tot_len) && !skb_is_gso(skb)) {
|
|
|
icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu));
|
|
|
IP_VS_DBG_RL("%s(): frag needed\n", __func__);
|
|
|
goto tx_error_put;
|