arriven / db1000n

MIT License
1.17k stars 201 forks source link

-local-address do not works with ipv6 addresses #521

Closed Sfinx closed 2 years ago

Sfinx commented 2 years ago
./db1000n -local-address 2001:xxx...

just select first ipv4 interface

arriven commented 2 years ago

In order to use ipv6 interface this way you also need to provide an ipv6 zone (interface name) because in case of ipv6 you can have same link address for multiple interfaces. I had to add support for proper parsing of that (incoming in 0.8.33) but in order to use it you should specify something like -local-address fe80::xxxx:xxxx:xxxx:xxxx%wlp0s20f3 where wlp0s20f3 is the name of your interface

Sfinx commented 2 years ago

Hint with %interface_name do not work. I think that problem is that my IPV6 interface has several IP addresses including IPV4 ones. The db1000n just picks up the first IPV4 one from this interface despite the exact IPV6 binding one was specified. 0.8.33 behaves the same way as 0.8.32

arriven commented 2 years ago

weird, it seems to be working for me, let me check on my remote server if it's still up

arriven commented 2 years ago

yeah, it seems to pickup the right interface, although my home network doesn't support ipv6 so I just get network unreachable (ping displays the same thing)

deputinizer commented 2 years ago

For me %interface doesn't work either. ./db1000n -local-address 10.2.2.2%wlan1

arriven commented 2 years ago

@deputinizer %interface should only be specified for ipv6 addresses and it's designed that way because you can have the same ipv6 address for multiple interfaces

deputinizer commented 2 years ago

@Sfinx Probably fixed in a7edd0071ee129712fe3ebdf643a75e24c3f1a0a

Sfinx commented 2 years ago

Works with ipv6 ! But still small bug that was not present at pre 0.8x series - countrycheker still uses ipv4 addressing for country check :

utils/countrychecker.go:78      location info   {"country": ....
deputinizer commented 2 years ago

@Sfinx Fixed IPv6 and countrychecker