Thread (7 messages) 7 messages, 3 authors, 2022-02-07

Re: [PATCH net-next 1/1] net: Add new protocol attribute to IP addresses

From: Jacques de Laval <hidden>
Date: 2022-02-04 18:40:50

On 2022-02-04 19:07 -0800, David Ahern wrote:
On Thu, 3 Feb 2022 17:31:06 +0100 Jacques de Laval wrote:
quoted
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 653e7d0f65cb..f7c270b24167 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -73,6 +73,8 @@ struct inet6_ifaddr {
 
 	struct rcu_head		rcu;
 	struct in6_addr		peer_addr;
+
+	__u8			ifa_proto;
nit: the __ types are for uAPI, you can use a normal u8 here.
Thanks you! I will fix this in v2.
quoted
 };
 
 struct ip6_sf_socklist {
diff --git a/include/uapi/linux/if_addr.h b/include/uapi/linux/if_addr.h
index dfcf3ce0097f..2aa46b9c9961 100644
--- a/include/uapi/linux/if_addr.h
+++ b/include/uapi/linux/if_addr.h
quoted
@@ -69,4 +70,7 @@ struct ifa_cacheinfo {
 #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
 #endif
 
+/* ifa_protocol */
+#define IFAPROT_UNSPEC	0
+
 #endif
What's the purpose of defining this as a constant?
Agreed, there's not much point if no other protocol labels are reserved.
If I can't come up with a list of labels that a reasonable to reserve I
should remove the constant in v2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help