mirror of https://gitee.com/openkylin/linux.git
net: mpls: Update lfib_nlmsg_size to skip deleted nexthops
A recent commit skips nexthops in a route if the device has been deleted. Update lfib_nlmsg_size accordingly. Reported-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Acked-by: Robert Shearman <rshearma@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d0281a56b0
commit
e944e97afc
|
@ -1880,6 +1880,8 @@ static inline size_t lfib_nlmsg_size(struct mpls_route *rt)
|
|||
size_t nhsize = 0;
|
||||
|
||||
for_nexthops(rt) {
|
||||
if (!rtnl_dereference(nh->nh_dev))
|
||||
continue;
|
||||
nhsize += nla_total_size(sizeof(struct rtnexthop));
|
||||
/* RTA_VIA */
|
||||
if (nh->nh_via_table != MPLS_NEIGH_TABLE_UNSPEC)
|
||||
|
|
Loading…
Reference in New Issue