On Wed, Dec 28, 2011 at 7:20 PM, Ben Pfaff <b...@nicira.com> wrote:
> diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c
> index c56f3b2..31d55fc 100644
> --- a/datapath/vport-internal_dev.c
> +++ b/datapath/vport-internal_dev.c
> @@ -94,11 +94,21 @@ static int internal_dev_mac_addr(struct net_device *dev, 
> void *p)
>  /* Called with rcu_read_lock_bh. */
>  static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
>  {
> +       struct ethhdr *eth;
> +
>        if (unlikely(compute_ip_summed(skb, true))) {
>                kfree_skb(skb);
>                return 0;
>        }
>
> +       /* Set skb->protocol since some sources (e.g. AF_PACKET) don't. */
> +       skb_reset_mac_header(skb);
> +       eth = eth_hdr(skb);
> +       if (ntohs(eth->h_proto) >= 1536)
> +               skb->protocol = eth->h_proto;
> +       else
> +               skb->protocol = htons(ETH_P_802_2);

I see where the problem comes from (it looks like it actually is
possible to set skb->protocol from AF_PACKET, I guess that scapy
doesn't though?).

It seems like a bigger problem that this field isn't initialized than
just for OVS.  Should we be proposing to fix AF_PACKET upstream?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to