*/*: Restore non-IBSS part of wpa patches

b8477825c2 removed some non-IBSS patches.
Restore them. We only want to remove the patches that make IBSS use
ADHOC mode.

Fixes:		b8477825c2
This commit is contained in:
Cy Schubert 2022-06-09 14:53:18 -07:00
parent adcec87925
commit c86f32d652
8 changed files with 96 additions and 4 deletions

View file

@ -2,7 +2,7 @@
PORTNAME= hostapd
PORTVERSION= ${COMMIT_DATE}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
PKGNAMESUFFIX= -devel

View file

@ -0,0 +1,23 @@
--- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700
+++ src/drivers/driver_bsd.c 2021-06-13 23:11:15.089256000 -0700
@@ -853,14 +853,18 @@
drv = bsd_get_drvindex(global, ifm->ifm_index);
if (drv == NULL)
return;
- if ((ifm->ifm_flags & IFF_UP) == 0 &&
- (drv->flags & IFF_UP) != 0) {
+ if (((ifm->ifm_flags & IFF_UP) == 0 ||
+ (ifm->ifm_flags & IFF_RUNNING) == 0) &&
+ (drv->flags & IFF_UP) != 0 &&
+ (drv->flags & IFF_RUNNING) != 0) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN",
drv->ifname);
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_DISABLED,
NULL);
} else if ((ifm->ifm_flags & IFF_UP) != 0 &&
- (drv->flags & IFF_UP) == 0) {
+ (ifm->ifm_flags & IFF_RUNNING) != 0 &&
+ ((drv->flags & IFF_UP) == 0 ||
+ (drv->flags & IFF_RUNNING) == 0)) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP",
drv->ifname);

View file

@ -2,7 +2,7 @@
PORTNAME= hostapd
PORTVERSION= 2.10
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= net
MASTER_SITES= https://w1.fi/releases/

View file

@ -0,0 +1,23 @@
--- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700
+++ src/drivers/driver_bsd.c 2021-06-13 23:11:15.089256000 -0700
@@ -853,14 +853,18 @@
drv = bsd_get_drvindex(global, ifm->ifm_index);
if (drv == NULL)
return;
- if ((ifm->ifm_flags & IFF_UP) == 0 &&
- (drv->flags & IFF_UP) != 0) {
+ if (((ifm->ifm_flags & IFF_UP) == 0 ||
+ (ifm->ifm_flags & IFF_RUNNING) == 0) &&
+ (drv->flags & IFF_UP) != 0 &&
+ (drv->flags & IFF_RUNNING) != 0) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN",
drv->ifname);
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_DISABLED,
NULL);
} else if ((ifm->ifm_flags & IFF_UP) != 0 &&
- (drv->flags & IFF_UP) == 0) {
+ (ifm->ifm_flags & IFF_RUNNING) != 0 &&
+ ((drv->flags & IFF_UP) == 0 ||
+ (drv->flags & IFF_RUNNING) == 0)) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP",
drv->ifname);

View file

@ -1,6 +1,6 @@
PORTNAME= wpa_supplicant
PORTVERSION= ${COMMIT_DATE}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security net
PKGNAMESUFFIX= -devel

View file

@ -0,0 +1,23 @@
--- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700
+++ src/drivers/driver_bsd.c 2021-06-13 23:08:54.275496000 -0700
@@ -853,14 +853,18 @@
drv = bsd_get_drvindex(global, ifm->ifm_index);
if (drv == NULL)
return;
- if ((ifm->ifm_flags & IFF_UP) == 0 &&
- (drv->flags & IFF_UP) != 0) {
+ if (((ifm->ifm_flags & IFF_UP) == 0 ||
+ (ifm->ifm_flags & IFF_RUNNING) == 0) &&
+ (drv->flags & IFF_UP) != 0 &&
+ (drv->flags & IFF_RUNNING) != 0) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN",
drv->ifname);
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_DISABLED,
NULL);
} else if ((ifm->ifm_flags & IFF_UP) != 0 &&
- (drv->flags & IFF_UP) == 0) {
+ (ifm->ifm_flags & IFF_RUNNING) != 0 &&
+ ((drv->flags & IFF_UP) == 0 ||
+ (drv->flags & IFF_RUNNING) == 0)) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP",
drv->ifname);

View file

@ -1,6 +1,6 @@
PORTNAME= wpa_supplicant
PORTVERSION= 2.10
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= security net
MASTER_SITES= https://w1.fi/releases/

View file

@ -0,0 +1,23 @@
--- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700
+++ src/drivers/driver_bsd.c 2021-06-13 23:08:54.275496000 -0700
@@ -853,14 +853,18 @@
drv = bsd_get_drvindex(global, ifm->ifm_index);
if (drv == NULL)
return;
- if ((ifm->ifm_flags & IFF_UP) == 0 &&
- (drv->flags & IFF_UP) != 0) {
+ if (((ifm->ifm_flags & IFF_UP) == 0 ||
+ (ifm->ifm_flags & IFF_RUNNING) == 0) &&
+ (drv->flags & IFF_UP) != 0 &&
+ (drv->flags & IFF_RUNNING) != 0) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN",
drv->ifname);
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_DISABLED,
NULL);
} else if ((ifm->ifm_flags & IFF_UP) != 0 &&
- (drv->flags & IFF_UP) == 0) {
+ (ifm->ifm_flags & IFF_RUNNING) != 0 &&
+ ((drv->flags & IFF_UP) == 0 ||
+ (drv->flags & IFF_RUNNING) == 0)) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP",
drv->ifname);