PASN: Avoid unreachable code with CONFIG_NO_RADIUS
There is no point in trying to build in rest of this function if in the middle of it the CONFIG_NO_RADIUS case would unconditionally fail. Simply make all of this be conditional on that build parameter not being set to make things easier for static analyzers. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
9a1136b7f1
commit
b8211e1e75
1 changed files with 5 additions and 5 deletions
|
@ -2656,6 +2656,10 @@ fail:
|
||||||
static int pasn_wd_handle_fils(struct hostapd_data *hapd, struct sta_info *sta,
|
static int pasn_wd_handle_fils(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
struct wpabuf *wd)
|
struct wpabuf *wd)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_NO_RADIUS
|
||||||
|
wpa_printf(MSG_DEBUG, "PASN: FILS: RADIUS is not configured. Fail");
|
||||||
|
return -1;
|
||||||
|
#else /* CONFIG_NO_RADIUS */
|
||||||
struct pasn_data *pasn = sta->pasn;
|
struct pasn_data *pasn = sta->pasn;
|
||||||
struct pasn_fils_data *fils = &pasn->fils;
|
struct pasn_fils_data *fils = &pasn->fils;
|
||||||
struct ieee802_11_elems elems;
|
struct ieee802_11_elems elems;
|
||||||
|
@ -2740,11 +2744,6 @@ static int pasn_wd_handle_fils(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
FILS_SESSION_LEN);
|
FILS_SESSION_LEN);
|
||||||
os_memcpy(fils->session, elems.fils_session, FILS_SESSION_LEN);
|
os_memcpy(fils->session, elems.fils_session, FILS_SESSION_LEN);
|
||||||
|
|
||||||
#ifdef CONFIG_NO_RADIUS
|
|
||||||
wpa_printf(MSG_DEBUG, "PASN: FILS: RADIUS is not configured. Fail");
|
|
||||||
return -1;
|
|
||||||
#endif /* CONFIG_NO_RADIUS */
|
|
||||||
|
|
||||||
fils_wd = ieee802_11_defrag(&elems, WLAN_EID_EXTENSION,
|
fils_wd = ieee802_11_defrag(&elems, WLAN_EID_EXTENSION,
|
||||||
WLAN_EID_EXT_WRAPPED_DATA);
|
WLAN_EID_EXT_WRAPPED_DATA);
|
||||||
|
|
||||||
|
@ -2775,6 +2774,7 @@ static int pasn_wd_handle_fils(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
|
|
||||||
wpabuf_free(fils_wd);
|
wpabuf_free(fils_wd);
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif /* CONFIG_NO_RADIUS */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_FILS */
|
#endif /* CONFIG_FILS */
|
||||||
|
|
Loading…
Reference in a new issue