[PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device

Subsystems: networking [general], networking [ipv4/ipv6], the rest

STALE1996d

2 messages, 2 authors, 2021-01-30 · open the first message on its own page

[PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device

From: Rocco Yue <hidden>
Date: 2021-01-28 06:11:39

PUREIP device such as ccmni does not need kernel to generate
link-local address in any addr_gen_mode, generally, it shall
use the IPv6 Interface Identifier, as provided by the GGSN,
to create its IPv6 link-ocal Unicast Address.

Signed-off-by: Rocco Yue <redacted>
---
 net/ipv6/addrconf.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 9edc5bb2d531..5e8134d3e704 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3337,7 +3337,8 @@ static void addrconf_dev_config(struct net_device *dev)
 	    (dev->type != ARPHRD_IPGRE) &&
 	    (dev->type != ARPHRD_TUNNEL) &&
 	    (dev->type != ARPHRD_NONE) &&
-	    (dev->type != ARPHRD_RAWIP)) {
+	    (dev->type != ARPHRD_RAWIP) &&
+	    (dev->type != ARPHRD_PUREIP)) {
 		/* Alas, we support only Ethernet autoconfiguration. */
 		idev = __in6_dev_get(dev);
 		if (!IS_ERR_OR_NULL(idev) && dev->flags & IFF_UP &&
@@ -3350,6 +3351,12 @@ static void addrconf_dev_config(struct net_device *dev)
 	if (IS_ERR(idev))
 		return;
 
+	/* this device type doesn't need to generate
+	 * link-local address in any addr_gen_mode
+	 */
+	if (dev->type == ARPHRD_PUREIP)
+		return;
+
 	/* this device type has no EUI support */
 	if (dev->type == ARPHRD_NONE &&
 	    idev->cnf.addr_gen_mode == IN6_ADDR_GEN_MODE_EUI64)
-- 
2.18.0

Re: [PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-01-30 09:49:33

On Thu, 28 Jan 2021 13:58:09 +0800 Rocco Yue wrote:
PUREIP device such as ccmni does not need kernel to generate
link-local address in any addr_gen_mode, generally, it shall
use the IPv6 Interface Identifier, as provided by the GGSN,
to create its IPv6 link-ocal Unicast Address.

Signed-off-by: Rocco Yue <redacted>
There is no ccmni driver in the tree - is this for non-upstream
driver?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help