ipmr: support IP_PKTINFO on cache report IGMP msg
authorLeone Fernando <leone4fernando@gmail.com>
Wed, 13 Dec 2023 16:19:35 +0000 (17:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Dec 2023 10:27:11 +0000 (10:27 +0000)
commitbb7403655b3c3eb245d0ee330047cd3e20b3c4af
tree75a84c392ae6eeaacc23b6248ac73a5f03747684
parent02fed6d92badf08e2ac2cd1755d14c45c8f3d0ca
ipmr: support IP_PKTINFO on cache report IGMP msg

In order to support IP_PKTINFO on those packets, we need to call
ipv4_pktinfo_prepare.

When sending mrouted/pimd daemons a cache report IGMP msg, it is
unnecessary to set dst on the newly created skb.
It used to be necessary on older versions until
commit d826eb14ecef ("ipv4: PKTINFO doesnt need dst reference") which
changed the way IP_PKTINFO struct is been retrieved.

Changes from v1:
1. Undo changes in ipv4_pktinfo_prepare function. use it directly
   and copy the control block.

Fixes: d826eb14ecef ("ipv4: PKTINFO doesnt need dst reference")
Signed-off-by: Leone Fernando <leone4fernando@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr.c