aboutsummaryrefslogtreecommitdiff
path: root/net/decnet/dn_rules.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-04-23 10:21:25 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-23 10:21:25 -0400
commitec8c360a6ecdea595aff957c6a720e059275f1f4 (patch)
tree27d935b093ea81e976b6b14778d462c2bcf87d32 /net/decnet/dn_rules.c
parenta56e6bcd34b55182159d16fcf6d6105578dfa192 (diff)
parentb16fb418b1bf2a9f14d5d2a4fe29bde1f5550b37 (diff)
Merge branch 'fib-rules-extack-support'
Roopa Prabhu says: ==================== fib rules extack support First patch refactors code to move fib rule netlink handling into a common function. This became obvious when adding duplicate extack msgs in add and del paths. Second patch adds extack msgs. v2 - Dropped the ip route get support and selftests from the series to look at the input path some more (as pointed out by ido). Will come back to that next week when i have some time. resending just the extack part for now. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_rules.c')
-rw-r--r--net/decnet/dn_rules.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index c795c3f509c9..72236695db3d 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -121,13 +121,16 @@ static int dn_fib_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
static int dn_fib_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct fib_rule_hdr *frh,
- struct nlattr **tb)
+ struct nlattr **tb,
+ struct netlink_ext_ack *extack)
{
int err = -EINVAL;
struct dn_fib_rule *r = (struct dn_fib_rule *)rule;
- if (frh->tos)
+ if (frh->tos) {
+ NL_SET_ERR_MSG(extack, "Invalid tos value");
goto errout;
+ }
if (rule->table == RT_TABLE_UNSPEC) {
if (rule->action == FR_ACT_TO_TBL) {