Re: [PATCH 04/10 net-next v2] ipv6: prepare headers for ipv6_stub removal

From: David Ahern

Date: Tue Mar 10 2026 - 13:11:18 EST


On 3/10/26 9:34 AM, Fernando Fernandez Mancera wrote:
> diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
> index 39c98c3d8ac5..62a1e96bbdd4 100644
> --- a/include/net/ip6_fib.h
> +++ b/include/net/ip6_fib.h
> @@ -486,11 +486,29 @@ void rt6_get_prefsrc(const struct rt6_info *rt, struct in6_addr *addr)
> rcu_read_unlock();
> }
>
> +#if IS_ENABLED(CONFIG_IPV6)
> int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
> struct fib6_config *cfg, gfp_t gfp_flags,
> struct netlink_ext_ack *extack);
> void fib6_nh_release(struct fib6_nh *fib6_nh);
> void fib6_nh_release_dsts(struct fib6_nh *fib6_nh);
> +#else
> +static inline int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
> + struct fib6_config *cfg, gfp_t gfp_flags,
> + struct netlink_ext_ack *extack)
> +{

NL_SET_ERR_MSG(extack, "IPv6 support not enabled in kernel");

let's keep the helpful, user facing message

> + return -EAFNOSUPPORT;
> +}
> +
> +static inline void fib6_nh_release(struct fib6_nh *fib6_nh)
> +{
> +}
> +
> +static inline void fib6_nh_release_dsts(struct fib6_nh *fib6_nh)
> +{
> +}
> +#endif
> +
>
> int call_fib6_entry_notifiers(struct net *net,
> enum fib_event_type event_type,