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:	Wed, 31 Jul 2013 19:27:44 +0200
From:	Phil Sutter <phil@....cc>
To:	"David S. Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Parse ethernet headers in af_packet.c

Hi,

This is an AF_PACKET specific solution to the problems discussed in [1]
and [2].

Basically this incorporates calling eth_type_trans() for packets to send
when the outgoing device's type is ARPHRD_ETHER.

In order to having a more generic solution which could be used in other
places (like e.g. tun.c), I second Michael's approach in [2], but would
extend it to a generic equivalent to eth_type_trans(). A device-type
specific layer-2 header parser if you will. Note that eth_type_trans()
also sets skbuff's dev, pkt_type and mac_header fields. A
dev->header_ops->type_trans() could do just that plus set skb->protocol
(maybe only if it's ETH_P_ALL).

[1] http://patchwork.ozlabs.org/patch/67422/
[2] http://lists.openwall.net/netdev/2010/01/06/38

Best wishes, Phil

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ