mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-01 11:48:23 -05:00
nl80211: Make br_ifindex available in i802_bss
Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
This commit is contained in:
parent
7d20dd66f3
commit
6c6678e7a4
@ -6302,12 +6302,13 @@ static int i802_check_bridge(struct wpa_driver_nl80211_data *drv,
|
|||||||
struct i802_bss *bss,
|
struct i802_bss *bss,
|
||||||
const char *brname, const char *ifname)
|
const char *brname, const char *ifname)
|
||||||
{
|
{
|
||||||
int ifindex;
|
int br_ifindex;
|
||||||
char in_br[IFNAMSIZ];
|
char in_br[IFNAMSIZ];
|
||||||
|
|
||||||
os_strlcpy(bss->brname, brname, IFNAMSIZ);
|
os_strlcpy(bss->brname, brname, IFNAMSIZ);
|
||||||
ifindex = if_nametoindex(brname);
|
br_ifindex = if_nametoindex(brname);
|
||||||
if (ifindex == 0) {
|
bss->br_ifindex = br_ifindex;
|
||||||
|
if (br_ifindex == 0) {
|
||||||
/*
|
/*
|
||||||
* Bridge was configured, but the bridge device does
|
* Bridge was configured, but the bridge device does
|
||||||
* not exist. Try to add it now.
|
* not exist. Try to add it now.
|
||||||
@ -6379,6 +6380,7 @@ static void *i802_init(struct hostapd_data *hapd,
|
|||||||
brname[0] = '\0';
|
brname[0] = '\0';
|
||||||
br_ifindex = 0;
|
br_ifindex = 0;
|
||||||
}
|
}
|
||||||
|
bss->br_ifindex = br_ifindex;
|
||||||
|
|
||||||
for (i = 0; i < params->num_bridge; i++) {
|
for (i = 0; i < params->num_bridge; i++) {
|
||||||
if (params->bridge[i]) {
|
if (params->bridge[i]) {
|
||||||
|
@ -53,6 +53,7 @@ struct i802_bss {
|
|||||||
struct wpa_driver_nl80211_data *drv;
|
struct wpa_driver_nl80211_data *drv;
|
||||||
struct i802_bss *next;
|
struct i802_bss *next;
|
||||||
int ifindex;
|
int ifindex;
|
||||||
|
int br_ifindex;
|
||||||
u64 wdev_id;
|
u64 wdev_id;
|
||||||
char ifname[IFNAMSIZ + 1];
|
char ifname[IFNAMSIZ + 1];
|
||||||
char brname[IFNAMSIZ];
|
char brname[IFNAMSIZ];
|
||||||
|
Loading…
Reference in New Issue
Block a user