Skip to contentSkip to conversation

wired: use 802.1X-2001 instead of 802.1X-2004

PATCH Applied Diego Santa Cruz 2 participants 2 messages Apr 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wired: use 802.1X-2001 instead of 802.1X-2004

For wired authentication the protocol version used in the EAPOL packets sent by ead is fixed to 802.1X-2004 (2) but some switches implementing only 802.1X-2001 erroneously ignore these packets.

As ead only sends EAPOL-Start and EAP-Packet packets and these have not changed between 802.1X-2001 and 802.1X-2004 there should be no reason to use 802.1X-2004. Hence, this changes ead to always use 802.1X-2001 (1) instead.

Switches implementing newer versions of 802.1X should not have problems responding to packets using the original version.

---
 wired/ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
wired/ethdev.c +2 -2
index c80d4fa0..e000afae 100644
@@ -83,7 +83,7 @@ struct eapol_hdr {
 	__be16  pkt_len;
 } __attribute__ ((packed));
 
-static const uint8_t eapol_start[] = { 0x02, 0x01, 0x00, 0x00 };
+static const uint8_t eapol_start[] = { 0x01, 0x01, 0x00, 0x00 };
 static const uint8_t pae_group_addr[] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x03 };
 
 static bool pae_write(struct ethdev *dev, const uint8_t *addr,
@@ -149,7 +149,7 @@ static void eap_tx_packet(const uint8_t *eap_data, size_t len, void *user_data)
 	struct eapol *eapol = user_data;
 	uint8_t frame[1500];
 
-	l_put_u8(0x02, frame);
+	l_put_u8(0x01, frame);
 	l_put_u8(0x00, frame + 1);
 	l_put_be16(len, frame + 2);
 	memcpy(frame + 4, eap_data, len);
Signature · 1 line
2.18.1
#1 lore raw

Hi Diego,

Quoted 9 lines · Diego Santa Cruz

For wired authentication the protocol version used in the EAPOL packets sent by ead is fixed to 802.1X-2004 (2) but some switches implementing only 802.1X-2001 erroneously ignore these packets.

As ead only sends EAPOL-Start and EAP-Packet packets and these have not changed between 802.1X-2001 and 802.1X-2004 there should be no reason to use 802.1X-2004. Hence, this changes ead to always use 802.1X-2001 (1) instead.

Quoted 7 lines

Switches implementing newer versions of 802.1X should not have problems responding to packets using the original version.

---
  wired/ethdev.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Regards,
-Denis