[lustre-devel] [PATCH 10/22] lnet: fix build issue when IPv6 is disabled.

James Simmons jsimmons at infradead.org
Sun Nov 20 06:16:56 PST 2022


struct inet6_dev and struct inet6_ifaddr are not defined if IPv6
is not configured for the Linux kernel.

Fixes: 351a6df78c3 ("lnet: support IPv6 in lnet_inet_enumerate()")
WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: 896cd5b7bcf94d4fd ("LU-10391 lnet: fix build issue when IPv6 is disabled.")
Signed-off-by: James Simmons <jsimmons at infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48990
Reviewed-by: Chris Horn <chris.horn at hpe.com>
Reviewed-by: Neil Brown <neilb at suse.de>
Reviewed-by: Frank Sehr <fsehr at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
---
 net/lnet/lnet/config.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/lnet/lnet/config.c b/net/lnet/lnet/config.c
index 4b2d776..5bfae4e 100644
--- a/net/lnet/lnet/config.c
+++ b/net/lnet/lnet/config.c
@@ -1501,8 +1501,10 @@ int lnet_inet_enumerate(struct lnet_inetdev **dev_list, struct net *ns, bool v6)
 		int flags = dev_get_flags(dev);
 		const struct in_ifaddr *ifa;
 		struct in_device *in_dev;
+#if IS_ENABLED(CONFIG_IPV6)
 		struct inet6_dev *in6_dev;
 		const struct inet6_ifaddr *ifa6;
+#endif
 		int node_id;
 		int cpt;
 
-- 
1.8.3.1



More information about the lustre-devel mailing list