ipv4: Allow sending multicast packets on specific i/f using VRF socket
authorRobert Shearman <rshearma@vyatta.att-mail.com>
Mon, 1 Oct 2018 08:40:23 +0000 (09:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Oct 2018 05:28:17 +0000 (22:28 -0700)
commit854da991733d1b4f60042423875e32be7f8f0421
treecb646dc4e274a9b6472f6b1d66f5d2e299a21574
parent6919622af3a8d92ee73886ebfe22c69ecf4c650c
ipv4: Allow sending multicast packets on specific i/f using VRF socket

It is useful to be able to use the same socket for listening in a
specific VRF, as for sending multicast packets out of a specific
interface. However, the bound device on the socket currently takes
precedence and results in the packets not being sent.

Relax the condition on overriding the output interface to use for
sending packets out of UDP, raw and ping sockets to allow multicast
packets to be sent using the specified multicast interface.

Signed-off-by: Robert Shearman <rshearma@vyatta.att-mail.com>
Signed-off-by: Mike Manning <mmanning@vyatta.att-mail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/datagram.c
net/ipv4/ping.c
net/ipv4/raw.c
net/ipv4/udp.c