File libnl3-fix-ipv6-privacy-extension.patch of Package libnl3.6378

From 42c41336000e1ff781a91c6ec397fd787aae3124 Mon Sep 17 00:00:00 2001
From: Jiri Pirko <jiri@resnulli.us>
Date: Sun, 8 Dec 2013 12:26:24 +0100
Subject: [PATCH] add support for IFA_FLAGS nl attribute

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Thomas Haller <thaller@redhat.com>
---
 include/linux/if_addr.h         | 4 ++++
 include/netlink-private/types.h | 2 +-
 lib/route/addr.c                | 4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index c355522..63da1cd 100644
--- a/include/linux/if_addr.h
+++ b/include/linux/if_addr.h
@@ -18,6 +18,9 @@ struct ifaddrmsg {
  * It makes no difference for normally configured broadcast interfaces,
  * but for point-to-point IFA_ADDRESS is DESTINATION address,
  * local address is supplied in IFA_LOCAL attribute.
+ *
+ * IFA_FLAGS is a u32 attribute that extends the u8 field ifa_flags.
+ * If present, the value from struct ifaddrmsg will be ignored.
  */
 enum {
 	IFA_UNSPEC,
@@ -28,6 +31,7 @@ enum {
 	IFA_ANYCAST,
 	IFA_CACHEINFO,
 	IFA_MULTICAST,
+	IFA_FLAGS,
 	__IFA_MAX,
 };
 
diff --git a/include/netlink-private/types.h b/include/netlink-private/types.h
index 59e8402..6750be7 100644
--- a/include/netlink-private/types.h
+++ b/include/netlink-private/types.h
@@ -244,8 +244,8 @@ struct rtnl_addr
 
 	uint8_t		a_family;
 	uint8_t		a_prefixlen;
-	uint8_t		a_flags;
 	uint8_t		a_scope;
+	uint32_t	a_flags;
 	uint32_t	a_ifindex;
 
 	struct nl_addr *a_peer;
diff --git a/lib/route/addr.c b/lib/route/addr.c
index 1ec298c..21f415d 100644
--- a/lib/route/addr.c
+++ b/lib/route/addr.c
@@ -216,8 +216,9 @@ static int addr_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who,
 	ifa = nlmsg_data(nlh);
 	addr->a_family = family = ifa->ifa_family;
 	addr->a_prefixlen = ifa->ifa_prefixlen;
-	addr->a_flags = ifa->ifa_flags;
 	addr->a_scope = ifa->ifa_scope;
+	addr->a_flags = tb[IFA_FLAGS] ? nla_get_u32(tb[IFA_FLAGS]) :
+					ifa->ifa_flags;
 	addr->a_ifindex = ifa->ifa_index;
 
 	addr->ce_mask = (ADDR_ATTR_FAMILY | ADDR_ATTR_PREFIXLEN |
@@ -597,6 +598,7 @@ static int build_addr_msg(struct rtnl_addr *tmpl, int cmd, int flags,
 		NLA_PUT(msg, IFA_CACHEINFO, sizeof(ca), &ca);
 	}
 
+	NLA_PUT_U32(msg, IFA_FLAGS, tmpl->a_flags);
 
 	*result = msg;
 	return 0;
-- 
2.14.3

From dcc0baac020e033c4325e4d89c92aaab03f01b01 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Thu, 2 Jan 2014 10:51:38 +0100
Subject: [PATCH] addr: add address flag IFA_F_MANAGETEMPADDR

Signed-off-by: Thomas Haller <thaller@redhat.com>
---
 include/linux/if_addr.h | 1 +
 lib/route/addr.c        | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index 63da1cd..94b32b4 100644
--- a/include/linux/if_addr.h
+++ b/include/linux/if_addr.h
@@ -48,6 +48,7 @@ enum {
 #define IFA_F_DEPRECATED	0x20
 #define IFA_F_TENTATIVE		0x40
 #define IFA_F_PERMANENT		0x80
+#define IFA_F_MANAGETEMPADDR	0x100
 
 struct ifa_cacheinfo {
 	__u32	ifa_prefered;
diff --git a/lib/route/addr.c b/lib/route/addr.c
index 21f415d..188611a 100644
--- a/lib/route/addr.c
+++ b/lib/route/addr.c
@@ -1056,6 +1056,7 @@ static const struct trans_tbl addr_flags[] = {
 	__ADD(IFA_F_DEPRECATED, deprecated)
 	__ADD(IFA_F_TENTATIVE, tentative)
 	__ADD(IFA_F_PERMANENT, permanent)
+	__ADD(IFA_F_MANAGETEMPADDR, mngtmpaddr)
 };
 
 char *rtnl_addr_flags2str(int flags, char *buf, size_t size)
-- 
2.14.3

From b203c89d862a6ae3e82122fe1b6882b427d53551 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Wed, 8 Jan 2014 01:44:58 +0100
Subject: [PATCH] addr: add address flag IFA_F_NOPREFIXROUTE

Signed-off-by: Thomas Haller <thaller@redhat.com>
---
 include/linux/if_addr.h | 1 +
 lib/route/addr.c        | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index 94b32b4..7d4de85 100644
--- a/include/linux/if_addr.h
+++ b/include/linux/if_addr.h
@@ -49,6 +49,7 @@ enum {
 #define IFA_F_TENTATIVE		0x40
 #define IFA_F_PERMANENT		0x80
 #define IFA_F_MANAGETEMPADDR	0x100
+#define IFA_F_NOPREFIXROUTE	0x200
 
 struct ifa_cacheinfo {
 	__u32	ifa_prefered;
diff --git a/lib/route/addr.c b/lib/route/addr.c
index 188611a..97905f0 100644
--- a/lib/route/addr.c
+++ b/lib/route/addr.c
@@ -1057,6 +1057,7 @@ static const struct trans_tbl addr_flags[] = {
 	__ADD(IFA_F_TENTATIVE, tentative)
 	__ADD(IFA_F_PERMANENT, permanent)
 	__ADD(IFA_F_MANAGETEMPADDR, mngtmpaddr)
+	__ADD(IFA_F_NOPREFIXROUTE, noprefixroute)
 };
 
 char *rtnl_addr_flags2str(int flags, char *buf, size_t size)
-- 
2.14.3

openSUSE Build Service is sponsored by