From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN5Tj-00040a-5h for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:03:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN5Ta-0000Td-QK for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:03:11 -0400 Received: from mail-ea0-x22f.google.com ([2a00:1450:4013:c01::22f]:61263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN5Ta-0000TW-K5 for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:03:02 -0400 Received: by mail-ea0-f175.google.com with SMTP id d10so3858791eaj.20 for ; Mon, 10 Mar 2014 12:03:01 -0700 (PDT) Date: Mon, 10 Mar 2014 19:04:38 +0100 From: Stefan Hajnoczi Message-ID: <20140310180438.GG32400@stefanha-thinkpad.redhat.com> References: <1394028740-710822-1-git-send-email-anton.ivanov@kot-begemot.co.uk> <20140306094428.GB23172@stefanha-thinkpad.redhat.com> <531C9F87.4000105@kot-begemot.co.uk> <20140310083531.GA24112@stefanha-thinkpad.redhat.com> <531D7C7D.4030300@kot-begemot.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <531D7C7D.4030300@kot-begemot.co.uk> Subject: Re: [Qemu-devel] [PATCH] New feature - RFC3931 L2TPv3 network transport using static Ethernet over L2TPv3 tunnels List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anton Ivanov Cc: Anton Ivanov , pbonzini@redhat.com, qemu-devel@nongnu.org, Stefan Hajnoczi , afaerber@suse.de On Mon, Mar 10, 2014 at 08:49:01AM +0000, Anton Ivanov wrote: > You are correct. My test is wrong. > > However, the result is the same - it wants a non-zero proto there. > > $ sudo ./gaitest > src ai_family 2 ai_socketype 3 ai_protocol 0 > socket creation failed, errno = 93 You are right! I got confused with Linux net/l2tp/l2tp_ip.c driver which handles socket(AF_INET, SOCK_DGRAM, IPPROTO_L2TP). But that has nothing to do with this raw socket code which needs to do socket(AF_INET, SOCK_RAW, IPPROTO_L2TP). IPPROTO_L2TP *is* needed after all since SOCK_RAW wants to know the IP protocol number so it can receive incoming packets. We're not trying to capture all IP packets, just the L2TP ones. So I'm happy again with the code. Stefan