codeexpress / respounder

Respounder detects presence of responder in the network.
Apache License 2.0
313 stars 39 forks source link

Disconnected interface #5

Closed h3xstream closed 6 years ago

h3xstream commented 6 years ago

I have this interface:

Ethernet adapter Ethernet 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

When respounder use this interface I get this stack trace:

[vEthernet (DockerNAT)] Sending probe from 10.0.75.1... responder not detected
[Ethernet 2] Sending probe from 169.254.178.XXX...      Couldn't bind to a UDP interface. Bailing out!
listen udp 169.254.178.XXX:0: bind: The requested address is not valid in its context.
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x4e6e05]

goroutine 1 [running]:
main.sendLLMNRProbe(0xc0420ae07c, 0x4, 0x4, 0x0, 0x0)
        XXX/respounder.go:166 +0x435
main.checkResponderOnInterface(0xa, 0x546, 0xc042008190, 0xa, 0xc0420081a0, 0x6, 0x6, 0x12, 0x0)
        XXX/respounder.go:120 +0x474
main.main()
        XXX/respounder.go:90 +0x2e0
codeexpress commented 6 years ago

Thanks for reporting this. Most likely, this is because the interface is 'disconnected'. Ideal behavior should be to report the error and carry on with the other interfaces instead of terminating the program.

I will try to reproduce this with a windows VM and put in a fix.