aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-02-05 19:11:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-05 19:11:32 -0500
commitcc5724ce10c21cb44f9413266bb100ab89b18e2a (patch)
tree513882a835d54c39a4bed8bc6e405ba55da20ada /net/ipv4
parentf01d1d546abb2f4028b5299092f529eefb01253a (diff)
parenta23f4bbd8d27ac8ddc5d71ace1f91bb503f0469a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: Revert "tcp: Always set urgent pointer if it's beyond snd_nxt" ipv6: Copy cork options in ip6_append_data udp: Fix UDP short packet false positive gianfar: Fix potential soft reset race gianfar: Fix BD_LENGTH_MASK definition cxgb3: Fix lro switch iwlwifi: save PCI state before suspend, restore after resume iwlwifi: clean key table in iwl_clear_stations_table
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_output.c12
-rw-r--r--net/ipv4/udp.c3
2 files changed, 6 insertions, 9 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..cc3a0a06c004 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1231,7 +1231,7 @@ 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 = ip_hdr(skb)->saddr;
@@ -1244,6 +1244,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
1244 if (!pskb_may_pull(skb, sizeof(struct udphdr))) 1244 if (!pskb_may_pull(skb, sizeof(struct udphdr)))
1245 goto drop; /* No space for header. */ 1245 goto drop; /* No space for header. */
1246 1246
1247 uh = udp_hdr(skb);
1247 ulen = ntohs(uh->len); 1248 ulen = ntohs(uh->len);
1248 if (ulen > skb->len) 1249 if (ulen > skb->len)
1249 goto short_packet; 1250 goto short_packet;