From 0ee173e23f2713a027a56cd5095beae1abc2286b Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 19 Mar 2015 21:54:53 -0500 Subject: [PATCH] eapol: Fix PAE socket code Using SOCK_DGRAM allows us to receive just the frame payload instead of raw ethernet framing. --- src/eapol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eapol.c b/src/eapol.c index aa943b98..05867fa3 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -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);