net: fib_rules: set family in fib_rule_hdr centrally
All fib_rules implementations need to set the family in their ->fill() functions. Since the value is available to the generic fib_nl_fill_rule() function, set it there. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d8a566beaa
commit
28bb17268b
4 changed files with 1 additions and 3 deletions
|
@ -535,6 +535,7 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,
|
|||
return -EMSGSIZE;
|
||||
|
||||
frh = nlmsg_data(nlh);
|
||||
frh->family = ops->family;
|
||||
frh->table = rule->table;
|
||||
NLA_PUT_U32(skb, FRA_TABLE, rule->table);
|
||||
frh->res1 = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue