From: Thomas Graf <tgraf@suug.ch>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH] ipv4 addr: Send netlink notification for address label changes
Date: Thu, 5 Jun 2008 02:02:03 +0200 [thread overview]
Message-ID: <20080605000203.GK20815@postel.suug.ch> (raw)
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>
Index: net-2.6/net/ipv4/devinet.c
===================================================================
--- net-2.6.orig/net/ipv4/devinet.c 2008-06-04 23:14:26.000000000 +0200
+++ net-2.6/net/ipv4/devinet.c 2008-06-05 01:56:41.000000000 +0200
@@ -1013,7 +1013,7 @@
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);
@@ -1024,6 +1024,8 @@
} else {
strcpy(ifa->ifa_label + (IFNAMSIZ - strlen(dot) - 1), dot);
}
+skip:
+ rtmsg_ifa(RTM_NEWADDR, ifa, NULL, 0);
}
}
next reply other threads:[~2008-06-05 0:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-05 0:02 Thomas Graf [this message]
2008-06-10 22:40 ` [PATCH] ipv4 addr: Send netlink notification for address label changes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080605000203.GK20815@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).