path: root/src/l2_packet/l2_packet.h
Commit message (Collapse)AuthorAgeFilesLines
* l2_packet: Allow initialization without RX handlingJouni Malinen2020-04-191-0/+4
| | | | | | | This can be used to minimize resource use when receive path is not needed. Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Don't reply to EAPOL if pkt_type is PACKET_OTHERHOSTDavide Caratti2018-04-021-0/+1
| | | | | | | | | | | | | | When wpa_supplicant is running on a Linux interface that is configured in promiscuous mode, and it is not a member of a bridge, incoming EAPOL packets are processed regardless of the Destination Address in the frame. As a consequence, there are situations where wpa_supplicant replies to EAPOL packets that are not destined for it. This behavior seems undesired (see IEEE Std 802.1X-2010, 11.4.a), and can be avoided by attaching a BPF filter that lets the kernel discard packets having pkt_type equal to PACKET_OTHERHOST. Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
* Work around Linux packet socket regressionJouni Malinen2015-01-311-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Linux kernel commit 576eb62598f10c8c7fd75703fe89010cdcfff596 ('bridge: respect RFC2863 operational state') from 2012 introduced a regression for using wpa_supplicant with EAPOL frames and a station interface in a bridge. Since it does not look like this regression is going to get fixed any time soon (it is already two years from that commit and over 1.5 from a discussion pointing out the regression), add a workaround in wpa_supplicant to avoid this issue. The wpa_supplicant workaround uses a secondary packet socket to capture all frames (ETH_P_ALL) from the netdev that is in a bridge. This is needed to avoid the kernel regression. However, this comes at the price of more CPU load. Some of this is avoided with use of Linux socket filter, but still, this is less efficient than a packet socket bound to the specific EAPOL ethertype. The workaround gets disabled automatically, if the main packet socket interface on the bridge interface turns out to be working for RX (e.g., due to an old kernel version being used or a new kernel version having a fix for the regression). In addition, this workaround is only taken into use for the special case of running wpa_supplicant with an interface in a bridge. Signed-off-by: Jouni Malinen <j@w1.fi>
* l2_packet: Add support for NDISC packet filter in l2_packet_linuxKyeyoon Park2014-11-191-0/+1
| | | | Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
* l2_packet: Add support for DHCP packet filter in l2_packet_linuxKyeyoon Park2014-10-271-0/+16
| | | | Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* Added endianness annotation for sparseJouni Malinen2009-01-031-1/+1
* Re-initialize hostapd/wpa_supplicant git repository based on 0.6.3 releaseJouni Malinen2008-02-281-0/+130