eapol: Fix PAE socket code

Using SOCK_DGRAM allows us to receive just the frame payload instead
of raw ethernet framing.
This commit is contained in:
Denis Kenzior 2015-03-19 21:54:53 -05:00
parent 96cd2391da
commit 0ee173e23f
1 changed files with 1 additions and 1 deletions

View File

@ -862,7 +862,7 @@ struct l_io *eapol_open_pae(uint32_t index)
struct sockaddr_ll sll;
int fd;
fd = socket(PF_PACKET, SOCK_RAW | SOCK_CLOEXEC, 0);
fd = socket(PF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC, htons(ETH_P_PAE));
if (fd < 0) {
l_error("Failed to create PAE socket %s (%d)",
strerror(errno), errno);