ffulm / firmware

The Firmware for the Freifunk Ulm Community
http://www.freifunk-ulm.de/
Other
11 stars 14 forks source link

Source address selection incorrect #5

Closed saraedum closed 9 years ago

saraedum commented 9 years ago

My laptop is connected to a router over wlan0:

$ ip addr show dev wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:24:2b:1d:88:94 brd ff:ff:ff:ff:ff:ff
    inet 192.168.132.138/24 brd 192.168.132.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fdef:17a0:ffb1:300:224:2bff:fe1d:8894/64 scope global mngtmpaddr dynamic
       valid_lft 86242sec preferred_lft 14242sec
    inet6 fe80::224:2bff:fe1d:8894/64 scope link
       valid_lft forever preferred_lft forever

At the same time, I have a private tinc VPN:

$ ip addr show dev private
9: private: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
    link/none
    inet6 2a01:348:6:85c8::4/120 scope global
       valid_lft forever preferred_lft forever

Sometimes I get the following data for wlan0:

$ ip addr show dev wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default
 qlen 1000
    link/ether 00:24:2b:1d:88:94 brd ff:ff:ff:ff:ff:ff
    inet 192.168.132.138/24 brd 192.168.132.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fdef:17a0:ffb1:300:224:2bff:fe1d:8894/64 scope global deprecated mngtmpadd
r dynamic
       valid_lft 7184sec preferred_lft 0sec
    inet6 fe80::224:2bff:fe1d:8894/64 scope link
       valid_lft forever preferred_lft forever

Now the address 2a01:348:6:85c8::4 of "private" is used for outgoing connections since fdef:17a0:ffb1:300:224:2bff:fe1d:8894 is deprecated (cf. http://biplane.com.au/blog/?p=22.) In other words, whenever this happens, no new connections can be established.

I can still connect if I set the source address manually, as in:

ping6 ipv6.google.com -I fdef:17a0:ffb1:300:224:2bff:fe1d:8894
saraedum commented 9 years ago

Could it be that dnsmasq (on the router) is deprecating the IPv6 address which I got from radvd (on the gateway)? At least I can trigger this behaviour by restarting dnsmasq.

mwarning commented 9 years ago

I think you are right. Let's use a different address on the server as you have proposed.

saraedum commented 9 years ago

Fixed in https://github.com/ffulm/server-config/pull/18.