diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-08 15:24:46 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-08 15:24:46 -0400 |
commit | d15a88fc21ef225768ce31be16edfc9c6e2e02e3 (patch) | |
tree | d4cb0a1bc97973bb947e2667ae56bc4bc2256e9d /net | |
parent | b53471711f21ba0e151075f0e1d6d531eb50f1b1 (diff) | |
parent | 1def630a6a49dda5bc89dfbd86656293640456f0 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_if.c | 19 | ||||
-rw-r--r-- | net/ethernet/Makefile | 1 | ||||
-rw-r--r-- | net/ethernet/sysctl_net_ether.c | 14 | ||||
-rw-r--r-- | net/ipv4/netfilter/Kconfig | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_core.c | 1 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_helper_pptp.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 1 | ||||
-rw-r--r-- | net/ipv4/tcp_highspeed.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 12 | ||||
-rw-r--r-- | net/irda/irlap.c | 3 | ||||
-rw-r--r-- | net/sysctl_net.c | 8 |
11 files changed, 22 insertions, 48 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/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 | ||
5 | obj-y += eth.o | 5 | obj-y += eth.o |
6 | obj-$(CONFIG_SYSCTL) += sysctl_net_ether.o | ||
7 | obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o | 6 | obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o |
8 | obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o | 7 | obj-$(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 | |||
12 | ctl_table ether_table[] = { | ||
13 | {0} | ||
14 | }; | ||
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index 3d560dec63ab..d4072533da21 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig | |||
@@ -170,8 +170,8 @@ config IP_NF_PPTP | |||
170 | Documentation/modules.txt. If unsure, say `N'. | 170 | Documentation/modules.txt. If unsure, say `N'. |
171 | 171 | ||
172 | config IP_NF_H323 | 172 | config IP_NF_H323 |
173 | tristate 'H.323 protocol support' | 173 | tristate 'H.323 protocol support (EXPERIMENTAL)' |
174 | depends on IP_NF_CONNTRACK | 174 | depends on IP_NF_CONNTRACK && EXPERIMENTAL |
175 | help | 175 | help |
176 | H.323 is a VoIP signalling protocol from ITU-T. As one of the most | 176 | H.323 is a VoIP signalling protocol from ITU-T. As one of the most |
177 | important VoIP protocols, it is widely used by voice hardware and | 177 | important VoIP protocols, it is widely used by voice hardware and |
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index 979a2eac6f00..a297da7bbef5 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
@@ -1318,6 +1318,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len) | |||
1318 | .tuple.dst.u.tcp.port; | 1318 | .tuple.dst.u.tcp.port; |
1319 | sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] | 1319 | sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] |
1320 | .tuple.dst.ip; | 1320 | .tuple.dst.ip; |
1321 | memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); | ||
1321 | 1322 | ||
1322 | DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", | 1323 | DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", |
1323 | NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); | 1324 | NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c index 7d3ba4302e9e..8ccfe17bb253 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c | |||
@@ -469,8 +469,8 @@ pptp_inbound_pkt(struct sk_buff **pskb, | |||
469 | DEBUGP("%s but no session\n", pptp_msg_name[msg]); | 469 | DEBUGP("%s but no session\n", pptp_msg_name[msg]); |
470 | break; | 470 | break; |
471 | } | 471 | } |
472 | if (info->sstate != PPTP_CALL_IN_REP | 472 | if (info->cstate != PPTP_CALL_IN_REP |
473 | && info->sstate != PPTP_CALL_IN_CONF) { | 473 | && info->cstate != PPTP_CALL_IN_CONF) { |
474 | DEBUGP("%s but never sent IN_CALL_REPLY\n", | 474 | DEBUGP("%s but never sent IN_CALL_REPLY\n", |
475 | pptp_msg_name[msg]); | 475 | pptp_msg_name[msg]); |
476 | break; | 476 | break; |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 5bc9f64d7b5b..77d974443c7b 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -348,6 +348,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len) | |||
348 | .tuple.dst.u.tcp.port; | 348 | .tuple.dst.u.tcp.port; |
349 | sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] | 349 | sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] |
350 | .tuple.dst.u3.ip; | 350 | .tuple.dst.u3.ip; |
351 | memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); | ||
351 | 352 | ||
352 | DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", | 353 | DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", |
353 | NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); | 354 | NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); |
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c index b72fa55dfb84..ba7c63ca5bb1 100644 --- a/net/ipv4/tcp_highspeed.c +++ b/net/ipv4/tcp_highspeed.c | |||
@@ -135,7 +135,8 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, | |||
135 | 135 | ||
136 | /* Do additive increase */ | 136 | /* Do additive increase */ |
137 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) { | 137 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) { |
138 | tp->snd_cwnd_cnt += ca->ai; | 138 | /* cwnd = cwnd + a(w) / cwnd */ |
139 | tp->snd_cwnd_cnt += ca->ai + 1; | ||
139 | if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { | 140 | if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { |
140 | tp->snd_cwnd_cnt -= tp->snd_cwnd; | 141 | tp->snd_cwnd_cnt -= tp->snd_cwnd; |
141 | tp->snd_cwnd++; | 142 | tp->snd_cwnd++; |
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 | */ |
645 | static unsigned char *__pskb_trim_head(struct sk_buff *skb, int len) | 645 | static 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 | ||
673 | int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) | 672 | int 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, |