Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtnetlink: add NEWCACHEREPORT message type

New NEWCACHEREPORT message type to be used for cache reports sent
via Netlink, effectively allowing splitting cache report reception from
mroute programming.

Suggested-by: Ryan Halbrook <halbrook@arista.com>
Signed-off-by: Julien Gomes <julien@arista.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Julien Gomes and committed by
David S. Miller
94df30a6 083a0326

+5 -1
+3
include/uapi/linux/rtnetlink.h
··· 146 146 RTM_GETSTATS = 94, 147 147 #define RTM_GETSTATS RTM_GETSTATS 148 148 149 + RTM_NEWCACHEREPORT = 96, 150 + #define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT 151 + 149 152 __RTM_MAX, 150 153 #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) 151 154 };
+2 -1
security/selinux/nlmsgtab.c
··· 79 79 { RTM_GETNSID, NETLINK_ROUTE_SOCKET__NLMSG_READ }, 80 80 { RTM_NEWSTATS, NETLINK_ROUTE_SOCKET__NLMSG_READ }, 81 81 { RTM_GETSTATS, NETLINK_ROUTE_SOCKET__NLMSG_READ }, 82 + { RTM_NEWCACHEREPORT, NETLINK_ROUTE_SOCKET__NLMSG_READ }, 82 83 }; 83 84 84 85 static const struct nlmsg_perm nlmsg_tcpdiag_perms[] = ··· 159 158 switch (sclass) { 160 159 case SECCLASS_NETLINK_ROUTE_SOCKET: 161 160 /* RTM_MAX always point to RTM_SETxxxx, ie RTM_NEWxxx + 3 */ 162 - BUILD_BUG_ON(RTM_MAX != (RTM_NEWSTATS + 3)); 161 + BUILD_BUG_ON(RTM_MAX != (RTM_NEWCACHEREPORT + 3)); 163 162 err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms, 164 163 sizeof(nlmsg_route_perms)); 165 164 break;