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

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

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2022-02-04 03:08:05

On Thu, 3 Feb 2022 17:31:06 +0100 Jacques de Laval wrote:
quoted hunk ↗ jump to hunk
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.
quoted hunk ↗ jump to hunk
 };
 
 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 hunk ↗ jump to hunk
@@ -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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help