mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
net/ipv4: Add extack message that dev is required for ONLINK
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>
This commit is contained in:
parent
7788174e87
commit
066b103008
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user