supplicant: adjust fragment_size according to MTU (bgo #755145)
authorJiří Klimeš <jklimes@redhat.com>
Wed, 16 Sep 2015 16:22:08 +0000 (18:22 +0200)
committerJiří Klimeš <jklimes@redhat.com>
Wed, 23 Sep 2015 10:41:11 +0000 (12:41 +0200)
commit94bbe7465f35b69487f306ed60b99ae6d50784e6
treec02bee5a0f8d884470f0741d3d1234ea8e4ff24f
parentd7b72b2a3eb932a5a9320215609371e99c198066
supplicant: adjust fragment_size according to MTU (bgo #755145)

NetworkManager set wpa_supplicant's fragment_size option to 1300. But if MTU
was lower, wpa_supplicant failed with "l2_packet_send - sendto: Message too
long" due to fragmentation of EAP-TLS or EAP-PEAP packets.

Actually, MTU has to be 14 bytes bigger than the "fragment_size" parameter.

Ideally, wpa_supplicant would take MTU in the account and adjust the
fragmentation limit accordingly. See discussion in
http://lists.shmoo.com/pipermail/hostap/2015-August/033546.html

https://bugzilla.gnome.org/show_bug.cgi?id=755145
configure.ac
src/devices/nm-device-ethernet.c
src/devices/wifi/nm-device-wifi.c
src/supplicant-manager/nm-supplicant-config.c
src/supplicant-manager/nm-supplicant-config.h
src/supplicant-manager/tests/Makefile.am
src/supplicant-manager/tests/certs/Makefile.am [new file with mode: 0644]
src/supplicant-manager/tests/certs/test-ca-cert.pem [new file with mode: 0644]
src/supplicant-manager/tests/certs/test-cert.p12 [new file with mode: 0644]
src/supplicant-manager/tests/test-supplicant-config.c