diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-20 20:23:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-20 20:23:03 -0400 |
commit | e616c6303306df62223ebe2e68bb2f19c420dd81 (patch) | |
tree | d60d372fac5ceb4da71ac3802422b9b0ae52b20d /net | |
parent | 789319db76ccb8f61d2f6a91d2f2fcb70edae9c5 (diff) | |
parent | d3ede327e83f202c3a0962e207318f65717c5eb7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
pktgen: make sure that pktgen_thread_worker has been executed
[VLAN]: Propagate selected feature bits to VLAN devices
drivers/atm/: remove CVS keywords
vlan: Correctly handle device notifications for layered VLAN devices
net: Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags()
net_sched: cls_api: fix return value for non-existant classifiers
ipsec: Use the correct ip_local_out function
ipv6 addrconf: Allow infinite prefix lifetime.
ipv6 route: Fix lifetime in netlink.
ipv6 addrconf: Fix route lifetime setting in corner case.
ndisc: Add missing strategies for per-device retrans timer/reachable time settings.
ipv6: Move <linux/in6.h> from header-y to unifdef-y.
l2tp: avoid skb truesize bug if headroom is increased
wireless: Create 'device' symlink in sysfs
wireless, airo: waitbusy() won't delay
libertas: fix command timeout after firmware failure
mac80211: Add RTNL version of ieee80211_iterate_active_interfaces
mac80211 : Association with 11n hidden ssid ap.
hostap: fix "registers" registration in procfs
isdn/capi: Return proper errnos on module init.
...
Diffstat (limited to 'net')
-rw-r--r-- | net/8021q/vlan.c | 34 | ||||
-rw-r--r-- | net/8021q/vlan.h | 2 | ||||
-rw-r--r-- | net/8021q/vlan_dev.c | 5 | ||||
-rw-r--r-- | net/core/dev.c | 8 | ||||
-rw-r--r-- | net/core/pktgen.c | 4 | ||||
-rw-r--r-- | net/ipv4/route.c | 2 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 75 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 8 | ||||
-rw-r--r-- | net/ipv6/route.c | 12 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 14 | ||||
-rw-r--r-- | net/mac80211/util.c | 37 | ||||
-rw-r--r-- | net/sched/cls_api.c | 2 |
12 files changed, 153 insertions, 50 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 2a739adaa92b..51961300b586 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -382,6 +382,24 @@ static void vlan_sync_address(struct net_device *dev, | |||
382 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); | 382 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); |
383 | } | 383 | } |
384 | 384 | ||
385 | static void vlan_transfer_features(struct net_device *dev, | ||
386 | struct net_device *vlandev) | ||
387 | { | ||
388 | unsigned long old_features = vlandev->features; | ||
389 | |||
390 | if (dev->features & NETIF_F_VLAN_TSO) { | ||
391 | vlandev->features &= ~VLAN_TSO_FEATURES; | ||
392 | vlandev->features |= dev->features & VLAN_TSO_FEATURES; | ||
393 | } | ||
394 | if (dev->features & NETIF_F_VLAN_CSUM) { | ||
395 | vlandev->features &= ~NETIF_F_ALL_CSUM; | ||
396 | vlandev->features |= dev->features & NETIF_F_ALL_CSUM; | ||
397 | } | ||
398 | |||
399 | if (old_features != vlandev->features) | ||
400 | netdev_features_change(vlandev); | ||
401 | } | ||
402 | |||
385 | static void __vlan_device_event(struct net_device *dev, unsigned long event) | 403 | static void __vlan_device_event(struct net_device *dev, unsigned long event) |
386 | { | 404 | { |
387 | switch (event) { | 405 | switch (event) { |
@@ -410,10 +428,8 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
410 | int i, flgs; | 428 | int i, flgs; |
411 | struct net_device *vlandev; | 429 | struct net_device *vlandev; |
412 | 430 | ||
413 | if (is_vlan_dev(dev)) { | 431 | if (is_vlan_dev(dev)) |
414 | __vlan_device_event(dev, event); | 432 | __vlan_device_event(dev, event); |
415 | goto out; | ||
416 | } | ||
417 | 433 | ||
418 | grp = __vlan_find_group(dev); | 434 | grp = __vlan_find_group(dev); |
419 | if (!grp) | 435 | if (!grp) |
@@ -450,6 +466,18 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
450 | } | 466 | } |
451 | break; | 467 | break; |
452 | 468 | ||
469 | case NETDEV_FEAT_CHANGE: | ||
470 | /* Propagate device features to underlying device */ | ||
471 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | ||
472 | vlandev = vlan_group_get_device(grp, i); | ||
473 | if (!vlandev) | ||
474 | continue; | ||
475 | |||
476 | vlan_transfer_features(dev, vlandev); | ||
477 | } | ||
478 | |||
479 | break; | ||
480 | |||
453 | case NETDEV_DOWN: | 481 | case NETDEV_DOWN: |
454 | /* Put all VLANs for this dev in the down state too. */ | 482 | /* Put all VLANs for this dev in the down state too. */ |
455 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | 483 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { |
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h index 5229a72c7ea1..79625696e86a 100644 --- a/net/8021q/vlan.h +++ b/net/8021q/vlan.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #define VLAN_GRP_HASH_SIZE (1 << VLAN_GRP_HASH_SHIFT) | 7 | #define VLAN_GRP_HASH_SIZE (1 << VLAN_GRP_HASH_SHIFT) |
8 | #define VLAN_GRP_HASH_MASK (VLAN_GRP_HASH_SIZE - 1) | 8 | #define VLAN_GRP_HASH_MASK (VLAN_GRP_HASH_SIZE - 1) |
9 | 9 | ||
10 | #define VLAN_TSO_FEATURES (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG) | ||
11 | |||
10 | /* Find a VLAN device by the MAC address of its Ethernet device, and | 12 | /* Find a VLAN device by the MAC address of its Ethernet device, and |
11 | * it's VLAN ID. The default configuration is to have VLAN's scope | 13 | * it's VLAN ID. The default configuration is to have VLAN's scope |
12 | * to be box-wide, so the MAC will be ignored. The mac will only be | 14 | * to be box-wide, so the MAC will be ignored. The mac will only be |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index c961f0826005..b1cfbaa88db2 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -663,6 +663,11 @@ static int vlan_dev_init(struct net_device *dev) | |||
663 | (1<<__LINK_STATE_DORMANT))) | | 663 | (1<<__LINK_STATE_DORMANT))) | |
664 | (1<<__LINK_STATE_PRESENT); | 664 | (1<<__LINK_STATE_PRESENT); |
665 | 665 | ||
666 | if (real_dev->features & NETIF_F_VLAN_TSO) | ||
667 | dev->features |= real_dev->features & VLAN_TSO_FEATURES; | ||
668 | if (real_dev->features & NETIF_F_VLAN_CSUM) | ||
669 | dev->features |= real_dev->features & NETIF_F_ALL_CSUM; | ||
670 | |||
666 | /* ipv6 shared card related stuff */ | 671 | /* ipv6 shared card related stuff */ |
667 | dev->dev_id = real_dev->dev_id; | 672 | dev->dev_id = real_dev->dev_id; |
668 | 673 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index a1607bc0cd4c..582963077877 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -903,7 +903,11 @@ int dev_change_name(struct net_device *dev, char *newname) | |||
903 | strlcpy(dev->name, newname, IFNAMSIZ); | 903 | strlcpy(dev->name, newname, IFNAMSIZ); |
904 | 904 | ||
905 | rollback: | 905 | rollback: |
906 | device_rename(&dev->dev, dev->name); | 906 | err = device_rename(&dev->dev, dev->name); |
907 | if (err) { | ||
908 | memcpy(dev->name, oldname, IFNAMSIZ); | ||
909 | return err; | ||
910 | } | ||
907 | 911 | ||
908 | write_lock_bh(&dev_base_lock); | 912 | write_lock_bh(&dev_base_lock); |
909 | hlist_del(&dev->name_hlist); | 913 | hlist_del(&dev->name_hlist); |
@@ -3137,7 +3141,7 @@ int dev_change_flags(struct net_device *dev, unsigned flags) | |||
3137 | * Load in the correct multicast list now the flags have changed. | 3141 | * Load in the correct multicast list now the flags have changed. |
3138 | */ | 3142 | */ |
3139 | 3143 | ||
3140 | if (dev->change_rx_flags && (dev->flags ^ flags) & IFF_MULTICAST) | 3144 | if (dev->change_rx_flags && (old_flags ^ flags) & IFF_MULTICAST) |
3141 | dev->change_rx_flags(dev, IFF_MULTICAST); | 3145 | dev->change_rx_flags(dev, IFF_MULTICAST); |
3142 | 3146 | ||
3143 | dev_set_rx_mode(dev); | 3147 | dev_set_rx_mode(dev); |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 8dca21110493..fdf537707e51 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -390,6 +390,7 @@ struct pktgen_thread { | |||
390 | int cpu; | 390 | int cpu; |
391 | 391 | ||
392 | wait_queue_head_t queue; | 392 | wait_queue_head_t queue; |
393 | struct completion start_done; | ||
393 | }; | 394 | }; |
394 | 395 | ||
395 | #define REMOVE 1 | 396 | #define REMOVE 1 |
@@ -3414,6 +3415,7 @@ static int pktgen_thread_worker(void *arg) | |||
3414 | BUG_ON(smp_processor_id() != cpu); | 3415 | BUG_ON(smp_processor_id() != cpu); |
3415 | 3416 | ||
3416 | init_waitqueue_head(&t->queue); | 3417 | init_waitqueue_head(&t->queue); |
3418 | complete(&t->start_done); | ||
3417 | 3419 | ||
3418 | pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current)); | 3420 | pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current)); |
3419 | 3421 | ||
@@ -3615,6 +3617,7 @@ static int __init pktgen_create_thread(int cpu) | |||
3615 | INIT_LIST_HEAD(&t->if_list); | 3617 | INIT_LIST_HEAD(&t->if_list); |
3616 | 3618 | ||
3617 | list_add_tail(&t->th_list, &pktgen_threads); | 3619 | list_add_tail(&t->th_list, &pktgen_threads); |
3620 | init_completion(&t->start_done); | ||
3618 | 3621 | ||
3619 | p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu); | 3622 | p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu); |
3620 | if (IS_ERR(p)) { | 3623 | if (IS_ERR(p)) { |
@@ -3639,6 +3642,7 @@ static int __init pktgen_create_thread(int cpu) | |||
3639 | } | 3642 | } |
3640 | 3643 | ||
3641 | wake_up_process(p); | 3644 | wake_up_process(p); |
3645 | wait_for_completion(&t->start_done); | ||
3642 | 3646 | ||
3643 | return 0; | 3647 | return 0; |
3644 | } | 3648 | } |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 92f90ae46f4a..df41026b60db 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -160,7 +160,7 @@ static struct dst_ops ipv4_dst_ops = { | |||
160 | .negative_advice = ipv4_negative_advice, | 160 | .negative_advice = ipv4_negative_advice, |
161 | .link_failure = ipv4_link_failure, | 161 | .link_failure = ipv4_link_failure, |
162 | .update_pmtu = ip_rt_update_pmtu, | 162 | .update_pmtu = ip_rt_update_pmtu, |
163 | .local_out = ip_local_out, | 163 | .local_out = __ip_local_out, |
164 | .entry_size = sizeof(struct rtable), | 164 | .entry_size = sizeof(struct rtable), |
165 | .entries = ATOMIC_INIT(0), | 165 | .entries = ATOMIC_INIT(0), |
166 | }; | 166 | }; |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e591e09e5e4e..3a835578fd1c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1764,14 +1764,16 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) | |||
1764 | * 2) Configure prefixes with the auto flag set | 1764 | * 2) Configure prefixes with the auto flag set |
1765 | */ | 1765 | */ |
1766 | 1766 | ||
1767 | /* Avoid arithmetic overflow. Really, we could | 1767 | if (valid_lft == INFINITY_LIFE_TIME) |
1768 | save rt_expires in seconds, likely valid_lft, | 1768 | rt_expires = ~0UL; |
1769 | but it would require division in fib gc, that it | 1769 | else if (valid_lft >= 0x7FFFFFFF/HZ) { |
1770 | not good. | 1770 | /* Avoid arithmetic overflow. Really, we could |
1771 | */ | 1771 | * save rt_expires in seconds, likely valid_lft, |
1772 | if (valid_lft >= 0x7FFFFFFF/HZ) | 1772 | * but it would require division in fib gc, that it |
1773 | * not good. | ||
1774 | */ | ||
1773 | rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ); | 1775 | rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ); |
1774 | else | 1776 | } else |
1775 | rt_expires = valid_lft * HZ; | 1777 | rt_expires = valid_lft * HZ; |
1776 | 1778 | ||
1777 | /* | 1779 | /* |
@@ -1779,7 +1781,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) | |||
1779 | * Avoid arithmetic overflow there as well. | 1781 | * Avoid arithmetic overflow there as well. |
1780 | * Overflow can happen only if HZ < USER_HZ. | 1782 | * Overflow can happen only if HZ < USER_HZ. |
1781 | */ | 1783 | */ |
1782 | if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ) | 1784 | if (HZ < USER_HZ && ~rt_expires && rt_expires > 0x7FFFFFFF / USER_HZ) |
1783 | rt_expires = 0x7FFFFFFF / USER_HZ; | 1785 | rt_expires = 0x7FFFFFFF / USER_HZ; |
1784 | 1786 | ||
1785 | if (pinfo->onlink) { | 1787 | if (pinfo->onlink) { |
@@ -1788,17 +1790,28 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) | |||
1788 | dev->ifindex, 1); | 1790 | dev->ifindex, 1); |
1789 | 1791 | ||
1790 | if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { | 1792 | if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { |
1791 | if (rt->rt6i_flags&RTF_EXPIRES) { | 1793 | /* Autoconf prefix route */ |
1792 | if (valid_lft == 0) { | 1794 | if (valid_lft == 0) { |
1793 | ip6_del_rt(rt); | 1795 | ip6_del_rt(rt); |
1794 | rt = NULL; | 1796 | rt = NULL; |
1795 | } else { | 1797 | } else if (~rt_expires) { |
1796 | rt->rt6i_expires = jiffies + rt_expires; | 1798 | /* not infinity */ |
1797 | } | 1799 | rt->rt6i_expires = jiffies + rt_expires; |
1800 | rt->rt6i_flags |= RTF_EXPIRES; | ||
1801 | } else { | ||
1802 | rt->rt6i_flags &= ~RTF_EXPIRES; | ||
1803 | rt->rt6i_expires = 0; | ||
1798 | } | 1804 | } |
1799 | } else if (valid_lft) { | 1805 | } else if (valid_lft) { |
1806 | int flags = RTF_ADDRCONF | RTF_PREFIX_RT; | ||
1807 | clock_t expires = 0; | ||
1808 | if (~rt_expires) { | ||
1809 | /* not infinity */ | ||
1810 | flags |= RTF_EXPIRES; | ||
1811 | expires = jiffies_to_clock_t(rt_expires); | ||
1812 | } | ||
1800 | addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, | 1813 | addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, |
1801 | dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); | 1814 | dev, expires, flags); |
1802 | } | 1815 | } |
1803 | if (rt) | 1816 | if (rt) |
1804 | dst_release(&rt->u.dst); | 1817 | dst_release(&rt->u.dst); |
@@ -2021,7 +2034,8 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, | |||
2021 | struct inet6_dev *idev; | 2034 | struct inet6_dev *idev; |
2022 | struct net_device *dev; | 2035 | struct net_device *dev; |
2023 | int scope; | 2036 | int scope; |
2024 | u32 flags = RTF_EXPIRES; | 2037 | u32 flags; |
2038 | clock_t expires; | ||
2025 | 2039 | ||
2026 | ASSERT_RTNL(); | 2040 | ASSERT_RTNL(); |
2027 | 2041 | ||
@@ -2041,8 +2055,13 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, | |||
2041 | if (valid_lft == INFINITY_LIFE_TIME) { | 2055 | if (valid_lft == INFINITY_LIFE_TIME) { |
2042 | ifa_flags |= IFA_F_PERMANENT; | 2056 | ifa_flags |= IFA_F_PERMANENT; |
2043 | flags = 0; | 2057 | flags = 0; |
2044 | } else if (valid_lft >= 0x7FFFFFFF/HZ) | 2058 | expires = 0; |
2045 | valid_lft = 0x7FFFFFFF/HZ; | 2059 | } else { |
2060 | if (valid_lft >= 0x7FFFFFFF/HZ) | ||
2061 | valid_lft = 0x7FFFFFFF/HZ; | ||
2062 | flags = RTF_EXPIRES; | ||
2063 | expires = jiffies_to_clock_t(valid_lft * HZ); | ||
2064 | } | ||
2046 | 2065 | ||
2047 | if (prefered_lft == 0) | 2066 | if (prefered_lft == 0) |
2048 | ifa_flags |= IFA_F_DEPRECATED; | 2067 | ifa_flags |= IFA_F_DEPRECATED; |
@@ -2060,7 +2079,7 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, | |||
2060 | spin_unlock_bh(&ifp->lock); | 2079 | spin_unlock_bh(&ifp->lock); |
2061 | 2080 | ||
2062 | addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev, | 2081 | addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev, |
2063 | jiffies_to_clock_t(valid_lft * HZ), flags); | 2082 | expires, flags); |
2064 | /* | 2083 | /* |
2065 | * Note that section 3.1 of RFC 4429 indicates | 2084 | * Note that section 3.1 of RFC 4429 indicates |
2066 | * that the Optimistic flag should not be set for | 2085 | * that the Optimistic flag should not be set for |
@@ -3148,7 +3167,8 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
3148 | static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, | 3167 | static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, |
3149 | u32 prefered_lft, u32 valid_lft) | 3168 | u32 prefered_lft, u32 valid_lft) |
3150 | { | 3169 | { |
3151 | u32 flags = RTF_EXPIRES; | 3170 | u32 flags; |
3171 | clock_t expires; | ||
3152 | 3172 | ||
3153 | if (!valid_lft || (prefered_lft > valid_lft)) | 3173 | if (!valid_lft || (prefered_lft > valid_lft)) |
3154 | return -EINVAL; | 3174 | return -EINVAL; |
@@ -3156,8 +3176,13 @@ static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, | |||
3156 | if (valid_lft == INFINITY_LIFE_TIME) { | 3176 | if (valid_lft == INFINITY_LIFE_TIME) { |
3157 | ifa_flags |= IFA_F_PERMANENT; | 3177 | ifa_flags |= IFA_F_PERMANENT; |
3158 | flags = 0; | 3178 | flags = 0; |
3159 | } else if (valid_lft >= 0x7FFFFFFF/HZ) | 3179 | expires = 0; |
3160 | valid_lft = 0x7FFFFFFF/HZ; | 3180 | } else { |
3181 | if (valid_lft >= 0x7FFFFFFF/HZ) | ||
3182 | valid_lft = 0x7FFFFFFF/HZ; | ||
3183 | flags = RTF_EXPIRES; | ||
3184 | expires = jiffies_to_clock_t(valid_lft * HZ); | ||
3185 | } | ||
3161 | 3186 | ||
3162 | if (prefered_lft == 0) | 3187 | if (prefered_lft == 0) |
3163 | ifa_flags |= IFA_F_DEPRECATED; | 3188 | ifa_flags |= IFA_F_DEPRECATED; |
@@ -3176,7 +3201,7 @@ static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, | |||
3176 | ipv6_ifa_notify(0, ifp); | 3201 | ipv6_ifa_notify(0, ifp); |
3177 | 3202 | ||
3178 | addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev, | 3203 | addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev, |
3179 | jiffies_to_clock_t(valid_lft * HZ), flags); | 3204 | expires, flags); |
3180 | addrconf_verify(0); | 3205 | addrconf_verify(0); |
3181 | 3206 | ||
3182 | return 0; | 3207 | return 0; |
@@ -4242,7 +4267,7 @@ static void addrconf_sysctl_register(struct inet6_dev *idev) | |||
4242 | neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, | 4267 | neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, |
4243 | NET_IPV6_NEIGH, "ipv6", | 4268 | NET_IPV6_NEIGH, "ipv6", |
4244 | &ndisc_ifinfo_sysctl_change, | 4269 | &ndisc_ifinfo_sysctl_change, |
4245 | NULL); | 4270 | ndisc_ifinfo_sysctl_strategy); |
4246 | __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, | 4271 | __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, |
4247 | idev->dev->ifindex, idev, &idev->cnf); | 4272 | idev->dev->ifindex, idev, &idev->cnf); |
4248 | } | 4273 | } |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index a55fc05b8125..282fdb31f8ed 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1727,10 +1727,10 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f | |||
1727 | return ret; | 1727 | return ret; |
1728 | } | 1728 | } |
1729 | 1729 | ||
1730 | static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | 1730 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, |
1731 | int nlen, void __user *oldval, | 1731 | int nlen, void __user *oldval, |
1732 | size_t __user *oldlenp, | 1732 | size_t __user *oldlenp, |
1733 | void __user *newval, size_t newlen) | 1733 | void __user *newval, size_t newlen) |
1734 | { | 1734 | { |
1735 | struct net_device *dev = ctl->extra1; | 1735 | struct net_device *dev = ctl->extra1; |
1736 | struct inet6_dev *idev; | 1736 | struct inet6_dev *idev; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 12bba0880345..48534c6c0735 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -109,7 +109,7 @@ static struct dst_ops ip6_dst_ops_template = { | |||
109 | .negative_advice = ip6_negative_advice, | 109 | .negative_advice = ip6_negative_advice, |
110 | .link_failure = ip6_link_failure, | 110 | .link_failure = ip6_link_failure, |
111 | .update_pmtu = ip6_rt_update_pmtu, | 111 | .update_pmtu = ip6_rt_update_pmtu, |
112 | .local_out = ip6_local_out, | 112 | .local_out = __ip6_local_out, |
113 | .entry_size = sizeof(struct rt6_info), | 113 | .entry_size = sizeof(struct rt6_info), |
114 | .entries = ATOMIC_INIT(0), | 114 | .entries = ATOMIC_INIT(0), |
115 | }; | 115 | }; |
@@ -475,7 +475,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len, | |||
475 | lifetime = ntohl(rinfo->lifetime); | 475 | lifetime = ntohl(rinfo->lifetime); |
476 | if (lifetime == 0xffffffff) { | 476 | if (lifetime == 0xffffffff) { |
477 | /* infinity */ | 477 | /* infinity */ |
478 | } else if (lifetime > 0x7fffffff/HZ) { | 478 | } else if (lifetime > 0x7fffffff/HZ - 1) { |
479 | /* Avoid arithmetic overflow */ | 479 | /* Avoid arithmetic overflow */ |
480 | lifetime = 0x7fffffff/HZ - 1; | 480 | lifetime = 0x7fffffff/HZ - 1; |
481 | } | 481 | } |
@@ -1106,7 +1106,9 @@ int ip6_route_add(struct fib6_config *cfg) | |||
1106 | } | 1106 | } |
1107 | 1107 | ||
1108 | rt->u.dst.obsolete = -1; | 1108 | rt->u.dst.obsolete = -1; |
1109 | rt->rt6i_expires = jiffies + clock_t_to_jiffies(cfg->fc_expires); | 1109 | rt->rt6i_expires = (cfg->fc_flags & RTF_EXPIRES) ? |
1110 | jiffies + clock_t_to_jiffies(cfg->fc_expires) : | ||
1111 | 0; | ||
1110 | 1112 | ||
1111 | if (cfg->fc_protocol == RTPROT_UNSPEC) | 1113 | if (cfg->fc_protocol == RTPROT_UNSPEC) |
1112 | cfg->fc_protocol = RTPROT_BOOT; | 1114 | cfg->fc_protocol = RTPROT_BOOT; |
@@ -2200,7 +2202,9 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, | |||
2200 | 2202 | ||
2201 | NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric); | 2203 | NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric); |
2202 | 2204 | ||
2203 | expires = rt->rt6i_expires ? rt->rt6i_expires - jiffies : 0; | 2205 | expires = (rt->rt6i_flags & RTF_EXPIRES) ? |
2206 | rt->rt6i_expires - jiffies : 0; | ||
2207 | |||
2204 | if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0, | 2208 | if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0, |
2205 | expires, rt->u.dst.error) < 0) | 2209 | expires, rt->u.dst.error) < 0) |
2206 | goto nla_put_failure; | 2210 | goto nla_put_failure; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4adba09e80ca..e470bf12b765 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3446,21 +3446,17 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
3446 | struct ieee80211_sta_bss *bss, *selected = NULL; | 3446 | struct ieee80211_sta_bss *bss, *selected = NULL; |
3447 | int top_rssi = 0, freq; | 3447 | int top_rssi = 0, freq; |
3448 | 3448 | ||
3449 | if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | | ||
3450 | IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) { | ||
3451 | ifsta->state = IEEE80211_AUTHENTICATE; | ||
3452 | ieee80211_sta_reset_auth(dev, ifsta); | ||
3453 | return 0; | ||
3454 | } | ||
3455 | |||
3456 | spin_lock_bh(&local->sta_bss_lock); | 3449 | spin_lock_bh(&local->sta_bss_lock); |
3457 | freq = local->oper_channel->center_freq; | 3450 | freq = local->oper_channel->center_freq; |
3458 | list_for_each_entry(bss, &local->sta_bss_list, list) { | 3451 | list_for_each_entry(bss, &local->sta_bss_list, list) { |
3459 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) | 3452 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) |
3460 | continue; | 3453 | continue; |
3461 | 3454 | ||
3462 | if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | 3455 | if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | |
3463 | !!sdata->default_key) | 3456 | IEEE80211_STA_AUTO_BSSID_SEL | |
3457 | IEEE80211_STA_AUTO_CHANNEL_SEL)) && | ||
3458 | (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | ||
3459 | !!sdata->default_key)) | ||
3464 | continue; | 3460 | continue; |
3465 | 3461 | ||
3466 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && | 3462 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 24a465c4df09..131e9e6c8a32 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -389,6 +389,41 @@ void ieee80211_iterate_active_interfaces( | |||
389 | struct ieee80211_local *local = hw_to_local(hw); | 389 | struct ieee80211_local *local = hw_to_local(hw); |
390 | struct ieee80211_sub_if_data *sdata; | 390 | struct ieee80211_sub_if_data *sdata; |
391 | 391 | ||
392 | rtnl_lock(); | ||
393 | |||
394 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
395 | switch (sdata->vif.type) { | ||
396 | case IEEE80211_IF_TYPE_INVALID: | ||
397 | case IEEE80211_IF_TYPE_MNTR: | ||
398 | case IEEE80211_IF_TYPE_VLAN: | ||
399 | continue; | ||
400 | case IEEE80211_IF_TYPE_AP: | ||
401 | case IEEE80211_IF_TYPE_STA: | ||
402 | case IEEE80211_IF_TYPE_IBSS: | ||
403 | case IEEE80211_IF_TYPE_WDS: | ||
404 | case IEEE80211_IF_TYPE_MESH_POINT: | ||
405 | break; | ||
406 | } | ||
407 | if (sdata->dev == local->mdev) | ||
408 | continue; | ||
409 | if (netif_running(sdata->dev)) | ||
410 | iterator(data, sdata->dev->dev_addr, | ||
411 | &sdata->vif); | ||
412 | } | ||
413 | |||
414 | rtnl_unlock(); | ||
415 | } | ||
416 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | ||
417 | |||
418 | void ieee80211_iterate_active_interfaces_atomic( | ||
419 | struct ieee80211_hw *hw, | ||
420 | void (*iterator)(void *data, u8 *mac, | ||
421 | struct ieee80211_vif *vif), | ||
422 | void *data) | ||
423 | { | ||
424 | struct ieee80211_local *local = hw_to_local(hw); | ||
425 | struct ieee80211_sub_if_data *sdata; | ||
426 | |||
392 | rcu_read_lock(); | 427 | rcu_read_lock(); |
393 | 428 | ||
394 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 429 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
@@ -413,4 +448,4 @@ void ieee80211_iterate_active_interfaces( | |||
413 | 448 | ||
414 | rcu_read_unlock(); | 449 | rcu_read_unlock(); |
415 | } | 450 | } |
416 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | 451 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 1086df7478bc..9360fc81e8c7 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -220,7 +220,7 @@ replay: | |||
220 | tp = kzalloc(sizeof(*tp), GFP_KERNEL); | 220 | tp = kzalloc(sizeof(*tp), GFP_KERNEL); |
221 | if (tp == NULL) | 221 | if (tp == NULL) |
222 | goto errout; | 222 | goto errout; |
223 | err = -EINVAL; | 223 | err = -ENOENT; |
224 | tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]); | 224 | tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]); |
225 | if (tp_ops == NULL) { | 225 | if (tp_ops == NULL) { |
226 | #ifdef CONFIG_KMOD | 226 | #ifdef CONFIG_KMOD |