ipmr: Use full VIF ID in netlink cache reports
authorPaul Davey <paul.davey@alliedtelesis.co.nz>
Mon, 7 Sep 2020 22:04:08 +0000 (10:04 +1200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Sep 2020 19:25:51 +0000 (12:25 -0700)
Insert the full 16 bit VIF ID into ipmr Netlink cache reports.

The VIF_ID attribute has 32 bits of space so can store the full VIF ID
extracted from the high and low byte fields in the igmpmsg.

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

index 4809318f591b0a4d79f55d338873f3e75eb1375d..939792a3881461275b9c7fae5b3a5e0881a59584 100644 (file)
@@ -2432,7 +2432,7 @@ static void igmpmsg_netlink_event(struct mr_table *mrt, struct sk_buff *pkt)
        rtgenm = nlmsg_data(nlh);
        rtgenm->rtgen_family = RTNL_FAMILY_IPMR;
        if (nla_put_u8(skb, IPMRA_CREPORT_MSGTYPE, msg->im_msgtype) ||
-           nla_put_u32(skb, IPMRA_CREPORT_VIF_ID, msg->im_vif) ||
+           nla_put_u32(skb, IPMRA_CREPORT_VIF_ID, msg->im_vif | (msg->im_vif_hi << 8)) ||
            nla_put_in_addr(skb, IPMRA_CREPORT_SRC_ADDR,
                            msg->im_src.s_addr) ||
            nla_put_in_addr(skb, IPMRA_CREPORT_DST_ADDR,