If a header that includes linux/in6.h is included before iproute's utils.h, then iproute2 fails to compile on older glibc versions.
Fixes: e8493916a8ede9970732e33ea52d30b83071f401 ("iproute: add support for SR-IPv6 lwtunnel encapsulation") Reported-by: Daniel Borkmann <dan...@iogearbox.net> Signed-off-by: David Lebrun <david.leb...@uclouvain.be> --- ip/iproute_lwtunnel.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c index 1395f03..5c0c7d1 100644 --- a/ip/iproute_lwtunnel.c +++ b/ip/iproute_lwtunnel.c @@ -19,13 +19,6 @@ #include <linux/ila.h> #include <linux/lwtunnel.h> #include <linux/mpls_iptunnel.h> - -#ifndef __USE_KERNEL_IPV6_DEFS -#define __USE_KERNEL_IPV6_DEFS -#endif -#include <linux/seg6.h> -#include <linux/seg6_iptunnel.h> -#include <linux/seg6_hmac.h> #include <errno.h> #include "rt_names.h" @@ -33,6 +26,10 @@ #include "iproute_lwtunnel.h" #include "bpf_util.h" +#include <linux/seg6.h> +#include <linux/seg6_iptunnel.h> +#include <linux/seg6_hmac.h> + static const char *format_encap_type(int type) { switch (type) { -- 2.10.2