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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 04 Jan 2010 17:29:57 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Milan Dadok <milan@...ok.name>
CC:	uaca@...mni.uv.es, johann.baudy@...-log.net,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] 1/1 net: packet: Keep 802.1Q VLAN tag in packet on SOCK_DGRAM
 socket - resend

Milan Dadok wrote:
> Patrick McHardy wrote:
> 
>> Milan Dadok wrote:
>>> Keep 802.1Q VLAN tag on non HW vlan accelerated network card received to SOCK_DGRAM socket.
> 
>> So not including the link layer header for SOCK_DGRAM sockets
>> seems to be the intended behaviour.
> 
>>>From my point of view i have question
> Is 802.1Q encapsulation (or another type of encapsulation (IPSec?)) part of link level header or part of data packet?
> 
> Currently pseudo-header contains for OUTGOING packet on physical card (vlan10@...1)
> a) HW accelarated network card  
> protocol = ethertype IPv4 (0x0800)
> tci = vlan number = 10
> and data starts with 4500 0028
> 
> b) non HW accelerated network card 
> protocol = ethertype 802.1Q (0x8100)
> tci = 0
> and data starts with 4500 0028
> vlan tci and real protocol number (ARP,IPV4,IPV6) of data is lost 

As mentioned in the text I quoted, this is apparently what is
intended for SOCK_DGRAM packet sockets. The accelerated case is
inconsistent and vlan_tci should be cleared I guess.

I agree that sll_protocol should reflect the network protocol
in this case however.

> And with more nested vlans it is getting worse
> for example
> 
> vlan1010@...n10@...1
> 
> a) HW accelarated network card  
> protocol = ethertype IPv4 (0x8100)
> tci = 10
> and data starts with 4500 0028
> 
> the 4 bytes of real packet 03f2 0800 is lost too
> 
> b) non HW accelarated network card  
> 4 words of data packet are lost ...
> 
> I have no problems with received packets, only outgoing packet have problem.
> I think that out packet on SOCK_DGRAM sockets MUST BE in same format as in (received) packet on same interface.
> Can we agree on this?

Yes, agreed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ