diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-09 09:11:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-09 09:11:21 +0200 |
commit | 0154ec71d597692a0d0682b19eac4b3adfb7f3dc (patch) | |
tree | 121b4ac35146f5696da090d3ae2534c76523e6c2 /net/core/fib_rules.c | |
parent | VMCI: Fixup atomic64_t abuse (diff) | |
parent | Linux 5.2-rc4 (diff) | |
download | linux-0154ec71d597692a0d0682b19eac4b3adfb7f3dc.tar.xz linux-0154ec71d597692a0d0682b19eac4b3adfb7f3dc.zip |
Merge 5.2-rc4 into char-misc-next
We want the char/misc driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/fib_rules.c')
-rw-r--r-- | net/core/fib_rules.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 43f0115cce9c..dd220ce7ca7a 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -1,10 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * net/core/fib_rules.c Generic Routing Rules * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, version 2. - * * Authors: Thomas Graf <tgraf@suug.ch> */ @@ -757,9 +754,9 @@ int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, if (err) goto errout; - if (rule_exists(ops, frh, tb, rule)) { - if (nlh->nlmsg_flags & NLM_F_EXCL) - err = -EEXIST; + if ((nlh->nlmsg_flags & NLM_F_EXCL) && + rule_exists(ops, frh, tb, rule)) { + err = -EEXIST; goto errout_free; } |