Commit 1e19c4d6 authored by David Ahern's avatar David Ahern Committed by David S. Miller
Browse files

net: vrf: Add support for sends to local broadcast address

Sukumar reported that sends to the local broadcast address
( are broken. Check for the address in vrf driver
and do not redirect to the VRF device - similar to multicast

With this change sockets can use SO_BINDTODEVICE to specify an
egress interface and receive responses. Note: the egress interface
can not be a VRF device but needs to be the enslaved device.

Reported-by: default avatarSukumar Gopalakrishnan <>
Signed-off-by: default avatarDavid Ahern <>
Signed-off-by: default avatarDavid S. Miller <>
parent a78e9366
......@@ -673,8 +673,9 @@ static struct sk_buff *vrf_ip_out(struct net_device *vrf_dev,
struct sock *sk,
struct sk_buff *skb)
/* don't divert multicast */
if (ipv4_is_multicast(ip_hdr(skb)->daddr))
/* don't divert multicast or local broadcast */
if (ipv4_is_multicast(ip_hdr(skb)->daddr) ||
return skb;
if (qdisc_tx_is_default(vrf_dev))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment