From: Krister Johansen <kjlx@templeofstupid.com>
To: David Ahern <dsahern@gmail.com>
Cc: Krister Johansen <kjlx@templeofstupid.com>,
Stephen Hemminger <stephen@networkplumber.org>,
netdev@vger.kernel.org, simon.horman@netronome.com
Subject: Re: [PATCH iproute/master 2/3] iptunnel: add support for mpls/ip to sit tunnels
Date: Thu, 15 Jun 2017 11:31:18 -0700 [thread overview]
Message-ID: <20170615183117.GA2704@templeofstupid.com> (raw)
In-Reply-To: <eed46e61-80d0-4c7e-86c7-dc619b849ad8@gmail.com>
On Wed, Jun 14, 2017 at 11:16:20AM -0600, David Ahern wrote:
> On 6/14/17 11:11 AM, Krister Johansen wrote:
> > I did try to fix this up as part of bringing this patch up to date,
> > since it was one of the concerns that David raised too. I believe the
> > problem that I ran into was that IPPROTO_MPLS wasn't defined in all
> > versions of the headers where I tried to include them, and by bringing
> > in in.h, I also managed to get a bunch of errors around re-definition of
> > other symbols.
> >
> > That said, I don't believe that 137 as the IPPROTO_MPLS value should
> > change anytime soon. It's defined in RFC 4023.
> >
> > https://tools.ietf.org/html/rfc4023
> >
> > However, if this is still seems problematic, I can take another shot at
> > attempting to clean this up further.
>
> IPPROTO_MPLS is defined in include/linux/in.h in iproute2.
Right. I poked at this some more yesterday afternoon.
The IPPROTO enum in include/linux/in.h is wrapped in an #if
__UAPI_DEF_IN_IPPROTO. That's defined in include/linux/libc-compat.h.
If _NETINET_IN_H is defined, then __UAPI_DEF_IN_IPPROTO is undefined.
In that case, we pick up the the IPPROTO defs from netinet/in.h. The
addition of IPPROTO_MPLS to utils.h is to cover the case where we're
using a system netinet/in.h that's older and doesn't yet have an
IPPROTO_MPLS defintion. There seems to be prescedent for this, since
utils.h also includes IPPROTO_ESP, IPPROTO_AH, and IPPROTO_COMP.
I spent some time trying to remove includes of netinet/in.h from the
code in this patch, however, it's also included by other system headers
that are included throughout iproute2. I'm not saying removing this is
impossible, but it certainly seems like it's beyond the scope of this
particular patch.
-K
next prev parent reply other threads:[~2017-06-15 18:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 1:31 [PATCH iproute/master 0/3] lost mpls ip tunnel patches Krister Johansen
2017-06-10 1:31 ` [PATCH iproute/master 1/3] iptunnel: document mode parameter for sit tunnels Krister Johansen
2017-06-10 1:31 ` [PATCH iproute/master 2/3] iptunnel: add support for mpls/ip to " Krister Johansen
2017-06-14 17:02 ` Stephen Hemminger
2017-06-14 17:11 ` Krister Johansen
2017-06-14 17:16 ` David Ahern
2017-06-15 18:31 ` Krister Johansen [this message]
2017-06-10 1:31 ` [PATCH iproute/master 3/3] iptunnel: add support for mpls/ip to ipip tunnels Krister Johansen
2017-06-14 17:24 ` [PATCH iproute/master 0/3] lost mpls ip tunnel patches Stephen Hemminger
2017-06-14 17:33 ` Krister Johansen
2017-07-05 16:06 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170615183117.GA2704@templeofstupid.com \
--to=kjlx@templeofstupid.com \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=simon.horman@netronome.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).