summaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2017-05-21 10:12:03 -0600
committerDavid S. Miller <davem@davemloft.net>2017-05-22 12:12:20 -0400
commitc3ab2b4ec8f7c0700bf10957171c479bf3dbca52 (patch)
tree414dc0cf41405e9ab3ca2b3ab97d3a999cbf885a /net/ipv4/fib_frontend.c
parent6d8422a175ccf2846d9460ed2b6228fe0b12c243 (diff)
downloadlinux-stable-c3ab2b4ec8f7c0700bf10957171c479bf3dbca52.tar.gz
linux-stable-c3ab2b4ec8f7c0700bf10957171c479bf3dbca52.tar.bz2
linux-stable-c3ab2b4ec8f7c0700bf10957171c479bf3dbca52.zip
net: ipv4: Add extack messages for route add failures
Add messages for non-obvious errors (e.g, no need to add text for malloc failures or ENODEV failures). This mostly covers the annoying EINVAL errors Some message strings violate the 80-columns but searchable strings need to trump that rule. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 511edff76c01..14d2f7bd7c76 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -656,6 +656,7 @@ static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
cfg->fc_nlinfo.nl_net = net;
if (cfg->fc_type > RTN_MAX) {
+ NL_SET_ERR_MSG(extack, "Invalid route type");
err = -EINVAL;
goto errout;
}
@@ -726,6 +727,7 @@ static int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh,
tb = fib_get_table(net, cfg.fc_table);
if (!tb) {
+ NL_SET_ERR_MSG(extack, "FIB table does not exist");
err = -ESRCH;
goto errout;
}