aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/fib_rules.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 0d8bb2efb0c1..7ac602cc8c85 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -450,9 +450,13 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,
450 if (rule->action == FR_ACT_GOTO && rule->ctarget == NULL) 450 if (rule->action == FR_ACT_GOTO && rule->ctarget == NULL)
451 frh->flags |= FIB_RULE_UNRESOLVED; 451 frh->flags |= FIB_RULE_UNRESOLVED;
452 452
453 if (rule->ifname[0]) 453 if (rule->ifname[0]) {
454 NLA_PUT_STRING(skb, FRA_IFNAME, rule->ifname); 454 NLA_PUT_STRING(skb, FRA_IFNAME, rule->ifname);
455 455
456 if (rule->ifindex == -1)
457 frh->flags |= FIB_RULE_DEV_DETACHED;
458 }
459
456 if (rule->pref) 460 if (rule->pref)
457 NLA_PUT_U32(skb, FRA_PRIORITY, rule->pref); 461 NLA_PUT_U32(skb, FRA_PRIORITY, rule->pref);
458 462