Commit:     44344b2a85f03326c7047a8c861b0c625c674839
Parent:     14be85f555fa53a3b80119569e4c2fe88aa9fd3e
Author:     Mark McLoughlin <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 4 00:56:25 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Jan 4 03:55:34 2008 -0800

    [INET]: Fix netdev renaming and inet address labels
    When re-naming an interface, the previous secondary address
    labels get lost e.g.
      $> brctl addbr foo
      $> ip addr add dev foo
      $> ip addr add dev foo label foo:00
      $> ip addr show dev foo | grep inet
        inet scope global foo
        inet scope global foo:00
      $> ip link set foo name bar
      $> ip addr show dev bar | grep inet
        inet scope global bar
        inet scope global bar:2
    Turns out to be a simple thinko in inetdev_changename() - clearly we
    want to look at the address label, rather than the device name, for
    a suffix to retain.
    Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/ipv4/devinet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 3168c3d..b42f746 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1027,7 +1027,7 @@ static void inetdev_changename(struct net_device *dev, 
struct in_device *in_dev)
                memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
                if (named++ == 0)
-               dot = strchr(ifa->ifa_label, ':');
+               dot = strchr(old, ':');
                if (dot == NULL) {
                        sprintf(old, ":%d", named);
                        dot = old;
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

Reply via email to