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

ipmr: Add route table ID to netlink cache reports

Insert the multicast route table ID as a Netlink attribute to Netlink
cache report notifications.

When multiple route tables are in use it is necessary to have a way to
determine which route table a given cache report belongs to when
receiving the cache report.

Signed-off-by: Paul Davey <paul.davey@alliedtelesis.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Paul Davey and committed by
David S. Miller
501cb008 4f6a5caf

+4 -1
+1
include/uapi/linux/mroute.h
··· 169 169 IPMRA_CREPORT_SRC_ADDR, 170 170 IPMRA_CREPORT_DST_ADDR, 171 171 IPMRA_CREPORT_PKT, 172 + IPMRA_CREPORT_TABLE, 172 173 __IPMRA_CREPORT_MAX 173 174 }; 174 175 #define IPMRA_CREPORT_MAX (__IPMRA_CREPORT_MAX - 1)
+3 -1
net/ipv4/ipmr.c
··· 2396 2396 + nla_total_size(4) /* IPMRA_CREPORT_VIF_ID */ 2397 2397 + nla_total_size(4) /* IPMRA_CREPORT_SRC_ADDR */ 2398 2398 + nla_total_size(4) /* IPMRA_CREPORT_DST_ADDR */ 2399 + + nla_total_size(4) /* IPMRA_CREPORT_TABLE */ 2399 2400 /* IPMRA_CREPORT_PKT */ 2400 2401 + nla_total_size(payloadlen) 2401 2402 ; ··· 2432 2431 nla_put_in_addr(skb, IPMRA_CREPORT_SRC_ADDR, 2433 2432 msg->im_src.s_addr) || 2434 2433 nla_put_in_addr(skb, IPMRA_CREPORT_DST_ADDR, 2435 - msg->im_dst.s_addr)) 2434 + msg->im_dst.s_addr) || 2435 + nla_put_u32(skb, IPMRA_CREPORT_TABLE, mrt->id)) 2436 2436 goto nla_put_failure; 2437 2437 2438 2438 nla = nla_reserve(skb, IPMRA_CREPORT_PKT, payloadlen);