diff options
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 17758234a3e3..11c2f68254f0 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -353,7 +353,8 @@ packet_routed: | |||
353 | ip_options_build(skb, opt, inet->daddr, rt, 0); | 353 | ip_options_build(skb, opt, inet->daddr, rt, 0); |
354 | } | 354 | } |
355 | 355 | ||
356 | ip_select_ident_more(iph, &rt->u.dst, sk, skb_shinfo(skb)->tso_segs); | 356 | ip_select_ident_more(iph, &rt->u.dst, sk, |
357 | (skb_shinfo(skb)->tso_segs ?: 1) - 1); | ||
357 | 358 | ||
358 | /* Add an IP checksum. */ | 359 | /* Add an IP checksum. */ |
359 | ip_send_check(iph); | 360 | ip_send_check(iph); |
@@ -1262,10 +1263,8 @@ int ip_push_pending_frames(struct sock *sk) | |||
1262 | 1263 | ||
1263 | out: | 1264 | out: |
1264 | inet->cork.flags &= ~IPCORK_OPT; | 1265 | inet->cork.flags &= ~IPCORK_OPT; |
1265 | if (inet->cork.opt) { | 1266 | kfree(inet->cork.opt); |
1266 | kfree(inet->cork.opt); | 1267 | inet->cork.opt = NULL; |
1267 | inet->cork.opt = NULL; | ||
1268 | } | ||
1269 | if (inet->cork.rt) { | 1268 | if (inet->cork.rt) { |
1270 | ip_rt_put(inet->cork.rt); | 1269 | ip_rt_put(inet->cork.rt); |
1271 | inet->cork.rt = NULL; | 1270 | inet->cork.rt = NULL; |
@@ -1289,10 +1288,8 @@ void ip_flush_pending_frames(struct sock *sk) | |||
1289 | kfree_skb(skb); | 1288 | kfree_skb(skb); |
1290 | 1289 | ||
1291 | inet->cork.flags &= ~IPCORK_OPT; | 1290 | inet->cork.flags &= ~IPCORK_OPT; |
1292 | if (inet->cork.opt) { | 1291 | kfree(inet->cork.opt); |
1293 | kfree(inet->cork.opt); | 1292 | inet->cork.opt = NULL; |
1294 | inet->cork.opt = NULL; | ||
1295 | } | ||
1296 | if (inet->cork.rt) { | 1293 | if (inet->cork.rt) { |
1297 | ip_rt_put(inet->cork.rt); | 1294 | ip_rt_put(inet->cork.rt); |
1298 | inet->cork.rt = NULL; | 1295 | inet->cork.rt = NULL; |