qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] New feature - RFC3931 L2TPv3 network transport


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] New feature - RFC3931 L2TPv3 network transport using static Ethernet over L2TPv3 tunnels
Date: Mon, 10 Mar 2014 19:04:38 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]