microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.36k stars 816 forks source link

arping fails with error 'Address family not supported by protocol' #2538

Closed daldr-ntml closed 4 years ago

daldr-ntml commented 7 years ago

From bash (run as administrator :

$ sudo apt install arping
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo arping 192.168.1.1
arping: libnet_init(LIBNET_LINK, eth1): socket: Address family not supported by protocol

also arp -d does not work:

$ sudo arp -d 192.168.1.1
SIOCDARP(dontpub): Invalid argument
ThomasHabets commented 6 years ago

Does Windows support raw sockets nowadays?

Yay295 commented 6 years ago

I can confirm this still fails after the Fall Creators Update.

PalmerCurling commented 6 years ago

Still failing 3/9/2018.

sudo arping -i eth0 d0:50:99:38:d1:7a arping: libnet_init(LIBNET_LINK, eth0): socket: Address family not supported by protocol

ThomasHabets commented 6 years ago

Please don't use middle-endian date format. ISO8601/RFC3339 are unambiguous. If you really hate proper date formats then spell out the month name. 95% of the world will misread US date formats.

For posterity: That was 2018-03-09.

therealkenc commented 6 years ago

For posterity, the date is right beside his name. Also for posterity, an 18 trillion dollar economy does not care what RFC3339 says. If 95% of the world can't figure out when that was posted, I have my doubts on 95% of the world's powers of deductive reasoning. Concede you might be right on that point, though. Also posted on 9/3/18.

ThomasHabets commented 6 years ago

@therealkenc hello troll.

Alysko commented 6 years ago

Same with etherwake and many others. Very sad :'(

Yay295 commented 6 years ago

Still fails after the April update (Redstone 4).

$ sudo arping 192.168.1.1
arping: lookup dev: No matching interface found using getifaddrs().
arping: Unable to automatically find interface to use. Is it on the local LAN?
arping: Use -i to manually specify interface. Guessing interface wifi0.
arping: libnet_init(LIBNET_LINK, wifi0): socket: Address family not supported by protocol
Philipnah commented 5 years ago

still doesn't work in january 2019!

ThomasHabets commented 5 years ago

I (arping author) don't code on Windows. I'll very happily accept patches or documentation for how to get it working, but I'm not going to work on it.

Biswa96 commented 5 years ago

@ThomasHabets Your program is OK. The issue in the kernel mode drive aka. LxCore.sys. The event tracing shows Function:LxpSocketGetDispatchTable Line:1148 Message:Socket: Unsupported socket family:17, where 17 is AF_PACKET. LxCore has only 1, 2, 10, 16 socket protocol family/domain.

Hence we've to wait until MS add that socket family.

tsk1996 commented 5 years ago

Hi Guys, I am experiencing a similar issue while using arpspoof . https://github.com/tsk1996/Arpspoof/issues/1#issue-466398714 Error: root@TS:/home/user# arpspoof arpspoof: socket: Address family not supported by protocol

So isn't there a proper solution for this?

Biswa96 commented 5 years ago

Workaround: WSL2 (aka. the Linux kernel) supports that socket family AF_PACKET (17).

AXShoshan commented 4 years ago

still doesn't work in 2020 ):

therealkenc commented 4 years ago

image

Yay295 commented 4 years ago

therealkenc strikes again...

cbesot commented 4 years ago

forget wsl! Use wsl2 (windows >= 2004).