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.
This commit is contained in:
Diego Santa Cruz 2020-04-27 19:13:15 +02:00 committed by Denis Kenzior
parent 6e98d8a888
commit f0e3defa3e
1 changed files with 2 additions and 2 deletions

View File

@ -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);