diff mbox

[iproute2] allow to create temporary addresses

Message ID 1382622539-6653-1-git-send-email-jiri@resnulli.us
State Not Applicable, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Jiri Pirko Oct. 24, 2013, 1:48 p.m. UTC
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 ip/ipaddress.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 1c3e4da..3ca774d 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1332,6 +1332,9 @@  static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
 			req.ifa.ifa_flags |= IFA_F_HOMEADDRESS;
 		} else if (strcmp(*argv, "nodad") == 0) {
 			req.ifa.ifa_flags |= IFA_F_NODAD;
+		} else if (strcmp(*argv, "temporary") == 0 ||
+			   strcmp(*argv, "secondary") == 0) {
+			req.ifa.ifa_flags |= IFA_F_SECONDARY;
 		} else {
 			if (strcmp(*argv, "local") == 0) {
 				NEXT_ARG();