diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-08-22 14:42:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-08-22 14:42:36 -0400 |
commit | 69758820a42da207bdc775d6eccf1f9fb67cd62e (patch) | |
tree | 4c4dd2b596aa5535231656bf0fa1bc65a8b17471 /net | |
parent | 113b898e38cb20e80847c24154ce62273b948c6a (diff) | |
parent | ef7d1b244fa6c94fb76d5f787b8629df64ea4046 (diff) |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/proc.c | 2 | ||||
-rw-r--r-- | net/bridge/br_if.c | 7 | ||||
-rw-r--r-- | net/core/dev.c | 37 | ||||
-rw-r--r-- | net/core/utils.c | 7 | ||||
-rw-r--r-- | net/ipv4/fib_semantics.c | 12 | ||||
-rw-r--r-- | net/ipv4/igmp.c | 38 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_netlink.c | 17 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 3 | ||||
-rw-r--r-- | net/ipv6/icmp.c | 13 | ||||
-rw-r--r-- | net/ipv6/mcast.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 17 | ||||
-rw-r--r-- | net/netfilter/xt_physdev.c | 1 | ||||
-rw-r--r-- | net/sched/cls_u32.c | 2 |
13 files changed, 91 insertions, 75 deletions
diff --git a/net/atm/proc.c b/net/atm/proc.c index 3f95b0886a6a..91fe5f53ff11 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c | |||
@@ -507,7 +507,7 @@ err_out: | |||
507 | goto out; | 507 | goto out; |
508 | } | 508 | } |
509 | 509 | ||
510 | void __exit atm_proc_exit(void) | 510 | void atm_proc_exit(void) |
511 | { | 511 | { |
512 | atm_proc_dirs_remove(); | 512 | atm_proc_dirs_remove(); |
513 | } | 513 | } |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index f55ef682ef84..b1211d5342f6 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -386,12 +386,17 @@ void br_features_recompute(struct net_bridge *br) | |||
386 | checksum = 0; | 386 | checksum = 0; |
387 | 387 | ||
388 | if (feature & NETIF_F_GSO) | 388 | if (feature & NETIF_F_GSO) |
389 | feature |= NETIF_F_TSO; | 389 | feature |= NETIF_F_GSO_SOFTWARE; |
390 | feature |= NETIF_F_GSO; | 390 | feature |= NETIF_F_GSO; |
391 | 391 | ||
392 | features &= feature; | 392 | features &= feature; |
393 | } | 393 | } |
394 | 394 | ||
395 | if (!(checksum & NETIF_F_ALL_CSUM)) | ||
396 | features &= ~NETIF_F_SG; | ||
397 | if (!(features & NETIF_F_SG)) | ||
398 | features &= ~NETIF_F_GSO_MASK; | ||
399 | |||
395 | br->dev->features = features | checksum | NETIF_F_LLTX | | 400 | br->dev->features = features | checksum | NETIF_F_LLTX | |
396 | NETIF_F_GSO_ROBUST; | 401 | NETIF_F_GSO_ROBUST; |
397 | } | 402 | } |
diff --git a/net/core/dev.c b/net/core/dev.c index d95e2626d944..d4a1ec3bded5 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -116,6 +116,7 @@ | |||
116 | #include <linux/audit.h> | 116 | #include <linux/audit.h> |
117 | #include <linux/dmaengine.h> | 117 | #include <linux/dmaengine.h> |
118 | #include <linux/err.h> | 118 | #include <linux/err.h> |
119 | #include <linux/ctype.h> | ||
119 | 120 | ||
120 | /* | 121 | /* |
121 | * The list of packet types we will receive (as opposed to discard) | 122 | * The list of packet types we will receive (as opposed to discard) |
@@ -632,14 +633,22 @@ struct net_device * dev_get_by_flags(unsigned short if_flags, unsigned short mas | |||
632 | * @name: name string | 633 | * @name: name string |
633 | * | 634 | * |
634 | * Network device names need to be valid file names to | 635 | * Network device names need to be valid file names to |
635 | * to allow sysfs to work | 636 | * to allow sysfs to work. We also disallow any kind of |
637 | * whitespace. | ||
636 | */ | 638 | */ |
637 | int dev_valid_name(const char *name) | 639 | int dev_valid_name(const char *name) |
638 | { | 640 | { |
639 | return !(*name == '\0' | 641 | if (*name == '\0') |
640 | || !strcmp(name, ".") | 642 | return 0; |
641 | || !strcmp(name, "..") | 643 | if (!strcmp(name, ".") || !strcmp(name, "..")) |
642 | || strchr(name, '/')); | 644 | return 0; |
645 | |||
646 | while (*name) { | ||
647 | if (*name == '/' || isspace(*name)) | ||
648 | return 0; | ||
649 | name++; | ||
650 | } | ||
651 | return 1; | ||
643 | } | 652 | } |
644 | 653 | ||
645 | /** | 654 | /** |
@@ -1619,26 +1628,10 @@ static inline struct net_device *skb_bond(struct sk_buff *skb) | |||
1619 | struct net_device *dev = skb->dev; | 1628 | struct net_device *dev = skb->dev; |
1620 | 1629 | ||
1621 | if (dev->master) { | 1630 | if (dev->master) { |
1622 | /* | 1631 | if (skb_bond_should_drop(skb)) { |
1623 | * On bonding slaves other than the currently active | ||
1624 | * slave, suppress duplicates except for 802.3ad | ||
1625 | * ETH_P_SLOW and alb non-mcast/bcast. | ||
1626 | */ | ||
1627 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { | ||
1628 | if (dev->master->priv_flags & IFF_MASTER_ALB) { | ||
1629 | if (skb->pkt_type != PACKET_BROADCAST && | ||
1630 | skb->pkt_type != PACKET_MULTICAST) | ||
1631 | goto keep; | ||
1632 | } | ||
1633 | |||
1634 | if (dev->master->priv_flags & IFF_MASTER_8023AD && | ||
1635 | skb->protocol == __constant_htons(ETH_P_SLOW)) | ||
1636 | goto keep; | ||
1637 | |||
1638 | kfree_skb(skb); | 1632 | kfree_skb(skb); |
1639 | return NULL; | 1633 | return NULL; |
1640 | } | 1634 | } |
1641 | keep: | ||
1642 | skb->dev = dev->master; | 1635 | skb->dev = dev->master; |
1643 | } | 1636 | } |
1644 | 1637 | ||
diff --git a/net/core/utils.c b/net/core/utils.c index 4f96f389243d..e31c90e05594 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
@@ -130,12 +130,13 @@ void __init net_random_init(void) | |||
130 | static int net_random_reseed(void) | 130 | static int net_random_reseed(void) |
131 | { | 131 | { |
132 | int i; | 132 | int i; |
133 | unsigned long seed[NR_CPUS]; | 133 | unsigned long seed; |
134 | 134 | ||
135 | get_random_bytes(seed, sizeof(seed)); | ||
136 | for_each_possible_cpu(i) { | 135 | for_each_possible_cpu(i) { |
137 | struct nrnd_state *state = &per_cpu(net_rand_state,i); | 136 | struct nrnd_state *state = &per_cpu(net_rand_state,i); |
138 | __net_srandom(state, seed[i]); | 137 | |
138 | get_random_bytes(&seed, sizeof(seed)); | ||
139 | __net_srandom(state, seed); | ||
139 | } | 140 | } |
140 | return 0; | 141 | return 0; |
141 | } | 142 | } |
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 9be53a8e72c3..51738000f3dc 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
@@ -159,7 +159,7 @@ void free_fib_info(struct fib_info *fi) | |||
159 | 159 | ||
160 | void fib_release_info(struct fib_info *fi) | 160 | void fib_release_info(struct fib_info *fi) |
161 | { | 161 | { |
162 | write_lock(&fib_info_lock); | 162 | write_lock_bh(&fib_info_lock); |
163 | if (fi && --fi->fib_treeref == 0) { | 163 | if (fi && --fi->fib_treeref == 0) { |
164 | hlist_del(&fi->fib_hash); | 164 | hlist_del(&fi->fib_hash); |
165 | if (fi->fib_prefsrc) | 165 | if (fi->fib_prefsrc) |
@@ -172,7 +172,7 @@ void fib_release_info(struct fib_info *fi) | |||
172 | fi->fib_dead = 1; | 172 | fi->fib_dead = 1; |
173 | fib_info_put(fi); | 173 | fib_info_put(fi); |
174 | } | 174 | } |
175 | write_unlock(&fib_info_lock); | 175 | write_unlock_bh(&fib_info_lock); |
176 | } | 176 | } |
177 | 177 | ||
178 | static __inline__ int nh_comp(const struct fib_info *fi, const struct fib_info *ofi) | 178 | static __inline__ int nh_comp(const struct fib_info *fi, const struct fib_info *ofi) |
@@ -598,7 +598,7 @@ static void fib_hash_move(struct hlist_head *new_info_hash, | |||
598 | unsigned int old_size = fib_hash_size; | 598 | unsigned int old_size = fib_hash_size; |
599 | unsigned int i, bytes; | 599 | unsigned int i, bytes; |
600 | 600 | ||
601 | write_lock(&fib_info_lock); | 601 | write_lock_bh(&fib_info_lock); |
602 | old_info_hash = fib_info_hash; | 602 | old_info_hash = fib_info_hash; |
603 | old_laddrhash = fib_info_laddrhash; | 603 | old_laddrhash = fib_info_laddrhash; |
604 | fib_hash_size = new_size; | 604 | fib_hash_size = new_size; |
@@ -639,7 +639,7 @@ static void fib_hash_move(struct hlist_head *new_info_hash, | |||
639 | } | 639 | } |
640 | fib_info_laddrhash = new_laddrhash; | 640 | fib_info_laddrhash = new_laddrhash; |
641 | 641 | ||
642 | write_unlock(&fib_info_lock); | 642 | write_unlock_bh(&fib_info_lock); |
643 | 643 | ||
644 | bytes = old_size * sizeof(struct hlist_head *); | 644 | bytes = old_size * sizeof(struct hlist_head *); |
645 | fib_hash_free(old_info_hash, bytes); | 645 | fib_hash_free(old_info_hash, bytes); |
@@ -820,7 +820,7 @@ link_it: | |||
820 | 820 | ||
821 | fi->fib_treeref++; | 821 | fi->fib_treeref++; |
822 | atomic_inc(&fi->fib_clntref); | 822 | atomic_inc(&fi->fib_clntref); |
823 | write_lock(&fib_info_lock); | 823 | write_lock_bh(&fib_info_lock); |
824 | hlist_add_head(&fi->fib_hash, | 824 | hlist_add_head(&fi->fib_hash, |
825 | &fib_info_hash[fib_info_hashfn(fi)]); | 825 | &fib_info_hash[fib_info_hashfn(fi)]); |
826 | if (fi->fib_prefsrc) { | 826 | if (fi->fib_prefsrc) { |
@@ -839,7 +839,7 @@ link_it: | |||
839 | head = &fib_info_devhash[hash]; | 839 | head = &fib_info_devhash[hash]; |
840 | hlist_add_head(&nh->nh_hash, head); | 840 | hlist_add_head(&nh->nh_hash, head); |
841 | } endfor_nexthops(fi) | 841 | } endfor_nexthops(fi) |
842 | write_unlock(&fib_info_lock); | 842 | write_unlock_bh(&fib_info_lock); |
843 | return fi; | 843 | return fi; |
844 | 844 | ||
845 | err_inval: | 845 | err_inval: |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 9f4b752f5a33..8e8117c19e4d 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -1793,29 +1793,35 @@ int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr) | |||
1793 | struct in_device *in_dev; | 1793 | struct in_device *in_dev; |
1794 | u32 group = imr->imr_multiaddr.s_addr; | 1794 | u32 group = imr->imr_multiaddr.s_addr; |
1795 | u32 ifindex; | 1795 | u32 ifindex; |
1796 | int ret = -EADDRNOTAVAIL; | ||
1796 | 1797 | ||
1797 | rtnl_lock(); | 1798 | rtnl_lock(); |
1798 | in_dev = ip_mc_find_dev(imr); | 1799 | in_dev = ip_mc_find_dev(imr); |
1799 | if (!in_dev) { | ||
1800 | rtnl_unlock(); | ||
1801 | return -ENODEV; | ||
1802 | } | ||
1803 | ifindex = imr->imr_ifindex; | 1800 | ifindex = imr->imr_ifindex; |
1804 | for (imlp = &inet->mc_list; (iml = *imlp) != NULL; imlp = &iml->next) { | 1801 | for (imlp = &inet->mc_list; (iml = *imlp) != NULL; imlp = &iml->next) { |
1805 | if (iml->multi.imr_multiaddr.s_addr == group && | 1802 | if (iml->multi.imr_multiaddr.s_addr != group) |
1806 | iml->multi.imr_ifindex == ifindex) { | 1803 | continue; |
1807 | (void) ip_mc_leave_src(sk, iml, in_dev); | 1804 | if (ifindex) { |
1805 | if (iml->multi.imr_ifindex != ifindex) | ||
1806 | continue; | ||
1807 | } else if (imr->imr_address.s_addr && imr->imr_address.s_addr != | ||
1808 | iml->multi.imr_address.s_addr) | ||
1809 | continue; | ||
1810 | |||
1811 | (void) ip_mc_leave_src(sk, iml, in_dev); | ||
1808 | 1812 | ||
1809 | *imlp = iml->next; | 1813 | *imlp = iml->next; |
1810 | 1814 | ||
1815 | if (in_dev) | ||
1811 | ip_mc_dec_group(in_dev, group); | 1816 | ip_mc_dec_group(in_dev, group); |
1812 | rtnl_unlock(); | 1817 | rtnl_unlock(); |
1813 | sock_kfree_s(sk, iml, sizeof(*iml)); | 1818 | sock_kfree_s(sk, iml, sizeof(*iml)); |
1814 | return 0; | 1819 | return 0; |
1815 | } | ||
1816 | } | 1820 | } |
1821 | if (!in_dev) | ||
1822 | ret = -ENODEV; | ||
1817 | rtnl_unlock(); | 1823 | rtnl_unlock(); |
1818 | return -EADDRNOTAVAIL; | 1824 | return ret; |
1819 | } | 1825 | } |
1820 | 1826 | ||
1821 | int ip_mc_source(int add, int omode, struct sock *sk, struct | 1827 | int ip_mc_source(int add, int omode, struct sock *sk, struct |
@@ -2199,13 +2205,13 @@ void ip_mc_drop_socket(struct sock *sk) | |||
2199 | struct in_device *in_dev; | 2205 | struct in_device *in_dev; |
2200 | inet->mc_list = iml->next; | 2206 | inet->mc_list = iml->next; |
2201 | 2207 | ||
2202 | if ((in_dev = inetdev_by_index(iml->multi.imr_ifindex)) != NULL) { | 2208 | in_dev = inetdev_by_index(iml->multi.imr_ifindex); |
2203 | (void) ip_mc_leave_src(sk, iml, in_dev); | 2209 | (void) ip_mc_leave_src(sk, iml, in_dev); |
2210 | if (in_dev != NULL) { | ||
2204 | ip_mc_dec_group(in_dev, iml->multi.imr_multiaddr.s_addr); | 2211 | ip_mc_dec_group(in_dev, iml->multi.imr_multiaddr.s_addr); |
2205 | in_dev_put(in_dev); | 2212 | in_dev_put(in_dev); |
2206 | } | 2213 | } |
2207 | sock_kfree_s(sk, iml, sizeof(*iml)); | 2214 | sock_kfree_s(sk, iml, sizeof(*iml)); |
2208 | |||
2209 | } | 2215 | } |
2210 | rtnl_unlock(); | 2216 | rtnl_unlock(); |
2211 | } | 2217 | } |
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index 33891bb1fde4..0d4cc92391fa 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c | |||
@@ -415,21 +415,18 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb) | |||
415 | cb->args[0], *id); | 415 | cb->args[0], *id); |
416 | 416 | ||
417 | read_lock_bh(&ip_conntrack_lock); | 417 | read_lock_bh(&ip_conntrack_lock); |
418 | last = (struct ip_conntrack *)cb->args[1]; | ||
418 | for (; cb->args[0] < ip_conntrack_htable_size; cb->args[0]++) { | 419 | for (; cb->args[0] < ip_conntrack_htable_size; cb->args[0]++) { |
419 | restart: | 420 | restart: |
420 | last = (struct ip_conntrack *)cb->args[1]; | ||
421 | list_for_each_prev(i, &ip_conntrack_hash[cb->args[0]]) { | 421 | list_for_each_prev(i, &ip_conntrack_hash[cb->args[0]]) { |
422 | h = (struct ip_conntrack_tuple_hash *) i; | 422 | h = (struct ip_conntrack_tuple_hash *) i; |
423 | if (DIRECTION(h) != IP_CT_DIR_ORIGINAL) | 423 | if (DIRECTION(h) != IP_CT_DIR_ORIGINAL) |
424 | continue; | 424 | continue; |
425 | ct = tuplehash_to_ctrack(h); | 425 | ct = tuplehash_to_ctrack(h); |
426 | if (last != NULL) { | 426 | if (cb->args[1]) { |
427 | if (ct == last) { | 427 | if (ct != last) |
428 | ip_conntrack_put(last); | ||
429 | cb->args[1] = 0; | ||
430 | last = NULL; | ||
431 | } else | ||
432 | continue; | 428 | continue; |
429 | cb->args[1] = 0; | ||
433 | } | 430 | } |
434 | if (ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).pid, | 431 | if (ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).pid, |
435 | cb->nlh->nlmsg_seq, | 432 | cb->nlh->nlmsg_seq, |
@@ -440,17 +437,17 @@ restart: | |||
440 | goto out; | 437 | goto out; |
441 | } | 438 | } |
442 | } | 439 | } |
443 | if (last != NULL) { | 440 | if (cb->args[1]) { |
444 | ip_conntrack_put(last); | ||
445 | cb->args[1] = 0; | 441 | cb->args[1] = 0; |
446 | goto restart; | 442 | goto restart; |
447 | } | 443 | } |
448 | } | 444 | } |
449 | out: | 445 | out: |
450 | read_unlock_bh(&ip_conntrack_lock); | 446 | read_unlock_bh(&ip_conntrack_lock); |
447 | if (last) | ||
448 | ip_conntrack_put(last); | ||
451 | 449 | ||
452 | DEBUGP("leaving, last bucket=%lu id=%u\n", cb->args[0], *id); | 450 | DEBUGP("leaving, last bucket=%lu id=%u\n", cb->args[0], *id); |
453 | |||
454 | return skb->len; | 451 | return skb->len; |
455 | } | 452 | } |
456 | 453 | ||
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index f316ff5fd8a6..048514f15f2f 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -230,7 +230,7 @@ ipt_do_table(struct sk_buff **pskb, | |||
230 | const char *indev, *outdev; | 230 | const char *indev, *outdev; |
231 | void *table_base; | 231 | void *table_base; |
232 | struct ipt_entry *e, *back; | 232 | struct ipt_entry *e, *back; |
233 | struct xt_table_info *private = table->private; | 233 | struct xt_table_info *private; |
234 | 234 | ||
235 | /* Initialization */ | 235 | /* Initialization */ |
236 | ip = (*pskb)->nh.iph; | 236 | ip = (*pskb)->nh.iph; |
@@ -247,6 +247,7 @@ ipt_do_table(struct sk_buff **pskb, | |||
247 | 247 | ||
248 | read_lock_bh(&table->lock); | 248 | read_lock_bh(&table->lock); |
249 | IP_NF_ASSERT(table->valid_hooks & (1 << hook)); | 249 | IP_NF_ASSERT(table->valid_hooks & (1 << hook)); |
250 | private = table->private; | ||
250 | table_base = (void *)private->entries[smp_processor_id()]; | 251 | table_base = (void *)private->entries[smp_processor_id()]; |
251 | e = get_entry(table_base, private->hook_entry[hook]); | 252 | e = get_entry(table_base, private->hook_entry[hook]); |
252 | 253 | ||
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 1044b6fce0d5..3d6e9a351150 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -712,6 +712,11 @@ discard_it: | |||
712 | return 0; | 712 | return 0; |
713 | } | 713 | } |
714 | 714 | ||
715 | /* | ||
716 | * Special lock-class for __icmpv6_socket: | ||
717 | */ | ||
718 | static struct lock_class_key icmpv6_socket_sk_dst_lock_key; | ||
719 | |||
715 | int __init icmpv6_init(struct net_proto_family *ops) | 720 | int __init icmpv6_init(struct net_proto_family *ops) |
716 | { | 721 | { |
717 | struct sock *sk; | 722 | struct sock *sk; |
@@ -730,6 +735,14 @@ int __init icmpv6_init(struct net_proto_family *ops) | |||
730 | 735 | ||
731 | sk = per_cpu(__icmpv6_socket, i)->sk; | 736 | sk = per_cpu(__icmpv6_socket, i)->sk; |
732 | sk->sk_allocation = GFP_ATOMIC; | 737 | sk->sk_allocation = GFP_ATOMIC; |
738 | /* | ||
739 | * Split off their lock-class, because sk->sk_dst_lock | ||
740 | * gets used from softirqs, which is safe for | ||
741 | * __icmpv6_socket (because those never get directly used | ||
742 | * via userspace syscalls), but unsafe for normal sockets. | ||
743 | */ | ||
744 | lockdep_set_class(&sk->sk_dst_lock, | ||
745 | &icmpv6_socket_sk_dst_lock_key); | ||
733 | 746 | ||
734 | /* Enough space for 2 64K ICMP packets, including | 747 | /* Enough space for 2 64K ICMP packets, including |
735 | * sk_buff struct overhead. | 748 | * sk_buff struct overhead. |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 9d697d4dcffc..639eb20c9f1f 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -268,13 +268,14 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, struct in6_addr *addr) | |||
268 | if ((dev = dev_get_by_index(mc_lst->ifindex)) != NULL) { | 268 | if ((dev = dev_get_by_index(mc_lst->ifindex)) != NULL) { |
269 | struct inet6_dev *idev = in6_dev_get(dev); | 269 | struct inet6_dev *idev = in6_dev_get(dev); |
270 | 270 | ||
271 | (void) ip6_mc_leave_src(sk, mc_lst, idev); | ||
271 | if (idev) { | 272 | if (idev) { |
272 | (void) ip6_mc_leave_src(sk,mc_lst,idev); | ||
273 | __ipv6_dev_mc_dec(idev, &mc_lst->addr); | 273 | __ipv6_dev_mc_dec(idev, &mc_lst->addr); |
274 | in6_dev_put(idev); | 274 | in6_dev_put(idev); |
275 | } | 275 | } |
276 | dev_put(dev); | 276 | dev_put(dev); |
277 | } | 277 | } else |
278 | (void) ip6_mc_leave_src(sk, mc_lst, NULL); | ||
278 | sock_kfree_s(sk, mc_lst, sizeof(*mc_lst)); | 279 | sock_kfree_s(sk, mc_lst, sizeof(*mc_lst)); |
279 | return 0; | 280 | return 0; |
280 | } | 281 | } |
@@ -334,13 +335,14 @@ void ipv6_sock_mc_close(struct sock *sk) | |||
334 | if (dev) { | 335 | if (dev) { |
335 | struct inet6_dev *idev = in6_dev_get(dev); | 336 | struct inet6_dev *idev = in6_dev_get(dev); |
336 | 337 | ||
338 | (void) ip6_mc_leave_src(sk, mc_lst, idev); | ||
337 | if (idev) { | 339 | if (idev) { |
338 | (void) ip6_mc_leave_src(sk, mc_lst, idev); | ||
339 | __ipv6_dev_mc_dec(idev, &mc_lst->addr); | 340 | __ipv6_dev_mc_dec(idev, &mc_lst->addr); |
340 | in6_dev_put(idev); | 341 | in6_dev_put(idev); |
341 | } | 342 | } |
342 | dev_put(dev); | 343 | dev_put(dev); |
343 | } | 344 | } else |
345 | (void) ip6_mc_leave_src(sk, mc_lst, NULL); | ||
344 | 346 | ||
345 | sock_kfree_s(sk, mc_lst, sizeof(*mc_lst)); | 347 | sock_kfree_s(sk, mc_lst, sizeof(*mc_lst)); |
346 | 348 | ||
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index af4845971f70..6527d4e048d8 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -429,9 +429,9 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb) | |||
429 | cb->args[0], *id); | 429 | cb->args[0], *id); |
430 | 430 | ||
431 | read_lock_bh(&nf_conntrack_lock); | 431 | read_lock_bh(&nf_conntrack_lock); |
432 | last = (struct nf_conn *)cb->args[1]; | ||
432 | for (; cb->args[0] < nf_conntrack_htable_size; cb->args[0]++) { | 433 | for (; cb->args[0] < nf_conntrack_htable_size; cb->args[0]++) { |
433 | restart: | 434 | restart: |
434 | last = (struct nf_conn *)cb->args[1]; | ||
435 | list_for_each_prev(i, &nf_conntrack_hash[cb->args[0]]) { | 435 | list_for_each_prev(i, &nf_conntrack_hash[cb->args[0]]) { |
436 | h = (struct nf_conntrack_tuple_hash *) i; | 436 | h = (struct nf_conntrack_tuple_hash *) i; |
437 | if (DIRECTION(h) != IP_CT_DIR_ORIGINAL) | 437 | if (DIRECTION(h) != IP_CT_DIR_ORIGINAL) |
@@ -442,13 +442,10 @@ restart: | |||
442 | * then dump everything. */ | 442 | * then dump everything. */ |
443 | if (l3proto && L3PROTO(ct) != l3proto) | 443 | if (l3proto && L3PROTO(ct) != l3proto) |
444 | continue; | 444 | continue; |
445 | if (last != NULL) { | 445 | if (cb->args[1]) { |
446 | if (ct == last) { | 446 | if (ct != last) |
447 | nf_ct_put(last); | ||
448 | cb->args[1] = 0; | ||
449 | last = NULL; | ||
450 | } else | ||
451 | continue; | 447 | continue; |
448 | cb->args[1] = 0; | ||
452 | } | 449 | } |
453 | if (ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).pid, | 450 | if (ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).pid, |
454 | cb->nlh->nlmsg_seq, | 451 | cb->nlh->nlmsg_seq, |
@@ -459,17 +456,17 @@ restart: | |||
459 | goto out; | 456 | goto out; |
460 | } | 457 | } |
461 | } | 458 | } |
462 | if (last != NULL) { | 459 | if (cb->args[1]) { |
463 | nf_ct_put(last); | ||
464 | cb->args[1] = 0; | 460 | cb->args[1] = 0; |
465 | goto restart; | 461 | goto restart; |
466 | } | 462 | } |
467 | } | 463 | } |
468 | out: | 464 | out: |
469 | read_unlock_bh(&nf_conntrack_lock); | 465 | read_unlock_bh(&nf_conntrack_lock); |
466 | if (last) | ||
467 | nf_ct_put(last); | ||
470 | 468 | ||
471 | DEBUGP("leaving, last bucket=%lu id=%u\n", cb->args[0], *id); | 469 | DEBUGP("leaving, last bucket=%lu id=%u\n", cb->args[0], *id); |
472 | |||
473 | return skb->len; | 470 | return skb->len; |
474 | } | 471 | } |
475 | 472 | ||
diff --git a/net/netfilter/xt_physdev.c b/net/netfilter/xt_physdev.c index a9f4f6f3c628..63a965467465 100644 --- a/net/netfilter/xt_physdev.c +++ b/net/netfilter/xt_physdev.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
13 | #include <linux/netfilter_bridge.h> | ||
13 | #include <linux/netfilter/xt_physdev.h> | 14 | #include <linux/netfilter/xt_physdev.h> |
14 | #include <linux/netfilter/x_tables.h> | 15 | #include <linux/netfilter/x_tables.h> |
15 | #include <linux/netfilter_bridge.h> | 16 | #include <linux/netfilter_bridge.h> |
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index eea366966740..0a6cfa0005be 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c | |||
@@ -796,7 +796,7 @@ static int __init init_u32(void) | |||
796 | { | 796 | { |
797 | printk("u32 classifier\n"); | 797 | printk("u32 classifier\n"); |
798 | #ifdef CONFIG_CLS_U32_PERF | 798 | #ifdef CONFIG_CLS_U32_PERF |
799 | printk(" Perfomance counters on\n"); | 799 | printk(" Performance counters on\n"); |
800 | #endif | 800 | #endif |
801 | #ifdef CONFIG_NET_CLS_POLICE | 801 | #ifdef CONFIG_NET_CLS_POLICE |
802 | printk(" OLD policer on \n"); | 802 | printk(" OLD policer on \n"); |