net: fib_rules: Add new attribute to set protocol
For ages iproute2 has used `struct rtmsg` as the ancillary header for
FIB rules and in the process set the protocol value to RTPROT_BOOT.
Until ca56209a66 ("net: Allow a rule to track originating protocol")
the kernel rules code ignored the protocol value sent from userspace
and always returned 0 in notifications. To avoid incompatibility with
existing iproute2, send the protocol as a new attribute.
Fixes: cac56209a6 ("net: Allow a rule to track originating protocol")
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
cc30c93fa0
commit
1b71af6053
@@ -109,7 +109,8 @@ struct fib_rule_notifier_info {
|
||||
[FRA_SUPPRESS_IFGROUP] = { .type = NLA_U32 }, \
|
||||
[FRA_GOTO] = { .type = NLA_U32 }, \
|
||||
[FRA_L3MDEV] = { .type = NLA_U8 }, \
|
||||
[FRA_UID_RANGE] = { .len = sizeof(struct fib_rule_uid_range) }
|
||||
[FRA_UID_RANGE] = { .len = sizeof(struct fib_rule_uid_range) }, \
|
||||
[FRA_PROTOCOL] = { .type = NLA_U8 }
|
||||
|
||||
static inline void fib_rule_get(struct fib_rule *rule)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user