Skip to content

Commit 3be0ce6

Browse files
Yurunsoftcmb69
authored andcommitted
Report wireless network interfaces on Windows too
There is no particular reason to exclude wireless network interfaces from the results of `net_get_interfaces()` on Windows, especially since `getifaddrs(3)` includes these as well. Closes GH-7718.
1 parent 7d95cec commit 3be0ce6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ PHP NEWS
1414
- OCI8:
1515
. Added oci8.prefetch_lob_size directive to tune LOB query performance
1616

17+
- Standard:
18+
. net_get_interfaces() also reports wireless network interfaces on Windows.
19+
(Yurun)
20+
1721
- Zip:
1822
. add ZipArchive::clearError() method
1923
. add ZipArchive::getStreamName() method

ext/standard/net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ PHP_FUNCTION(net_get_interfaces) {
190190
for (p = pAddresses; p; p = p->Next) {
191191
zval iface, unicast;
192192

193-
if ((IF_TYPE_ETHERNET_CSMACD != p->IfType) && (IF_TYPE_SOFTWARE_LOOPBACK != p->IfType)) {
193+
if ((IF_TYPE_ETHERNET_CSMACD != p->IfType) && (IF_TYPE_IEEE80211 != p->IfType) && (IF_TYPE_SOFTWARE_LOOPBACK != p->IfType)) {
194194
continue;
195195
}
196196

0 commit comments

Comments
 (0)