bandwhich icon indicating copy to clipboard operation
bandwhich copied to clipboard

Failed to listen on network interface: Address family not supported by protocol (os error 97) on Ubuntu (WSL)

Open sbmthakur opened this issue 5 years ago • 7 comments

Platform details:

OS: Ubuntu 18.04.1 LTS (Windows Subsystem Linux) Rust version: 1.40.0

Steps to reproduce:

  1. Run cargo build.
  2. After the compilation is done, run cargo run.

sbmthakur avatar Dec 30 '19 17:12 sbmthakur

Does this also happen when running as root?

imsnif avatar Dec 30 '19 18:12 imsnif

Looks like https://github.com/imsnif/what/issues/31

grishy avatar Dec 30 '19 18:12 grishy

@imsnif Yes. And I ran the shell as an administrator in all cases.

sbmthakur avatar Dec 31 '19 02:12 sbmthakur

@sbmthakur - it might be #31 as @Grishy mentions. This means that one of the network cards in the subsystem is virtual (or "problematic" in a different way) and what is trying to pick it up and fail (@Grishy is working on a fix for this so such a situation won't fail the entire run and would just ignore that card). If you use the -i flag with one of the interfaces, does it work for you?

Another sadder option might be that we're having issues with linux-in-windows (that's what you're running, right?) so I'd be very interested to know if the -i option solved your problem.

imsnif avatar Dec 31 '19 08:12 imsnif

@imsnif Thanks for pointing out. I am getting the same error even with the -i flag. There is some reading available about network interfaces in WSL here which might be helpful.

sbmthakur avatar Dec 31 '19 14:12 sbmthakur

Interesting. I'm going to take a look at this and would generally be interested in investigating further.

What seems to be happening is that we're failing to read the frames coming from any of your network interfaces. For this we're using the pnet crate, which is cross platform - but it might have some kinks or special requirements in regards to this specific setup.

Would it be okay for you to help debug this by running some code I'll whip up to pin-point the issue?

imsnif avatar Dec 31 '19 17:12 imsnif

@imsnif Sure. I am always happy to help.

sbmthakur avatar Jan 01 '20 05:01 sbmthakur

Hi all. I'm currently cleaning up old issues. Can you please check if this issue still persists on the latest release? Thank you.

cyqsimon avatar Oct 12 '23 15:10 cyqsimon

@cyqsimon works fine for me now on 0.21.0 👍

grishy avatar Oct 12 '23 17:10 grishy

In which case I will close this issue as completed. Please reopen if it's still problematic, thanks.

cyqsimon avatar Oct 12 '23 19:10 cyqsimon