netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net
Subject: Re: [kernel PATCH] uapi: ebtables: don't include linux/if.h
Date: Wed, 8 Apr 2015 19:59:40 +0200	[thread overview]
Message-ID: <20150408175940.GA5358@salvia> (raw)
In-Reply-To: <20150408174140.25208.67942.stgit@nfdev2.cica.es>

On Wed, Apr 08, 2015 at 07:41:40PM +0200, Arturo Borrero Gonzalez wrote:
> From: Pablo Neira Ayuso <pablo@netfilter.org>
> 
> linux/if.h creates conflicts in userspace with net/if.h
> 
> By using it here we force userspace to use linux/if.h while
> net/if.h may be needed.

I'm going to add here that:

include/linux/netfilter_ipv4/ip_tables.h and
include/linux/netfilter_ipv6/ip6_tables.h

don't include linux/if.h and they also refer to IFNAMSIZ, so they are
expecting userspace to include use net/if.h from the client program.

This has been causing us problems in the xt over nft layer.

If nobody objects, I'll push this to nf-next.

> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
> ---
>  include/linux/netfilter_bridge/ebtables.h      |    3 ++-
>  include/uapi/linux/netfilter_bridge/ebtables.h |    2 --
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h
> index 34e7a2b..f1bd396 100644
> --- a/include/linux/netfilter_bridge/ebtables.h
> +++ b/include/linux/netfilter_bridge/ebtables.h
> @@ -12,9 +12,10 @@
>  #ifndef __LINUX_BRIDGE_EFF_H
>  #define __LINUX_BRIDGE_EFF_H
>  
> +#include <linux/if.h>
> +#include <linux/if_ether.h>
>  #include <uapi/linux/netfilter_bridge/ebtables.h>
>  
> -
>  /* return values for match() functions */
>  #define EBT_MATCH 0
>  #define EBT_NOMATCH 1
> diff --git a/include/uapi/linux/netfilter_bridge/ebtables.h b/include/uapi/linux/netfilter_bridge/ebtables.h
> index ba99336..773dfe8 100644
> --- a/include/uapi/linux/netfilter_bridge/ebtables.h
> +++ b/include/uapi/linux/netfilter_bridge/ebtables.h
> @@ -12,9 +12,7 @@
>  
>  #ifndef _UAPI__LINUX_BRIDGE_EFF_H
>  #define _UAPI__LINUX_BRIDGE_EFF_H
> -#include <linux/if.h>
>  #include <linux/netfilter_bridge.h>
> -#include <linux/if_ether.h>
>  
>  #define EBT_TABLE_MAXNAMELEN 32
>  #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN
> 

  reply	other threads:[~2015-04-08 17:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 17:41 [kernel PATCH] uapi: ebtables: don't include linux/if.h Arturo Borrero Gonzalez
2015-04-08 17:59 ` Pablo Neira Ayuso [this message]
2015-04-13 18:10   ` Pablo Neira Ayuso

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=20150408175940.GA5358@salvia \
    --to=pablo@netfilter.org \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.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).