diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-08-06 11:58:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-08-06 11:58:24 -0400 |
commit | cb3f1e7b835f6fe0fc09574381fe54daf6600001 (patch) | |
tree | 80db1baa3e59b65a2bb2db833af8eb336459404f /net | |
parent | 3e3183bab0257a6d02038658c53b491e1378612f (diff) | |
parent | 558e10a57db10de355ee97712d2b6df49e9b7849 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[LAPB]: Fix windowsize check
[TCP]: Fixes IW > 2 cases when TCP is application limited
[PKT_SCHED] RED: Fix overflow in calculation of queue average
[LLX]: SOCK_DGRAM interface fixes
[PKT_SCHED]: Return ENOENT if qdisc module is unavailable
[BRIDGE]: netlink status fix
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_netlink.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 3 | ||||
-rw-r--r-- | net/lapb/lapb_iface.c | 12 | ||||
-rw-r--r-- | net/llc/af_llc.c | 20 | ||||
-rw-r--r-- | net/llc/llc_sap.c | 4 | ||||
-rw-r--r-- | net/sched/sch_api.c | 2 |
6 files changed, 21 insertions, 22 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 06abb6634f5b..53086fb75089 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -85,7 +85,7 @@ void br_ifinfo_notify(int event, struct net_bridge_port *port) | |||
85 | goto err_out; | 85 | goto err_out; |
86 | 86 | ||
87 | err = br_fill_ifinfo(skb, port, current->pid, 0, event, 0); | 87 | err = br_fill_ifinfo(skb, port, current->pid, 0, event, 0); |
88 | if (err) | 88 | if (err < 0) |
89 | goto err_kfree; | 89 | goto err_kfree; |
90 | 90 | ||
91 | NETLINK_CB(skb).dst_group = RTNLGRP_LINK; | 91 | NETLINK_CB(skb).dst_group = RTNLGRP_LINK; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 738dad9f7d49..104af5d5bcbc 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3541,7 +3541,8 @@ void tcp_cwnd_application_limited(struct sock *sk) | |||
3541 | if (inet_csk(sk)->icsk_ca_state == TCP_CA_Open && | 3541 | if (inet_csk(sk)->icsk_ca_state == TCP_CA_Open && |
3542 | sk->sk_socket && !test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) { | 3542 | sk->sk_socket && !test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) { |
3543 | /* Limited by application or receiver window. */ | 3543 | /* Limited by application or receiver window. */ |
3544 | u32 win_used = max(tp->snd_cwnd_used, 2U); | 3544 | u32 init_win = tcp_init_cwnd(tp, __sk_dst_get(sk)); |
3545 | u32 win_used = max(tp->snd_cwnd_used, init_win); | ||
3545 | if (win_used < tp->snd_cwnd) { | 3546 | if (win_used < tp->snd_cwnd) { |
3546 | tp->snd_ssthresh = tcp_current_ssthresh(sk); | 3547 | tp->snd_ssthresh = tcp_current_ssthresh(sk); |
3547 | tp->snd_cwnd = (tp->snd_cwnd + win_used) >> 1; | 3548 | tp->snd_cwnd = (tp->snd_cwnd + win_used) >> 1; |
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index d504eed416f6..7e6bc41eeb21 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c | |||
@@ -238,11 +238,13 @@ int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms) | |||
238 | goto out_put; | 238 | goto out_put; |
239 | 239 | ||
240 | if (lapb->state == LAPB_STATE_0) { | 240 | if (lapb->state == LAPB_STATE_0) { |
241 | if (((parms->mode & LAPB_EXTENDED) && | 241 | if (parms->mode & LAPB_EXTENDED) { |
242 | (parms->window < 1 || parms->window > 127)) || | 242 | if (parms->window < 1 || parms->window > 127) |
243 | (parms->window < 1 || parms->window > 7)) | 243 | goto out_put; |
244 | goto out_put; | 244 | } else { |
245 | 245 | if (parms->window < 1 || parms->window > 7) | |
246 | goto out_put; | ||
247 | } | ||
246 | lapb->mode = parms->mode; | 248 | lapb->mode = parms->mode; |
247 | lapb->window = parms->window; | 249 | lapb->window = parms->window; |
248 | } | 250 | } |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index d6cfe84d521b..2652ead96c64 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -784,24 +784,20 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
784 | copied += used; | 784 | copied += used; |
785 | len -= used; | 785 | len -= used; |
786 | 786 | ||
787 | if (used + offset < skb->len) | ||
788 | continue; | ||
789 | |||
790 | if (!(flags & MSG_PEEK)) { | 787 | if (!(flags & MSG_PEEK)) { |
791 | sk_eat_skb(sk, skb, 0); | 788 | sk_eat_skb(sk, skb, 0); |
792 | *seq = 0; | 789 | *seq = 0; |
793 | } | 790 | } |
791 | |||
792 | /* For non stream protcols we get one packet per recvmsg call */ | ||
793 | if (sk->sk_type != SOCK_STREAM) | ||
794 | goto copy_uaddr; | ||
795 | |||
796 | /* Partial read */ | ||
797 | if (used + offset < skb->len) | ||
798 | continue; | ||
794 | } while (len > 0); | 799 | } while (len > 0); |
795 | 800 | ||
796 | /* | ||
797 | * According to UNIX98, msg_name/msg_namelen are ignored | ||
798 | * on connected socket. -ANK | ||
799 | * But... af_llc still doesn't have separate sets of methods for | ||
800 | * SOCK_DGRAM and SOCK_STREAM :-( So we have to do this test, will | ||
801 | * eventually fix this tho :-) -acme | ||
802 | */ | ||
803 | if (sk->sk_type == SOCK_DGRAM) | ||
804 | goto copy_uaddr; | ||
805 | out: | 801 | out: |
806 | release_sock(sk); | 802 | release_sock(sk); |
807 | return copied; | 803 | return copied; |
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index 20c4eb5c1ac6..42eb0c3a9780 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -51,10 +51,10 @@ void llc_save_primitive(struct sock *sk, struct sk_buff* skb, u8 prim) | |||
51 | { | 51 | { |
52 | struct sockaddr_llc *addr; | 52 | struct sockaddr_llc *addr; |
53 | 53 | ||
54 | if (skb->sk->sk_type == SOCK_STREAM) /* See UNIX98 */ | ||
55 | return; | ||
56 | /* save primitive for use by the user. */ | 54 | /* save primitive for use by the user. */ |
57 | addr = llc_ui_skb_cb(skb); | 55 | addr = llc_ui_skb_cb(skb); |
56 | |||
57 | memset(addr, 0, sizeof(*addr)); | ||
58 | addr->sllc_family = sk->sk_family; | 58 | addr->sllc_family = sk->sk_family; |
59 | addr->sllc_arphrd = skb->dev->type; | 59 | addr->sllc_arphrd = skb->dev->type; |
60 | addr->sllc_test = prim == LLC_TEST_PRIM; | 60 | addr->sllc_test = prim == LLC_TEST_PRIM; |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index c7844bacbbcb..a19eff12cf78 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -430,7 +430,7 @@ qdisc_create(struct net_device *dev, u32 handle, struct rtattr **tca, int *errp) | |||
430 | } | 430 | } |
431 | #endif | 431 | #endif |
432 | 432 | ||
433 | err = -EINVAL; | 433 | err = -ENOENT; |
434 | if (ops == NULL) | 434 | if (ops == NULL) |
435 | goto err_out; | 435 | goto err_out; |
436 | 436 | ||