aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 51be64e18e32..912402752f2f 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1037,7 +1037,6 @@ error:
1037static int ip_setup_cork(struct sock *sk, struct inet_cork *cork, 1037static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
1038 struct ipcm_cookie *ipc, struct rtable **rtp) 1038 struct ipcm_cookie *ipc, struct rtable **rtp)
1039{ 1039{
1040 struct inet_sock *inet = inet_sk(sk);
1041 struct ip_options_rcu *opt; 1040 struct ip_options_rcu *opt;
1042 struct rtable *rt; 1041 struct rtable *rt;
1043 1042
@@ -1063,8 +1062,8 @@ static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
1063 * We steal reference to this route, caller should not release it 1062 * We steal reference to this route, caller should not release it
1064 */ 1063 */
1065 *rtp = NULL; 1064 *rtp = NULL;
1066 cork->fragsize = inet->pmtudisc == IP_PMTUDISC_PROBE ? 1065 cork->fragsize = ip_sk_use_pmtu(sk) ?
1067 rt->dst.dev->mtu : dst_mtu(&rt->dst); 1066 dst_mtu(&rt->dst) : rt->dst.dev->mtu;
1068 cork->dst = &rt->dst; 1067 cork->dst = &rt->dst;
1069 cork->length = 0; 1068 cork->length = 0;
1070 cork->ttl = ipc->ttl; 1069 cork->ttl = ipc->ttl;
@@ -1315,7 +1314,8 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
1315 /* DF bit is set when we want to see DF on outgoing frames. 1314 /* DF bit is set when we want to see DF on outgoing frames.
1316 * If local_df is set too, we still allow to fragment this frame 1315 * If local_df is set too, we still allow to fragment this frame
1317 * locally. */ 1316 * locally. */
1318 if (inet->pmtudisc >= IP_PMTUDISC_DO || 1317 if (inet->pmtudisc == IP_PMTUDISC_DO ||
1318 inet->pmtudisc == IP_PMTUDISC_PROBE ||
1319 (skb->len <= dst_mtu(&rt->dst) && 1319 (skb->len <= dst_mtu(&rt->dst) &&
1320 ip_dont_fragment(sk, &rt->dst))) 1320 ip_dont_fragment(sk, &rt->dst)))
1321 df = htons(IP_DF); 1321 df = htons(IP_DF);