History

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.

Donald Sharp committed 8 years ago

Commit 1b71af61 parent cc30c934 files · +20 −8Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/fib_rules.h+3−2
@@ -23,8 +23,8 @@ struct fib_rule_hdr { · 22 unmodified lines
23 __u8 tos;23 __u8 tos;
24 24
25 __u8 table;25 __u8 table;
26 __u8 proto;26 __u8 res1; /* reserved */
27 __u8 res1; /* reserved */27 __u8 res2; /* reserved */
28 __u8 action;28 __u8 action;
29 29
30 __u32 flags;30 __u32 flags;
@@ -58,6 +58,7 @@ enum { · 27 unmodified lines
58 FRA_PAD,58 FRA_PAD,
59 FRA_L3MDEV, /* iif or oif is l3mdev goto its table */59 FRA_L3MDEV, /* iif or oif is l3mdev goto its table */
60 FRA_UID_RANGE, /* UID range */60 FRA_UID_RANGE, /* UID range */
61 FRA_PROTOCOL, /* Originator of the rule */
61 __FRA_MAX62 __FRA_MAX
62};63};
63 64