Skip to content

Commit

Permalink
ipv4 addr: Send netlink notification for address label changes
Browse files Browse the repository at this point in the history
Makes people happy who try to keep a list of addresses up to date by
listening to notifications.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Thomas Graf authored and David S. Miller committed Jun 10, 2008
1 parent c5ec514 commit 573bf47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/ipv4/devinet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ static void inetdev_changename(struct net_device *dev, struct in_device *in_dev)
memcpy(old, ifa->ifa_label, IFNAMSIZ);
memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
if (named++ == 0)
continue;
goto skip;
dot = strchr(old, ':');
if (dot == NULL) {
sprintf(old, ":%d", named);
Expand All @@ -1024,6 +1024,8 @@ static void inetdev_changename(struct net_device *dev, struct in_device *in_dev)
} else {
strcpy(ifa->ifa_label + (IFNAMSIZ - strlen(dot) - 1), dot);
}
skip:
rtmsg_ifa(RTM_NEWADDR, ifa, NULL, 0);
}
}

Expand Down

0 comments on commit 573bf47

Please sign in to comment.