I think the upstream kernel has a similar issue with tunneling.
I'm preparing a patch.

thanks,

On Tue, Jun 25, 2013 at 05:11:47PM +0900, Isaku Yamahata wrote:
> Reset skb->pkt_type when sending tunneled packets.
> Packet can have pkt_type of PACKET_OTHERHOST when coming to ovs bridge.
> If such packets are handled by loopback device, the packet is dropped
> by ip_rcv().
> On the other hand when flow rule isn't installed in kernel datapath,
> OVS_ACTION_ATTR_OUTPUT is used to send the packet. In that case, packet
> isn't dropped.
> 
> netns A |                      root netns                     | netns B
>    veth<->veth=ovs bridge=gre<-loop back->gre=ovs bridge=veth<->veth
> 
> arp packet ->
> pkt_type
>          BROADCAST------------>ip_rcv()------------------------>
> 
>                                                              <- arp reply
>                                                                 pkt_type
> 
>                                                          rule exists
>                                ip_rcv()<-----------------OTHERHOST
>                                drop
> 
>           <--------------------ip_rcv()<--- PACKET_HOST  rule doesn't exists
>                                pass         ^              |
>                                             |              |upcall
>                                             |              V
>                                             OVS_ACTION_ATTR_OUTPUT
>                                             ovs-switchd
> 
> Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp>
> ---
>  datapath/tunnel.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/datapath/tunnel.c b/datapath/tunnel.c
> index 8c93e18..1975c7b 100644
> --- a/datapath/tunnel.c
> +++ b/datapath/tunnel.c
> @@ -275,6 +275,7 @@ int ovs_tnl_send(struct vport *vport, struct sk_buff *skb,
>                       skb_dst_set(skb, dst_clone(&rt_dst(rt)));
>               else
>                       skb_dst_set(skb, &rt_dst(rt));
> +             skb->pkt_type = PACKET_HOST;
>  
>               /* Push Tunnel header. */
>               build_header(vport, skb, tunnel_hlen);
> -- 
> 1.7.10.4
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
> 

-- 
yamahata
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to