All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
To: Florian Westphal <fw@strlen.de>, Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] ipset: allow a 0 netmask with hash_netiface type
Date: Wed, 13 Jan 2016 09:35:02 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.10.1601130933320.22698@blackhole.kfki.hu> (raw)
In-Reply-To: <1452614825-19749-1-git-send-email-fw@strlen.de>

Hi Pablo,

Please apply the patch to the nf tree, thanks!

On Tue, 12 Jan 2016, Florian Westphal wrote:

> Jozsef says:
>  The correct behaviour is that if we have
>  ipset create test1 hash:net,iface
>  ipset add test1 0.0.0.0/0,eth0
>  iptables -A INPUT -m set --match-set test1 src,src
> 
>  then the rule should match for any traffic coming in through eth0.
> 
> This removes the -EINVAL runtime test to make matching work
> in case packet arrived via the specified interface.
> 
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1297092
> Signed-off-by: Florian Westphal <fw@strlen.de>

Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>

Best regards,
Jozsef

> ---
> diff --git a/net/netfilter/ipset/ip_set_hash_netiface.c b/net/netfilter/ipset/ip_set_hash_netiface.c
> index 43d8c98..f0f688d 100644
> --- a/net/netfilter/ipset/ip_set_hash_netiface.c
> +++ b/net/netfilter/ipset/ip_set_hash_netiface.c
> @@ -164,8 +164,6 @@ hash_netiface4_kadt(struct ip_set *set, const struct sk_buff *skb,
>  	};
>  	struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set);
>  
> -	if (e.cidr == 0)
> -		return -EINVAL;
>  	if (adt == IPSET_TEST)
>  		e.cidr = HOST_MASK;
>  
> @@ -377,8 +375,6 @@ hash_netiface6_kadt(struct ip_set *set, const struct sk_buff *skb,
>  	};
>  	struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set);
>  
> -	if (e.cidr == 0)
> -		return -EINVAL;
>  	if (adt == IPSET_TEST)
>  		e.cidr = HOST_MASK;
>  
> -- 
> 2.4.10
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary

  parent reply	other threads:[~2016-01-13  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 16:07 [PATCH nf] ipset: allow a 0 netmask with hash_netiface type Florian Westphal
2016-01-12 19:51 ` Jozsef Kadlecsik
2016-01-12 19:53   ` Florian Westphal
2016-01-12 20:38     ` Jozsef Kadlecsik
2016-01-13  8:33     ` Jozsef Kadlecsik
2016-01-13  8:35 ` Jozsef Kadlecsik [this message]
2016-01-13 13:07   ` 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=alpine.DEB.2.10.1601130933320.22698@blackhole.kfki.hu \
    --to=kadlec@blackhole.kfki.hu \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.