@@ -111,9 +111,16 @@ static int macvlan_broadcast_one(struct sk_buff *skb,
const struct ethhdr *eth, bool local)
{
struct net_device *dev = vlan->dev;
+
if (!skb)
return NET_RX_DROP;
+ if (!(dev->flags & IFF_UP)) {
+ kfree_skb(skb);
+ return NET_RX_DROP;
+ }
+
+ skb_dst_drop(skb);
if (local)
return vlan->forward(dev, skb);
@@ -220,6 +227,7 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb)
if (!skb)
goto out;
+ skb_dst_drop(skb);
skb->dev = dev;
skb->pkt_type = PACKET_HOST;