eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 78301ec9cbcfa6eeb0341c6967400187dcd9f0ed
parent 9f6576be0527ced42480532c4dc93c28e1c214bb
Author: James Prestwood <prestwoj@gmail.com>
Date:   Fri, 18 Mar 2022 09:44:18 -0700

wired: check eap_load_settings

Caught by static analysis

Diffstat:
Mwired/ethdev.c | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/wired/ethdev.c b/wired/ethdev.c @@ -238,10 +238,15 @@ static void rx_packet(struct ethdev *dev, const uint8_t *addr, l_debug("Created new EAPoL session"); - l_queue_push_tail(dev->eapol_sessions, eapol); - eapol->cred = network_lookup_security("default"); - eap_load_settings(eapol->eap, eapol->cred, "EAP-"); + if (!eapol->cred || !eap_load_settings(eapol->eap, + eapol->cred, "EAP-")) { + l_error("Failed to load EAP settings"); + eapol_free(eapol); + return; + } + + l_queue_push_tail(dev->eapol_sessions, eapol); eap_set_key_material_func(eapol->eap, eap_key_material); eap_set_event_func(eapol->eap, eap_event);