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

From: Fernando Fernandez Mancera

Date: Wed Mar 18 2026 - 06:45:05 EST


On 3/17/26 9:12 PM, Ido Schimmel wrote:
On Tue, Mar 17, 2026 at 03:01:00PM +0100, Fernando Fernandez Mancera wrote:
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index d38783a2ce57..6152401f29f1 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -69,6 +69,12 @@ struct prefix_info;
extern struct neigh_table nd_tbl;
+#if IS_ENABLED(CONFIG_IPV6)
+#define ipv6_get_nd_tbl() (&nd_tbl)
+#else
+#define ipv6_get_nd_tbl() NULL
+#endif

What is the reason for converting code that is dependent on CONFIG_IPV6
to use ipv6_get_nd_tbl()?

I did it mainly for consistency. If you think this isn't fine, I can move it back to &nd_tbl directly.

Thanks,
Fernando.