lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 2 Apr 2014 07:51:06 -0700 From: Stephen Hemminger <stephen@...workplumber.org> To: lucien xin <lucien.xin@...il.com> Cc: David Miller <davem@...emloft.net>, network dev <netdev@...r.kernel.org> Subject: Re: [PATCH] vxlan: using AF_PACKET socket to send multicast packet cause WARNING On Wed, 2 Apr 2014 13:31:59 +0800 lucien xin <lucien.xin@...il.com> wrote: > On Wed, Apr 2, 2014 at 4:10 AM, David Miller <davem@...emloft.net> wrote: > > This is not the correct fix. > > > > If vxlan is going to reinject dev_hard_start_xmit() bound packets into > > the ipv4 stack, it must make sure that they are well formed. > > > > The SKB traversing the ipv4 stack must either be bound to an ipv4/ipv6 > > socket or be orphaned. > > yeah, it's right. then I want to bound skb to vxlan's sock in > vxlan_xmit_skb(), like this: > > diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c > index 1236812..8fd7e93 100644 > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -1755,6 +1755,8 @@ int vxlan_xmit_skb(struct vxlan_sock *vs, > if (err) > return err; > > + skb_set_owner_w(skb, vs->sock->sk); > + > return iptunnel_xmit(rt, skb, src, dst, IPPROTO_UDP, tos, ttl, df, > false); > } > > which can not only solve the issue, but also make the logic more correct. > David, how do you think? That breaks local socket accounting for tunneled packets. The idea is that a TCP socket sending over vxlan will keep it's memory accounting all the way until the device sends it. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists