diff options
| author | Fernando Fernandez Mancera <fmancera@suse.de> | 2026-03-25 13:08:48 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-03-29 11:21:23 -0700 |
| commit | d98adfbdd5c014f73d5f5e6b43735cc1b2d9450a (patch) | |
| tree | 8758f221e4168850bdf82fca30010ab851ba7484 /net/ipv4/route.c | |
| parent | 29ae61b2fe7eeafc921a1481230aac4431520418 (diff) | |
| download | linux-next-d98adfbdd5c014f73d5f5e6b43735cc1b2d9450a.tar.gz linux-next-d98adfbdd5c014f73d5f5e6b43735cc1b2d9450a.zip | |
ipv4: drop ipv6_stub usage and use direct function calls
As IPv6 is built-in only, the ipv6_stub infrastructure is no longer
necessary.
The IPv4 stack interacts with IPv6 mainly to support IPv4 routes with
IPv6 next-hops (RFC 8950). Convert all these cross-family calls from
ipv6_stub to direct function calls. The fallback functions introduced
previously will prevent linkage errors when CONFIG_IPV6 is disabled.
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Tested-by: Ricardo B. Marlière <rbm@suse.com>
Link: https://patch.msgid.link/20260325120928.15848-8-fmancera@suse.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/route.c')
| -rw-r--r-- | net/ipv4/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 463236e0dc2d..bc1296f0ea69 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -446,8 +446,8 @@ static void ipv4_confirm_neigh(const struct dst_entry *dst, const void *daddr) if (rt->rt_gw_family == AF_INET) { pkey = (const __be32 *)&rt->rt_gw4; - } else if (rt->rt_gw_family == AF_INET6) { - return __ipv6_confirm_neigh_stub(dev, &rt->rt_gw6); + } else if (IS_ENABLED(CONFIG_IPV6) && rt->rt_gw_family == AF_INET6) { + return __ipv6_confirm_neigh(dev, &rt->rt_gw6); } else if (!daddr || (rt->rt_flags & (RTCF_MULTICAST | RTCF_BROADCAST | RTCF_LOCAL))) { |
