net: fib_rules: Add new attribute to set protocol
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 23 Feb 2018 19:01:52 +0000 (14:01 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Feb 2018 20:47:20 +0000 (15:47 -0500)
commit1b71af6053af1bd2f849e9fda4f71c1e3f145dcf
treee639fa9311e511e388b3ccf0efa6cc36abb2bb69
parentcc30c93fa020e13c91f5076e20062df33f944cdc
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: cac56209a66 ("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>
drivers/net/vrf.c
include/net/fib_rules.h
include/uapi/linux/fib_rules.h
net/core/fib_rules.c