[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250918123234.297856-1-torin@tcarey.uk>
Date: Thu, 18 Sep 2025 12:32:58 +0000
From: Torin Carey <torin@...rey.uk>
To: wireguard@...ts.zx2c4.com
Cc: netdev@...r.kernel.org, "Jason A. Donenfeld" <Jason@...c4.com>
Subject: [PATCH] wireguard: remove unnecessary use of ipv6_stub
ipv6_stub is required for cases where ipv6 may be compiled as a module
and might not be loaded from a given context.
wireguard has a Kconfig dependence of IPV6 || !IPV6 so will also be compiled
as a module if ipv6 is, and wireguard already accesses a symbol of this module
via ipv6_mod_enabled, so already has a module dependence on ipv6.
Removal is desireable since it removes an unnecessary indirect branch, but
also reduces the effort needed should ipv6_stub ever be modified/replaced.
Signed-off-by: Torin Carey <torin@...rey.uk>
---
drivers/net/wireguard/socket.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireguard/socket.c b/drivers/net/wireguard/socket.c
index 253488f8c00f..593324d564d2 100644
--- a/drivers/net/wireguard/socket.c
+++ b/drivers/net/wireguard/socket.c
@@ -136,8 +136,8 @@ static int send6(struct wg_device *wg, struct sk_buff *skb,
if (cache)
dst_cache_reset(cache);
}
- dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl,
- NULL);
+ dst = ip6_dst_lookup_flow(sock_net(sock), sock, &fl,
+ NULL);
if (IS_ERR(dst)) {
ret = PTR_ERR(dst);
net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n",
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
--
2.48.1
Powered by blists - more mailing lists