You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in nodejs 18, os.networkInterfaces() now set familly to be either 4 or 6 instead of 'IPv6' || 'IPv4'
As a consequence allInterfaces() method is failing.
functionallInterfaces(){varnetworks=os.networkInterfaces()varnames=Object.keys(networks)varres=[]for(vari=0;i<names.length;i++){varnet=networks[names[i]]for(varj=0;j<net.length;j++){variface=net[j]if(iface.family==='IPv4'){res.push(iface.address)// could only addMembership once per interface (https://nodejs.org/api/dgram.html#dgram_socket_addmembership_multicastaddress_multicastinterface)break}}}returnres}
We need to replace
if (iface.family === 'IPv4')
with
if (iface.family === 'IPv4' || iface.family === 4)
The text was updated successfully, but these errors were encountered:
erossignon
added a commit
to node-opcua/multicast-dns
that referenced
this issue
May 13, 2022
in nodejs 18, os.networkInterfaces() now set familly to be either 4 or 6 instead of 'IPv6' || 'IPv4'
As a consequence allInterfaces() method is failing.
We need to replace
with
The text was updated successfully, but these errors were encountered: