aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2006-06-13 15:38:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-06-13 15:38:11 -0400
commit76df73ff90e99681a99e457aec4cfe0a240b7982 (patch)
tree0a6302b1a8e5d11aeed8aa49f7e846f35aad4f5a /net
parent5c601d0c942f5aaf7f3cff7e08f61047d70a964e (diff)
parent86bc843a268058df558844b6bf64531617fbc698 (diff)
Merge branch 'from-linus' into upstream
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_if.c19
-rw-r--r--net/dccp/ackvec.c1
-rw-r--r--net/ethernet/Makefile1
-rw-r--r--net/ethernet/sysctl_net_ether.c14
-rw-r--r--net/ipv4/ip_forward.c1
-rw-r--r--net/ipv4/tcp_input.c4
-rw-r--r--net/ipv4/tcp_output.c12
-rw-r--r--net/irda/irlap.c3
-rw-r--r--net/sysctl_net.c8
9 files changed, 17 insertions, 46 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index ad1c7af65ec8..f5d47bf4f967 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -300,25 +300,20 @@ int br_add_bridge(const char *name)
300 rtnl_lock(); 300 rtnl_lock();
301 if (strchr(dev->name, '%')) { 301 if (strchr(dev->name, '%')) {
302 ret = dev_alloc_name(dev, dev->name); 302 ret = dev_alloc_name(dev, dev->name);
303 if (ret < 0) 303 if (ret < 0) {
304 goto err1; 304 free_netdev(dev);
305 goto out;
306 }
305 } 307 }
306 308
307 ret = register_netdevice(dev); 309 ret = register_netdevice(dev);
308 if (ret) 310 if (ret)
309 goto err2; 311 goto out;
310 312
311 ret = br_sysfs_addbr(dev); 313 ret = br_sysfs_addbr(dev);
312 if (ret) 314 if (ret)
313 goto err3; 315 unregister_netdevice(dev);
314 rtnl_unlock(); 316 out:
315 return 0;
316
317 err3:
318 unregister_netdev(dev);
319 err2:
320 free_netdev(dev);
321 err1:
322 rtnl_unlock(); 317 rtnl_unlock();
323 return ret; 318 return ret;
324} 319}
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c
index b5981e5f6b00..8c211c58893b 100644
--- a/net/dccp/ackvec.c
+++ b/net/dccp/ackvec.c
@@ -452,6 +452,7 @@ found:
452 (unsigned long long) 452 (unsigned long long)
453 avr->dccpavr_ack_ackno); 453 avr->dccpavr_ack_ackno);
454 dccp_ackvec_throw_record(av, avr); 454 dccp_ackvec_throw_record(av, avr);
455 break;
455 } 456 }
456 /* 457 /*
457 * If it wasn't received, continue scanning... we might 458 * If it wasn't received, continue scanning... we might
diff --git a/net/ethernet/Makefile b/net/ethernet/Makefile
index 69b74a9a0fc3..7cef1d8ace27 100644
--- a/net/ethernet/Makefile
+++ b/net/ethernet/Makefile
@@ -3,6 +3,5 @@
3# 3#
4 4
5obj-y += eth.o 5obj-y += eth.o
6obj-$(CONFIG_SYSCTL) += sysctl_net_ether.o
7obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o 6obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o
8obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o 7obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o
diff --git a/net/ethernet/sysctl_net_ether.c b/net/ethernet/sysctl_net_ether.c
deleted file mode 100644
index 66b39fc342d2..000000000000
--- a/net/ethernet/sysctl_net_ether.c
+++ /dev/null
@@ -1,14 +0,0 @@
1/* -*- linux-c -*-
2 * sysctl_net_ether.c: sysctl interface to net Ethernet subsystem.
3 *
4 * Begun April 1, 1996, Mike Shaver.
5 * Added /proc/sys/net/ether directory entry (empty =) ). [MS]
6 */
7
8#include <linux/mm.h>
9#include <linux/sysctl.h>
10#include <linux/if_ether.h>
11
12ctl_table ether_table[] = {
13 {0}
14};
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index 0923add122b4..9f0bb529ab70 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -116,6 +116,7 @@ sr_failed:
116 116
117too_many_hops: 117too_many_hops:
118 /* Tell the sender its packet died... */ 118 /* Tell the sender its packet died... */
119 IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
119 icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0); 120 icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0);
120drop: 121drop:
121 kfree_skb(skb); 122 kfree_skb(skb);
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 4a538bc1683d..b5521a9d3dc1 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1649,7 +1649,7 @@ static void tcp_update_scoreboard(struct sock *sk, struct tcp_sock *tp)
1649 * Hence, we can detect timed out packets during fast 1649 * Hence, we can detect timed out packets during fast
1650 * retransmit without falling to slow start. 1650 * retransmit without falling to slow start.
1651 */ 1651 */
1652 if (tcp_head_timedout(sk, tp)) { 1652 if (!IsReno(tp) && tcp_head_timedout(sk, tp)) {
1653 struct sk_buff *skb; 1653 struct sk_buff *skb;
1654 1654
1655 skb = tp->scoreboard_skb_hint ? tp->scoreboard_skb_hint 1655 skb = tp->scoreboard_skb_hint ? tp->scoreboard_skb_hint
@@ -1662,8 +1662,6 @@ static void tcp_update_scoreboard(struct sock *sk, struct tcp_sock *tp)
1662 if (!(TCP_SKB_CB(skb)->sacked&TCPCB_TAGBITS)) { 1662 if (!(TCP_SKB_CB(skb)->sacked&TCPCB_TAGBITS)) {
1663 TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; 1663 TCP_SKB_CB(skb)->sacked |= TCPCB_LOST;
1664 tp->lost_out += tcp_skb_pcount(skb); 1664 tp->lost_out += tcp_skb_pcount(skb);
1665 if (IsReno(tp))
1666 tcp_remove_reno_sacks(sk, tp, tcp_skb_pcount(skb) + 1);
1667 1665
1668 /* clear xmit_retrans hint */ 1666 /* clear xmit_retrans hint */
1669 if (tp->retransmit_skb_hint && 1667 if (tp->retransmit_skb_hint &&
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 743016baa048..f33c9dddaa12 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -642,7 +642,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
642 * eventually). The difference is that pulled data not copied, but 642 * eventually). The difference is that pulled data not copied, but
643 * immediately discarded. 643 * immediately discarded.
644 */ 644 */
645static unsigned char *__pskb_trim_head(struct sk_buff *skb, int len) 645static void __pskb_trim_head(struct sk_buff *skb, int len)
646{ 646{
647 int i, k, eat; 647 int i, k, eat;
648 648
@@ -667,7 +667,6 @@ static unsigned char *__pskb_trim_head(struct sk_buff *skb, int len)
667 skb->tail = skb->data; 667 skb->tail = skb->data;
668 skb->data_len -= len; 668 skb->data_len -= len;
669 skb->len = skb->data_len; 669 skb->len = skb->data_len;
670 return skb->tail;
671} 670}
672 671
673int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) 672int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len)
@@ -676,12 +675,11 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len)
676 pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) 675 pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
677 return -ENOMEM; 676 return -ENOMEM;
678 677
679 if (len <= skb_headlen(skb)) { 678 /* If len == headlen, we avoid __skb_pull to preserve alignment. */
679 if (unlikely(len < skb_headlen(skb)))
680 __skb_pull(skb, len); 680 __skb_pull(skb, len);
681 } else { 681 else
682 if (__pskb_trim_head(skb, len-skb_headlen(skb)) == NULL) 682 __pskb_trim_head(skb, len - skb_headlen(skb));
683 return -ENOMEM;
684 }
685 683
686 TCP_SKB_CB(skb)->seq += len; 684 TCP_SKB_CB(skb)->seq += len;
687 skb->ip_summed = CHECKSUM_HW; 685 skb->ip_summed = CHECKSUM_HW;
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index 7029618f5719..a16528657b4c 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -884,7 +884,8 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
884 if (now) { 884 if (now) {
885 /* Send down empty frame to trigger speed change */ 885 /* Send down empty frame to trigger speed change */
886 skb = dev_alloc_skb(0); 886 skb = dev_alloc_skb(0);
887 irlap_queue_xmit(self, skb); 887 if (skb)
888 irlap_queue_xmit(self, skb);
888 } 889 }
889} 890}
890 891
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index 55538f6b60ff..58a1b6b42ddd 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -37,14 +37,6 @@ struct ctl_table net_table[] = {
37 .mode = 0555, 37 .mode = 0555,
38 .child = core_table, 38 .child = core_table,
39 }, 39 },
40#ifdef CONFIG_NET
41 {
42 .ctl_name = NET_ETHER,
43 .procname = "ethernet",
44 .mode = 0555,
45 .child = ether_table,
46 },
47#endif
48#ifdef CONFIG_INET 40#ifdef CONFIG_INET
49 { 41 {
50 .ctl_name = NET_IPV4, 42 .ctl_name = NET_IPV4,