projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7788174
)
net/ipv4: Add extack message that dev is required for ONLINK
author
David Ahern
<dsahern@gmail.com>
Wed, 29 Aug 2018 23:53:27 +0000
(16:53 -0700)
committer
David S. Miller
<davem@davemloft.net>
Sat, 1 Sep 2018 06:04:03 +0000
(23:04 -0700)
Make IPv4 consistent with IPv6 and return an extack message that the
ONLINK flag requires a nexthop device.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/fib_semantics.c
b/net/ipv4/fib_semantics.c
index f3c89ccf14c5b8f67048a9cf7ebd4ba19327941e..bee8db979195e72f620b2bbf8e3385b51b774a11 100644
(file)
--- a/
net/ipv4/fib_semantics.c
+++ b/
net/ipv4/fib_semantics.c
@@
-797,8
+797,10
@@
static int fib_check_nh(struct fib_config *cfg, struct fib_nh *nh,
return -EINVAL;
}
dev = __dev_get_by_index(net, nh->nh_oif);
- if (!dev)
+ if (!dev) {
+ NL_SET_ERR_MSG(extack, "Nexthop device required for onlink");
return -ENODEV;
+ }
if (!(dev->flags & IFF_UP)) {
NL_SET_ERR_MSG(extack,
"Nexthop device is not up");