Use IFNAME= prefix for global UDP control interface events

There does not seem to be a good reason for using the different IFACE=
prefix on the UDP control interface. This got added when the UDP
interface in wpa_supplicant was extended in commit f0e5d3b5c6
("wpa_supplicant: Share attach/detach/send UDP ctrl_iface functions")
and that was then extended to hostapd in commit e920805685 ("hostapd:
Extend global control interface notifications").

Replace the IFACE= prefix in UDP case with IFNAME= to be consistent with
the UNIX domain socket based control interface.

This fixes a problem when at least one test case fail (hapd_ctrl_sta)
when remote/udp used. This also fixes test_connectivity().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
This commit is contained in:
Janusz Dziedzic 2020-01-12 23:02:20 +01:00 committed by Jouni Malinen
parent 7a934fe72a
commit 12fb9698ab
2 changed files with 1 additions and 6 deletions

View file

@ -4689,13 +4689,8 @@ static void hostapd_ctrl_iface_send_internal(int sock, struct dl_list *ctrl_dst,
return; return;
idx = 0; idx = 0;
if (ifname) { if (ifname) {
#ifdef CONFIG_CTRL_IFACE_UDP
io[idx].iov_base = "IFACE=";
io[idx].iov_len = 6;
#else /* CONFIG_CTRL_IFACE_UDP */
io[idx].iov_base = "IFNAME="; io[idx].iov_base = "IFNAME=";
io[idx].iov_len = 7; io[idx].iov_len = 7;
#endif /* CONFIG_CTRL_IFACE_UDP */
idx++; idx++;
io[idx].iov_base = (char *) ifname; io[idx].iov_base = (char *) ifname;
io[idx].iov_len = os_strlen(ifname); io[idx].iov_len = os_strlen(ifname);

View file

@ -516,7 +516,7 @@ static void wpa_supplicant_ctrl_iface_send(struct wpa_supplicant *wpa_s,
return; return;
if (ifname) if (ifname)
os_snprintf(levelstr, sizeof(levelstr), "IFACE=%s <%d>", os_snprintf(levelstr, sizeof(levelstr), "IFNAME=%s <%d>",
ifname, level); ifname, level);
else else
os_snprintf(levelstr, sizeof(levelstr), "<%d>", level); os_snprintf(levelstr, sizeof(levelstr), "<%d>", level);