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

2016-05-31 Thread David Miller
From: David Ahern Date: Mon, 30 May 2016 20:21:29 -0600 > missing a namespace (fr_net) compare. Everything else is relative to > it. > > I suggest making the rule compare a helper function. I also explicitly asked the submitted to use a helper function.

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

2016-05-30 Thread David Ahern
On 5/30/16 3:17 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 v2] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule

2016-05-30 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; }