lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd76de9d-48b1-7246-703c-216e6779fe02@cumulusnetworks.com>
Date:   Wed, 28 Feb 2018 15:10:05 +0200
From:   Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To:     Roopa Prabhu <roopa@...ulusnetworks.com>, davem@...emloft.net,
        netdev@...r.kernel.org
Cc:     dsa@...ulusnetworks.com, idosch@...lanox.com, pabeni@...hat.com
Subject: Re: [PATCH net-next v2 3/5] ipv6: fib6_rules: support for match on
 sport, dport and ip proto

On 28/02/18 05:52, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa@...ulusnetworks.com>
> 
> support to match on src port, dst port and ip protocol.
> 
> Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.com>
> ---
>  net/ipv6/fib6_rules.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
> index 95a2c9e..bcd1f22 100644
> --- a/net/ipv6/fib6_rules.c
> +++ b/net/ipv6/fib6_rules.c
> @@ -223,6 +223,17 @@ static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
>  	if (r->tclass && r->tclass != ip6_tclass(fl6->flowlabel))
>  		return 0;
>  
> +	if (rule->ip_proto && (rule->ip_proto != fl6->flowi6_proto))
> +		return 0;
> +
> +	if (fib_rule_port_range_set(&rule->sport_range) &&
> +	    !fib_rule_port_inrange(&rule->sport_range, fl6->fl6_sport))
> +		return 0;
> +
> +	if (fib_rule_port_range_set(&rule->dport_range) &&
> +	    !fib_rule_port_inrange(&rule->dport_range, fl6->fl6_dport))
> +		return 0;
> +
>  	return 1;
>  }
>  
> 

Acked-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ