diff options
author | Shan Wei <shanwei@cn.fujitsu.com> | 2010-04-15 12:43:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-16 02:36:37 -0400 |
commit | 4e15ed4d930297c127d280ca1d0c785be870def4 (patch) | |
tree | e0808d650ae66cf273758496100d3d24739a9e48 /net/ipv4 | |
parent | 0eecb784942792863b77dfe11e0c7e286e92db85 (diff) |
net: replace ipfragok with skb->local_df
As Herbert Xu said: we should be able to simply replace ipfragok
with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
has droped ipfragok and set local_df value properly.
The patch kills the ipfragok parameter of .queue_xmit().
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_output.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index c65f18e0936e..512af81b750f 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -311,7 +311,7 @@ int ip_output(struct sk_buff *skb) | |||
311 | !(IPCB(skb)->flags & IPSKB_REROUTED)); | 311 | !(IPCB(skb)->flags & IPSKB_REROUTED)); |
312 | } | 312 | } |
313 | 313 | ||
314 | int ip_queue_xmit(struct sk_buff *skb, int ipfragok) | 314 | int ip_queue_xmit(struct sk_buff *skb) |
315 | { | 315 | { |
316 | struct sock *sk = skb->sk; | 316 | struct sock *sk = skb->sk; |
317 | struct inet_sock *inet = inet_sk(sk); | 317 | struct inet_sock *inet = inet_sk(sk); |
@@ -370,7 +370,7 @@ packet_routed: | |||
370 | skb_reset_network_header(skb); | 370 | skb_reset_network_header(skb); |
371 | iph = ip_hdr(skb); | 371 | iph = ip_hdr(skb); |
372 | *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff)); | 372 | *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff)); |
373 | if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok) | 373 | if (ip_dont_fragment(sk, &rt->u.dst) && !skb->local_df) |
374 | iph->frag_off = htons(IP_DF); | 374 | iph->frag_off = htons(IP_DF); |
375 | else | 375 | else |
376 | iph->frag_off = 0; | 376 | iph->frag_off = 0; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index e46849989a53..2b7d71fb8439 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -890,7 +890,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
890 | if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq) | 890 | if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq) |
891 | TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS); | 891 | TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS); |
892 | 892 | ||
893 | err = icsk->icsk_af_ops->queue_xmit(skb, 0); | 893 | err = icsk->icsk_af_ops->queue_xmit(skb); |
894 | if (likely(err <= 0)) | 894 | if (likely(err <= 0)) |
895 | return err; | 895 | return err; |
896 | 896 | ||