Re: [PATCH v4] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule

2016-06-30 Thread David Miller
From: Mateusz Bajorski Date: Wed, 29 Jun 2016 09:22:10 +0200 > 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_C

Re: [PATCH v4] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule

2016-06-29 Thread David Ahern
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;

[PATCH v4] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule

2016-06-29 Thread Mateusz Bajorski
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; }