Hi,

On Mon, Nov 26, 2018 at 04:06:27PM -0800, Stephen Hemminger wrote:
> On Tue, 31 Oct 2017 16:28:20 -0700
> Cong Wang <xiyou.wangc...@gmail.com> wrote:
> 
> > On Tue, Oct 31, 2017 at 2:10 PM, Stephen Hemminger
> > <step...@networkplumber.org> wrote:
> > >
> > > IPPROTO_MH comes from include/uapi/linux/in6.h
> > > Maybe it is trying to use old kernel headers from libc.  

That header defines it only if __UAPI_DEF_IPPROTO_V6 is defined to a
non-zero value. When compiling upstream iproute2 on my system, this is
not the case. I also see why:

- ip/xfrm_policy.c includes <netdb.h>
  - netdb.h includes <netinet/in.h>
    - netinet/in.h defines _NETINET_IN_H
- ip/xfrm_policy.c then includes "xfrm.h"
  - ip/xfrm.h includes <linux/xfrm.h>
    - linux/xfrm.h includes <linux/in6.h>
      - linux/in6.h includes <linux/libc-compat.h>
        - linux/libc-compat.h defines __UAPI_DEF_IPPROTO_V6 to 0 if
          _NETINET_IN_H is defined.

Note that I didn't follow all includes so the above is not necessarily
what exactly happens. But either way, ip/xfrm_policy.c doesn't get
IPPROTO_MH define from include/uapi/linux/in6.h.

Cheers, Phil

Reply via email to