aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-14 05:30:23 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-14 05:30:23 -0400
commitdf39e8ba56a788733d369068c7319e04b1da3cd5 (patch)
tree1e9be853bdb455e341cdbf957656f342cfa2eb9e /net/ipv6/addrconf.c
parentf5572855ec492334d8c3ec0e0e86c31865d5cf07 (diff)
parent159d83363b629c91d020734207c1bc788b96af5a (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ehea/ehea_main.c drivers/net/wireless/iwlwifi/Kconfig drivers/net/wireless/rt2x00/rt61pci.c net/ipv4/inet_timewait_sock.c net/ipv6/raw.c net/mac80211/ieee80211_sta.c
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 9d49ed2578d7..8a0fd4007bdb 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -372,25 +372,26 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
372 */ 372 */
373 in6_dev_hold(ndev); 373 in6_dev_hold(ndev);
374 374
375#if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE)
376 if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) {
377 printk(KERN_INFO
378 "%s: Disabled Multicast RS\n",
379 dev->name);
380 ndev->cnf.rtr_solicits = 0;
381 }
382#endif
383
375#ifdef CONFIG_IPV6_PRIVACY 384#ifdef CONFIG_IPV6_PRIVACY
376 setup_timer(&ndev->regen_timer, ipv6_regen_rndid, (unsigned long)ndev); 385 setup_timer(&ndev->regen_timer, ipv6_regen_rndid, (unsigned long)ndev);
377 if ((dev->flags&IFF_LOOPBACK) || 386 if ((dev->flags&IFF_LOOPBACK) ||
378 dev->type == ARPHRD_TUNNEL || 387 dev->type == ARPHRD_TUNNEL ||
379#if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE) 388 dev->type == ARPHRD_TUNNEL6 ||
380 dev->type == ARPHRD_SIT || 389 dev->type == ARPHRD_SIT ||
381#endif
382 dev->type == ARPHRD_NONE) { 390 dev->type == ARPHRD_NONE) {
383 printk(KERN_INFO 391 printk(KERN_INFO
384 "%s: Disabled Privacy Extensions\n", 392 "%s: Disabled Privacy Extensions\n",
385 dev->name); 393 dev->name);
386 ndev->cnf.use_tempaddr = -1; 394 ndev->cnf.use_tempaddr = -1;
387
388 if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) {
389 printk(KERN_INFO
390 "%s: Disabled Multicast RS\n",
391 dev->name);
392 ndev->cnf.rtr_solicits = 0;
393 }
394 } else { 395 } else {
395 in6_dev_hold(ndev); 396 in6_dev_hold(ndev);
396 ipv6_regen_rndid((unsigned long) ndev); 397 ipv6_regen_rndid((unsigned long) ndev);
@@ -2529,7 +2530,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
2529 2530
2530 ASSERT_RTNL(); 2531 ASSERT_RTNL();
2531 2532
2532 if (dev == init_net.loopback_dev && how == 1) 2533 if ((dev->flags & IFF_LOOPBACK) && how == 1)
2533 how = 0; 2534 how = 0;
2534 2535
2535 rt6_ifdown(net, dev); 2536 rt6_ifdown(net, dev);
@@ -2542,7 +2543,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
2542 /* Step 1: remove reference to ipv6 device from parent device. 2543 /* Step 1: remove reference to ipv6 device from parent device.
2543 Do not dev_put! 2544 Do not dev_put!
2544 */ 2545 */
2545 if (how == 1) { 2546 if (how) {
2546 idev->dead = 1; 2547 idev->dead = 1;
2547 2548
2548 /* protected by rtnl_lock */ 2549 /* protected by rtnl_lock */
@@ -2574,12 +2575,12 @@ static int addrconf_ifdown(struct net_device *dev, int how)
2574 write_lock_bh(&idev->lock); 2575 write_lock_bh(&idev->lock);
2575 2576
2576 /* Step 3: clear flags for stateless addrconf */ 2577 /* Step 3: clear flags for stateless addrconf */
2577 if (how != 1) 2578 if (!how)
2578 idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY); 2579 idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
2579 2580
2580 /* Step 4: clear address list */ 2581 /* Step 4: clear address list */
2581#ifdef CONFIG_IPV6_PRIVACY 2582#ifdef CONFIG_IPV6_PRIVACY
2582 if (how == 1 && del_timer(&idev->regen_timer)) 2583 if (how && del_timer(&idev->regen_timer))
2583 in6_dev_put(idev); 2584 in6_dev_put(idev);
2584 2585
2585 /* clear tempaddr list */ 2586 /* clear tempaddr list */
@@ -2616,7 +2617,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
2616 2617
2617 /* Step 5: Discard multicast list */ 2618 /* Step 5: Discard multicast list */
2618 2619
2619 if (how == 1) 2620 if (how)
2620 ipv6_mc_destroy_dev(idev); 2621 ipv6_mc_destroy_dev(idev);
2621 else 2622 else
2622 ipv6_mc_down(idev); 2623 ipv6_mc_down(idev);
@@ -2625,7 +2626,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
2625 2626
2626 /* Shot the device (if unregistered) */ 2627 /* Shot the device (if unregistered) */
2627 2628
2628 if (how == 1) { 2629 if (how) {
2629 addrconf_sysctl_unregister(idev); 2630 addrconf_sysctl_unregister(idev);
2630 neigh_parms_release(&nd_tbl, idev->nd_parms); 2631 neigh_parms_release(&nd_tbl, idev->nd_parms);
2631 neigh_ifdown(&nd_tbl, dev); 2632 neigh_ifdown(&nd_tbl, dev);