From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
yoshfuji@linux-ipv6.org, kaber@trash.net, thaller@redhat.com,
stephen@networkplumber.org, hannes@stressinduktion.org,
vyasevich@gmail.com, dcbw@redhat.com, David.Laight@ACULAB.COM
Subject: [patch iproute2 2/2] add support for IFA_F_MANAGETEMPADDR
Date: Fri, 6 Dec 2013 09:46:27 +0100 [thread overview]
Message-ID: <1386319587-2149-2-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1386319587-2149-1-git-send-email-jiri@resnulli.us>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
include/linux/if_addr.h | 1 +
ip/ipaddress.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index cced59f..e1e95ce 100644
--- a/include/linux/if_addr.h
+++ b/include/linux/if_addr.h
@@ -45,6 +45,7 @@ enum {
#define IFA_F_DEPRECATED 0x20
#define IFA_F_TENTATIVE 0x40
#define IFA_F_PERMANENT 0x80
+#define IFA_F_MANAGETEMPADDR 0x0100
struct ifa_cacheinfo {
__u32 ifa_prefered;
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index e012f8e..a4a19cc 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -703,6 +703,10 @@ int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n,
ifa_flags &= ~IFA_F_NODAD;
fprintf(fp, "nodad ");
}
+ if (ifa_flags & IFA_F_MANAGETEMPADDR) {
+ ifa_flags &= ~IFA_F_MANAGETEMPADDR;
+ fprintf(fp, "mngtmpaddr ");
+ }
if (!(ifa_flags & IFA_F_PERMANENT)) {
fprintf(fp, "dynamic ");
} else
@@ -1345,6 +1349,8 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
ifa_flags |= IFA_F_HOMEADDRESS;
} else if (strcmp(*argv, "nodad") == 0) {
ifa_flags |= IFA_F_NODAD;
+ } else if (strcmp(*argv, "mngtmpaddr") == 0) {
+ ifa_flags |= IFA_F_MANAGETEMPADDR;
} else {
if (strcmp(*argv, "local") == 0) {
NEXT_ARG();
--
1.8.3.1
next prev parent reply other threads:[~2013-12-06 8:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 8:45 [patch net-next 0/2] ipv6: allow temporary address management for user-created addresses Jiri Pirko
2013-12-06 8:45 ` [patch net-next 1/2] ipv6 addrconf: extend ifa_flags to u32 Jiri Pirko
2013-12-06 21:35 ` David Miller
2013-12-07 8:51 ` Jiri Pirko
2013-12-06 8:45 ` [patch net-next 2/2] ipv6 addrconf: introduce IFA_F_MANAGETEMPADDR to tell kernel to manage temporary addresses Jiri Pirko
2013-12-06 21:35 ` David Miller
2013-12-07 3:36 ` Hannes Frederic Sowa
2013-12-06 8:46 ` [patch iproute2 1/2] add support for extended ifa_flags Jiri Pirko
2013-12-06 8:46 ` Jiri Pirko [this message]
2013-12-28 19:27 ` [patch iproute2 2/2] add support for IFA_F_MANAGETEMPADDR Stephen Hemminger
2013-12-28 19:21 ` [patch iproute2 1/2] add support for extended ifa_flags Stephen Hemminger
2013-12-28 21:20 ` Jiri Pirko
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=1386319587-2149-2-git-send-email-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=dcbw@redhat.com \
--cc=hannes@stressinduktion.org \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=thaller@redhat.com \
--cc=vyasevich@gmail.com \
--cc=yoshfuji@linux-ipv6.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).