On Tue, Nov 17, 2009 at 11:39 PM, Arnd Bergmann <[email protected]> wrote:
> From: Eric Biederman <[email protected]>
>
> Switch ports do not send packets back out the same port they came
> in on.  This causes problems when using a macvlan device inside
> of a network namespace as it becomes impossible to talk to
> other macvlan devices.
>
> Signed-off-by: Eric Biederman <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>

I found a problem:

> @@ -140,20 +145,45 @@ static void macvlan_broadcast(struct sk_buff *skb,
>        }
>  }
>
> +static int macvlan_unicast(struct sk_buff *skb, const struct macvlan_dev 
> *dest)
> +{
> +       struct net_device *dev = dest->dev;
> +
> +       if (unlikely(!dev->flags & IFF_UP)) {

parentheses are missing:

if (unlikely(!(dev->flags & IFF_UP))) {

> +               kfree_skb(skb);
> +               return NET_XMIT_DROP;
> +       }
> +
> +       skb = skb_share_check(skb, GFP_ATOMIC);
> +       if (!skb) {
> +               dev->stats.rx_errors++;
> +               dev->stats.rx_dropped++;
> +               return NET_XMIT_DROP;
> +       }
> +
> +       dev->stats.rx_bytes += skb->len + ETH_HLEN;
> +       dev->stats.rx_packets++;
> +
> +       skb->dev = dev;
> +       skb->pkt_type = PACKET_HOST;
> +       netif_rx(skb);
> +       return NET_XMIT_SUCCESS;
> +}
_______________________________________________
Bridge mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/bridge

Reply via email to