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]
Date:   Wed, 15 Mar 2017 09:22:10 -0600
From:   David Ahern <dsa@...ulusnetworks.com>
To:     Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, idosch@...lanox.com, mlxsw@...lanox.com,
        shm@...ulusnetworks.com, kuznet@....inr.ac.ru, jmorris@...ei.org,
        yoshfuji@...ux-ipv6.org, kaber@...sh.net, lorenzo@...gle.com,
        mateusz.bajorski@...ia.com
Subject: Re: [patch net-next v2 3/9] ipv4: fib_rules: Dump FIB rules when
 registering FIB notifier

On 3/15/17 5:05 AM, Jiri Pirko wrote:
> @@ -2510,10 +2511,20 @@ static void mlxsw_sp_router_fib4_abort(struct mlxsw_sp *mlxsw_sp)
>  		dev_warn(mlxsw_sp->bus_info->dev, "Failed to set abort trap.\n");
>  }
>  
> +static bool mlxsw_sp_fib4_rule_default(const struct fib_rule *rule)
> +{
> +	if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL ||
> +	    (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN &&
> +	     rule->table != RT_TABLE_DEFAULT))
> +		return false;
> +	return true;
> +}
> +

Since a default rule is defined by fib_default_rule_add(), and its
callers, IPv4 and IPv6 should have the above as an exported helper.

Powered by blists - more mailing lists