diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-07 05:52:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-07 05:52:44 -0500 |
commit | 409f0a9014fe24d906ba21aaccff80eb7f7304da (patch) | |
tree | 8d9a6946d6cf1c5aab72651a193ff860651e5e65 /net/ipv4 | |
parent | 593721833d2a3987736467144ad062a709d3a72c (diff) | |
parent | 0b492fce3d72d982a7981905f85484a1e1ba7fde (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_output.c | 12 | ||||
-rw-r--r-- | net/ipv4/udp.c | 9 |
2 files changed, 10 insertions, 11 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 557fe16cbfb0..dda42f0bd7a3 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -663,14 +663,10 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
663 | th->urg_ptr = 0; | 663 | th->urg_ptr = 0; |
664 | 664 | ||
665 | /* The urg_mode check is necessary during a below snd_una win probe */ | 665 | /* The urg_mode check is necessary during a below snd_una win probe */ |
666 | if (unlikely(tcp_urg_mode(tp))) { | 666 | if (unlikely(tcp_urg_mode(tp) && |
667 | if (between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF)) { | 667 | between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF))) { |
668 | th->urg_ptr = htons(tp->snd_up - tcb->seq); | 668 | th->urg_ptr = htons(tp->snd_up - tcb->seq); |
669 | th->urg = 1; | 669 | th->urg = 1; |
670 | } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { | ||
671 | th->urg_ptr = 0xFFFF; | ||
672 | th->urg = 1; | ||
673 | } | ||
674 | } | 670 | } |
675 | 671 | ||
676 | tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location); | 672 | tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location); |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 1ab180bad72a..c47c989cb1fb 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1231,11 +1231,10 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1231 | int proto) | 1231 | int proto) |
1232 | { | 1232 | { |
1233 | struct sock *sk; | 1233 | struct sock *sk; |
1234 | struct udphdr *uh = udp_hdr(skb); | 1234 | struct udphdr *uh; |
1235 | unsigned short ulen; | 1235 | unsigned short ulen; |
1236 | struct rtable *rt = (struct rtable*)skb->dst; | 1236 | struct rtable *rt = (struct rtable*)skb->dst; |
1237 | __be32 saddr = ip_hdr(skb)->saddr; | 1237 | __be32 saddr, daddr; |
1238 | __be32 daddr = ip_hdr(skb)->daddr; | ||
1239 | struct net *net = dev_net(skb->dev); | 1238 | struct net *net = dev_net(skb->dev); |
1240 | 1239 | ||
1241 | /* | 1240 | /* |
@@ -1244,6 +1243,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1244 | if (!pskb_may_pull(skb, sizeof(struct udphdr))) | 1243 | if (!pskb_may_pull(skb, sizeof(struct udphdr))) |
1245 | goto drop; /* No space for header. */ | 1244 | goto drop; /* No space for header. */ |
1246 | 1245 | ||
1246 | uh = udp_hdr(skb); | ||
1247 | ulen = ntohs(uh->len); | 1247 | ulen = ntohs(uh->len); |
1248 | if (ulen > skb->len) | 1248 | if (ulen > skb->len) |
1249 | goto short_packet; | 1249 | goto short_packet; |
@@ -1258,6 +1258,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1258 | if (udp4_csum_init(skb, uh, proto)) | 1258 | if (udp4_csum_init(skb, uh, proto)) |
1259 | goto csum_error; | 1259 | goto csum_error; |
1260 | 1260 | ||
1261 | saddr = ip_hdr(skb)->saddr; | ||
1262 | daddr = ip_hdr(skb)->daddr; | ||
1263 | |||
1261 | if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) | 1264 | if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) |
1262 | return __udp4_lib_mcast_deliver(net, skb, uh, | 1265 | return __udp4_lib_mcast_deliver(net, skb, uh, |
1263 | saddr, daddr, udptable); | 1266 | saddr, daddr, udptable); |