diff options
| author | John W. Linville <linville@tuxdriver.com> | 2006-03-15 17:02:08 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-03-15 17:02:08 -0500 |
| commit | dd288e7d75b9041f79fecae77d61cfa345da7266 (patch) | |
| tree | 85ff1d1ea0fe1d6eae0b6819422d5c6c05f862cd /net | |
| parent | 30dcbf29cc6d92d70fa262e79e84011fe6913bed (diff) | |
| parent | 72df16f109b73be37977a26d342e9103e8851cb6 (diff) | |
Merge branch 'upstream-fixes'
Diffstat (limited to 'net')
| -rw-r--r-- | net/bridge/netfilter/Makefile | 2 | ||||
| -rw-r--r-- | net/ieee80211/ieee80211_crypt_ccmp.c | 2 | ||||
| -rw-r--r-- | net/ieee80211/ieee80211_rx.c | 4 | ||||
| -rw-r--r-- | net/ipv4/ip_output.c | 7 | ||||
| -rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 2 | ||||
| -rw-r--r-- | net/ipv4/tcp_highspeed.c | 2 | ||||
| -rw-r--r-- | net/ipv4/tcp_output.c | 4 | ||||
| -rw-r--r-- | net/ipv6/addrconf.c | 2 | ||||
| -rw-r--r-- | net/ipv6/ah6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/inet6_hashtables.c | 6 | ||||
| -rw-r--r-- | net/ipv6/ip6_output.c | 7 | ||||
| -rw-r--r-- | net/netfilter/nfnetlink_queue.c | 6 | ||||
| -rw-r--r-- | net/netlink/af_netlink.c | 5 | ||||
| -rw-r--r-- | net/sched/act_api.c | 2 | ||||
| -rw-r--r-- | net/sunrpc/clnt.c | 3 | ||||
| -rw-r--r-- | net/sunrpc/sched.c | 13 |
16 files changed, 41 insertions, 28 deletions
diff --git a/net/bridge/netfilter/Makefile b/net/bridge/netfilter/Makefile index 8bf6d9f6e9d3..905087e0d485 100644 --- a/net/bridge/netfilter/Makefile +++ b/net/bridge/netfilter/Makefile | |||
| @@ -29,4 +29,4 @@ obj-$(CONFIG_BRIDGE_EBT_SNAT) += ebt_snat.o | |||
| 29 | 29 | ||
| 30 | # watchers | 30 | # watchers |
| 31 | obj-$(CONFIG_BRIDGE_EBT_LOG) += ebt_log.o | 31 | obj-$(CONFIG_BRIDGE_EBT_LOG) += ebt_log.o |
| 32 | obj-$(CONFIG_BRIDGE_EBT_LOG) += ebt_ulog.o | 32 | obj-$(CONFIG_BRIDGE_EBT_ULOG) += ebt_ulog.o |
diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c index 097bcea2129f..78b2d13e80e3 100644 --- a/net/ieee80211/ieee80211_crypt_ccmp.c +++ b/net/ieee80211/ieee80211_crypt_ccmp.c | |||
| @@ -131,7 +131,7 @@ static void ccmp_init_blocks(struct crypto_tfm *tfm, | |||
| 131 | a4_included = ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == | 131 | a4_included = ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == |
| 132 | (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)); | 132 | (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)); |
| 133 | qc_included = ((WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA) && | 133 | qc_included = ((WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA) && |
| 134 | (WLAN_FC_GET_STYPE(fc) & 0x08)); | 134 | (WLAN_FC_GET_STYPE(fc) & IEEE80211_STYPE_QOS_DATA)); |
| 135 | aad_len = 22; | 135 | aad_len = 22; |
| 136 | if (a4_included) | 136 | if (a4_included) |
| 137 | aad_len += 6; | 137 | aad_len += 6; |
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 6b8469da29b1..785d5a170a7f 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
| @@ -1515,10 +1515,10 @@ static void ieee80211_process_probe_response(struct ieee80211_device | |||
| 1515 | 1515 | ||
| 1516 | if (is_beacon(beacon->header.frame_ctl)) { | 1516 | if (is_beacon(beacon->header.frame_ctl)) { |
| 1517 | if (ieee->handle_beacon != NULL) | 1517 | if (ieee->handle_beacon != NULL) |
| 1518 | ieee->handle_beacon(dev, beacon, &network); | 1518 | ieee->handle_beacon(dev, beacon, target); |
| 1519 | } else { | 1519 | } else { |
| 1520 | if (ieee->handle_probe_response != NULL) | 1520 | if (ieee->handle_probe_response != NULL) |
| 1521 | ieee->handle_probe_response(dev, beacon, &network); | 1521 | ieee->handle_probe_response(dev, beacon, target); |
| 1522 | } | 1522 | } |
| 1523 | } | 1523 | } |
| 1524 | 1524 | ||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 57d290d89ec2..8ee4d016740d 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
| @@ -847,10 +847,11 @@ int ip_append_data(struct sock *sk, | |||
| 847 | if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) && | 847 | if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) && |
| 848 | (rt->u.dst.dev->features & NETIF_F_UFO)) { | 848 | (rt->u.dst.dev->features & NETIF_F_UFO)) { |
| 849 | 849 | ||
| 850 | if(ip_ufo_append_data(sk, getfrag, from, length, hh_len, | 850 | err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, |
| 851 | fragheaderlen, transhdrlen, mtu, flags)) | 851 | fragheaderlen, transhdrlen, mtu, |
| 852 | flags); | ||
| 853 | if (err) | ||
| 852 | goto error; | 854 | goto error; |
| 853 | |||
| 854 | return 0; | 855 | return 0; |
| 855 | } | 856 | } |
| 856 | 857 | ||
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index dd1048be8a01..7d7ab94a7a2e 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
| @@ -771,7 +771,7 @@ static int get_entries(const struct arpt_get_entries *entries, | |||
| 771 | struct arpt_table *t; | 771 | struct arpt_table *t; |
| 772 | 772 | ||
| 773 | t = xt_find_table_lock(NF_ARP, entries->name); | 773 | t = xt_find_table_lock(NF_ARP, entries->name); |
| 774 | if (t || !IS_ERR(t)) { | 774 | if (t && !IS_ERR(t)) { |
| 775 | struct xt_table_info *private = t->private; | 775 | struct xt_table_info *private = t->private; |
| 776 | duprintf("t->private->number = %u\n", | 776 | duprintf("t->private->number = %u\n", |
| 777 | private->number); | 777 | private->number); |
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c index 63cf7e540847..e0e9d1383c7c 100644 --- a/net/ipv4/tcp_highspeed.c +++ b/net/ipv4/tcp_highspeed.c | |||
| @@ -125,7 +125,7 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, | |||
| 125 | /* Update AIMD parameters */ | 125 | /* Update AIMD parameters */ |
| 126 | if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) { | 126 | if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) { |
| 127 | while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && | 127 | while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && |
| 128 | ca->ai < HSTCP_AIMD_MAX) | 128 | ca->ai < HSTCP_AIMD_MAX - 1) |
| 129 | ca->ai++; | 129 | ca->ai++; |
| 130 | } else if (tp->snd_cwnd < hstcp_aimd_vals[ca->ai].cwnd) { | 130 | } else if (tp->snd_cwnd < hstcp_aimd_vals[ca->ai].cwnd) { |
| 131 | while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && | 131 | while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index a7623ead39a8..9f498a6c8895 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
| @@ -1036,6 +1036,10 @@ static int tcp_tso_should_defer(struct sock *sk, struct tcp_sock *tp, struct sk_ | |||
| 1036 | 1036 | ||
| 1037 | limit = min(send_win, cong_win); | 1037 | limit = min(send_win, cong_win); |
| 1038 | 1038 | ||
| 1039 | /* If a full-sized TSO skb can be sent, do it. */ | ||
| 1040 | if (limit >= 65536) | ||
| 1041 | return 0; | ||
| 1042 | |||
| 1039 | if (sysctl_tcp_tso_win_divisor) { | 1043 | if (sysctl_tcp_tso_win_divisor) { |
| 1040 | u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); | 1044 | u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); |
| 1041 | 1045 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index b7d8822c1be4..19727d941962 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -822,7 +822,7 @@ struct ipv6_saddr_score { | |||
| 822 | int addr_type; | 822 | int addr_type; |
| 823 | unsigned int attrs; | 823 | unsigned int attrs; |
| 824 | int matchlen; | 824 | int matchlen; |
| 825 | unsigned int scope; | 825 | int scope; |
| 826 | unsigned int rule; | 826 | unsigned int rule; |
| 827 | }; | 827 | }; |
| 828 | 828 | ||
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index c7932cb420a5..84963749ab77 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
| @@ -279,7 +279,7 @@ static int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struc | |||
| 279 | goto out; | 279 | goto out; |
| 280 | memcpy(tmp_hdr, skb->nh.raw, hdr_len); | 280 | memcpy(tmp_hdr, skb->nh.raw, hdr_len); |
| 281 | if (ipv6_clear_mutable_options(skb->nh.ipv6h, hdr_len)) | 281 | if (ipv6_clear_mutable_options(skb->nh.ipv6h, hdr_len)) |
| 282 | goto out; | 282 | goto free_out; |
| 283 | skb->nh.ipv6h->priority = 0; | 283 | skb->nh.ipv6h->priority = 0; |
| 284 | skb->nh.ipv6h->flow_lbl[0] = 0; | 284 | skb->nh.ipv6h->flow_lbl[0] = 0; |
| 285 | skb->nh.ipv6h->flow_lbl[1] = 0; | 285 | skb->nh.ipv6h->flow_lbl[1] = 0; |
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index 4154f3a8b6cf..bb8ffb8a14c5 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
| @@ -87,7 +87,7 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, | |||
| 87 | struct inet_timewait_sock **twp) | 87 | struct inet_timewait_sock **twp) |
| 88 | { | 88 | { |
| 89 | struct inet_hashinfo *hinfo = death_row->hashinfo; | 89 | struct inet_hashinfo *hinfo = death_row->hashinfo; |
| 90 | const struct inet_sock *inet = inet_sk(sk); | 90 | struct inet_sock *inet = inet_sk(sk); |
| 91 | const struct ipv6_pinfo *np = inet6_sk(sk); | 91 | const struct ipv6_pinfo *np = inet6_sk(sk); |
| 92 | const struct in6_addr *daddr = &np->rcv_saddr; | 92 | const struct in6_addr *daddr = &np->rcv_saddr; |
| 93 | const struct in6_addr *saddr = &np->daddr; | 93 | const struct in6_addr *saddr = &np->daddr; |
| @@ -129,6 +129,10 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, | |||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | unique: | 131 | unique: |
| 132 | /* Must record num and sport now. Otherwise we will see | ||
| 133 | * in hash table socket with a funny identity. */ | ||
| 134 | inet->num = lport; | ||
| 135 | inet->sport = htons(lport); | ||
| 132 | BUG_TRAP(sk_unhashed(sk)); | 136 | BUG_TRAP(sk_unhashed(sk)); |
| 133 | __sk_add_node(sk, &head->chain); | 137 | __sk_add_node(sk, &head->chain); |
| 134 | sk->sk_hash = hash; | 138 | sk->sk_hash = hash; |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index f999edd846a9..5bf70b1442ea 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
| @@ -944,10 +944,11 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, | |||
| 944 | if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) && | 944 | if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) && |
| 945 | (rt->u.dst.dev->features & NETIF_F_UFO)) { | 945 | (rt->u.dst.dev->features & NETIF_F_UFO)) { |
| 946 | 946 | ||
| 947 | if(ip6_ufo_append_data(sk, getfrag, from, length, hh_len, | 947 | err = ip6_ufo_append_data(sk, getfrag, from, length, hh_len, |
| 948 | fragheaderlen, transhdrlen, mtu, flags)) | 948 | fragheaderlen, transhdrlen, mtu, |
| 949 | flags); | ||
| 950 | if (err) | ||
| 949 | goto error; | 951 | goto error; |
| 950 | |||
| 951 | return 0; | 952 | return 0; |
| 952 | } | 953 | } |
| 953 | 954 | ||
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index cac38b2e147a..2cf5fb8322c4 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
| @@ -928,8 +928,12 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb, | |||
| 928 | 928 | ||
| 929 | if (nfqa[NFQA_CFG_PARAMS-1]) { | 929 | if (nfqa[NFQA_CFG_PARAMS-1]) { |
| 930 | struct nfqnl_msg_config_params *params; | 930 | struct nfqnl_msg_config_params *params; |
| 931 | params = NFA_DATA(nfqa[NFQA_CFG_PARAMS-1]); | ||
| 932 | 931 | ||
| 932 | if (!queue) { | ||
| 933 | ret = -ENOENT; | ||
| 934 | goto out_put; | ||
| 935 | } | ||
| 936 | params = NFA_DATA(nfqa[NFQA_CFG_PARAMS-1]); | ||
| 933 | nfqnl_set_mode(queue, params->copy_mode, | 937 | nfqnl_set_mode(queue, params->copy_mode, |
| 934 | ntohl(params->copy_range)); | 938 | ntohl(params->copy_range)); |
| 935 | } | 939 | } |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 6b9772d95872..59dc7d140600 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
| @@ -1194,6 +1194,9 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, | |||
| 1194 | msg->msg_namelen = sizeof(*addr); | 1194 | msg->msg_namelen = sizeof(*addr); |
| 1195 | } | 1195 | } |
| 1196 | 1196 | ||
| 1197 | if (nlk->flags & NETLINK_RECV_PKTINFO) | ||
| 1198 | netlink_cmsg_recv_pktinfo(msg, skb); | ||
| 1199 | |||
| 1197 | if (NULL == siocb->scm) { | 1200 | if (NULL == siocb->scm) { |
| 1198 | memset(&scm, 0, sizeof(scm)); | 1201 | memset(&scm, 0, sizeof(scm)); |
| 1199 | siocb->scm = &scm; | 1202 | siocb->scm = &scm; |
| @@ -1205,8 +1208,6 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, | |||
| 1205 | netlink_dump(sk); | 1208 | netlink_dump(sk); |
| 1206 | 1209 | ||
| 1207 | scm_recv(sock, msg, siocb->scm, flags); | 1210 | scm_recv(sock, msg, siocb->scm, flags); |
| 1208 | if (nlk->flags & NETLINK_RECV_PKTINFO) | ||
| 1209 | netlink_cmsg_recv_pktinfo(msg, skb); | ||
| 1210 | 1211 | ||
| 1211 | out: | 1212 | out: |
| 1212 | netlink_rcv_wake(sk); | 1213 | netlink_rcv_wake(sk); |
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 792ce59940ec..2ffa11c6e8de 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
| @@ -707,7 +707,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | |||
| 707 | 707 | ||
| 708 | rtattr_failure: | 708 | rtattr_failure: |
| 709 | nlmsg_failure: | 709 | nlmsg_failure: |
| 710 | skb_trim(skb, b - skb->data); | 710 | kfree_skb(skb); |
| 711 | return -1; | 711 | return -1; |
| 712 | } | 712 | } |
| 713 | 713 | ||
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index d2f0550c4ba0..d78479782045 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
| @@ -113,7 +113,7 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname, | |||
| 113 | 113 | ||
| 114 | err = -EINVAL; | 114 | err = -EINVAL; |
| 115 | if (!xprt) | 115 | if (!xprt) |
| 116 | goto out_err; | 116 | goto out_no_xprt; |
| 117 | if (vers >= program->nrvers || !(version = program->version[vers])) | 117 | if (vers >= program->nrvers || !(version = program->version[vers])) |
| 118 | goto out_err; | 118 | goto out_err; |
| 119 | 119 | ||
| @@ -182,6 +182,7 @@ out_no_path: | |||
| 182 | kfree(clnt); | 182 | kfree(clnt); |
| 183 | out_err: | 183 | out_err: |
| 184 | xprt_destroy(xprt); | 184 | xprt_destroy(xprt); |
| 185 | out_no_xprt: | ||
| 185 | return ERR_PTR(err); | 186 | return ERR_PTR(err); |
| 186 | } | 187 | } |
| 187 | 188 | ||
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 802d4fe0f55c..e838d042f7f5 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
| @@ -515,16 +515,14 @@ struct rpc_task * rpc_wake_up_next(struct rpc_wait_queue *queue) | |||
| 515 | */ | 515 | */ |
| 516 | void rpc_wake_up(struct rpc_wait_queue *queue) | 516 | void rpc_wake_up(struct rpc_wait_queue *queue) |
| 517 | { | 517 | { |
| 518 | struct rpc_task *task; | 518 | struct rpc_task *task, *next; |
| 519 | |||
| 520 | struct list_head *head; | 519 | struct list_head *head; |
| 520 | |||
| 521 | spin_lock_bh(&queue->lock); | 521 | spin_lock_bh(&queue->lock); |
| 522 | head = &queue->tasks[queue->maxpriority]; | 522 | head = &queue->tasks[queue->maxpriority]; |
| 523 | for (;;) { | 523 | for (;;) { |
| 524 | while (!list_empty(head)) { | 524 | list_for_each_entry_safe(task, next, head, u.tk_wait.list) |
| 525 | task = list_entry(head->next, struct rpc_task, u.tk_wait.list); | ||
| 526 | __rpc_wake_up_task(task); | 525 | __rpc_wake_up_task(task); |
| 527 | } | ||
| 528 | if (head == &queue->tasks[0]) | 526 | if (head == &queue->tasks[0]) |
| 529 | break; | 527 | break; |
| 530 | head--; | 528 | head--; |
| @@ -541,14 +539,13 @@ void rpc_wake_up(struct rpc_wait_queue *queue) | |||
| 541 | */ | 539 | */ |
| 542 | void rpc_wake_up_status(struct rpc_wait_queue *queue, int status) | 540 | void rpc_wake_up_status(struct rpc_wait_queue *queue, int status) |
| 543 | { | 541 | { |
| 542 | struct rpc_task *task, *next; | ||
| 544 | struct list_head *head; | 543 | struct list_head *head; |
| 545 | struct rpc_task *task; | ||
| 546 | 544 | ||
| 547 | spin_lock_bh(&queue->lock); | 545 | spin_lock_bh(&queue->lock); |
| 548 | head = &queue->tasks[queue->maxpriority]; | 546 | head = &queue->tasks[queue->maxpriority]; |
| 549 | for (;;) { | 547 | for (;;) { |
| 550 | while (!list_empty(head)) { | 548 | list_for_each_entry_safe(task, next, head, u.tk_wait.list) { |
| 551 | task = list_entry(head->next, struct rpc_task, u.tk_wait.list); | ||
| 552 | task->tk_status = status; | 549 | task->tk_status = status; |
| 553 | __rpc_wake_up_task(task); | 550 | __rpc_wake_up_task(task); |
| 554 | } | 551 | } |
