Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d31c7b8fa303eb81311f27b80595b8d2cbeef950
Commit:     d31c7b8fa303eb81311f27b80595b8d2cbeef950
Parent:     d5a784b3719ae364f49ecff12a0248f6e4252720
Author:     Evgeniy Polyakov <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 30 23:36:08 2007 +1100
Committer:  Herbert Xu <[EMAIL PROTECTED]>
CommitDate: Fri Nov 30 23:36:08 2007 +1100

    [IPV6]: Restore IPv6 when MTU is big enough
    
    Avaid provided test application, so bug got fixed.
    
    IPv6 addrconf removes ipv6 inner device from netdev each time cmu
    changes and new value is less than IPV6_MIN_MTU (1280 bytes).
    When mtu is changed and new value is greater than IPV6_MIN_MTU,
    it does not add ipv6 addresses and inner device bac.
    
    This patch fixes that.
    
    Tested with Avaid's application, which works ok now.
    
    Signed-off-by: Evgeniy Polyakov <[EMAIL PROTECTED]>
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
---
 net/ipv6/addrconf.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 567664e..e8c3475 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2293,6 +2293,9 @@ static int addrconf_notify(struct notifier_block *this, 
unsigned long event,
                                break;
                        }
 
+                       if (!idev && dev->mtu >= IPV6_MIN_MTU)
+                               idev = ipv6_add_dev(dev);
+
                        if (idev)
                                idev->if_flags |= IF_READY;
                } else {
@@ -2357,12 +2360,18 @@ static int addrconf_notify(struct notifier_block *this, 
unsigned long event,
                break;
 
        case NETDEV_CHANGEMTU:
-               if ( idev && dev->mtu >= IPV6_MIN_MTU) {
+               if (idev && dev->mtu >= IPV6_MIN_MTU) {
                        rt6_mtu_change(dev, dev->mtu);
                        idev->cnf.mtu6 = dev->mtu;
                        break;
                }
 
+               if (!idev && dev->mtu >= IPV6_MIN_MTU) {
+                       idev = ipv6_add_dev(dev);
+                       if (idev)
+                               break;
+               }
+
                /* MTU falled under IPV6_MIN_MTU. Stop IPv6 on this interface. 
*/
 
        case NETDEV_DOWN:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to