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, 29 Jun 2016 13:38:54 -0600
From:	David Ahern <dsa@...ulusnetworks.com>
To:	Mateusz Bajorski <mateusz.bajorski@...ia.com>,
	netdev@...r.kernel.org
Subject: Re: [PATCH v4] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule

On 6/29/16 1:22 AM, Mateusz Bajorski wrote:
> When adding rule with NLM_F_EXCL flag then check if the same rule exist.
> If yes then exit with -EEXIST.
>
> This is already implemented in iproute2:
>         if (cmd == RTM_NEWRULE) {
>                 req.n.nlmsg_flags |= NLM_F_CREATE|NLM_F_EXCL;
>                 req.r.rtm_type = RTN_UNICAST;
>         }
>
> Tested ipv4 and ipv6 with net-next linux on qemu x86
>
> expected behavior after patch:
> localhost ~ # ip rule
> 0:    from all lookup local
> 32766:    from all lookup main
> 32767:    from all lookup default
> localhost ~ # ip rule add from 10.46.177.97 lookup 104 pref 1005
> localhost ~ # ip rule add from 10.46.177.97 lookup 104 pref 1005
> RTNETLINK answers: File exists
> localhost ~ # ip rule
> 0:    from all lookup local
> 1005:    from 10.46.177.97 lookup 104
> 32766:    from all lookup main
> 32767:    from all lookup default
>
> There was already topic regarding this but I don't see any changes
> merged and problem still occurs.
> https://lkml.kernel.org/r/1135778809.5944.7.camel+%28%29+localhost+%21+localdomain
>
> Signed-off-by: Mateusz Bajorski <mateusz.bajorski@...ia.com>
> ---
> Changes in v2: section moved to new place where new rule is already built
> Changes in v3: compare moved to helper, added fr_net compare
> Changes in v4: added l3mdev compare
>
>  net/core/fib_rules.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
>

Acked-by: David Ahern <dsa@...ulusnetworks.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ