[PATCH] Remove addresses from old tun device when stealing leases

Nikos Mavrogiannopoulos nmav at gnutls.org
Tue Apr 14 05:20:26 PDT 2015


On Tue, 2015-04-14 at 00:25 +1000, Brian Chu wrote:
> Hi Nikos,
> 
> On FreeBSD (and probably OpenBSD), when a user resumes a session using
> cookie (e.g. when quickly switching between Wi-Fi and 3G on a mobile
> device), we must first remove addresses from the old tun device before
> assigning them to the new tun device, otherwise the assignment may
> fail with something like "main: tun.c:197: tun1: Error setting IPv6:
> Address already in use". I have attached a patch to fix this issue.
> This problem was reported to me by hshh <hunreal at gmail.com>.

Thanks. I think that this deallocation should be done in tun.c and then
be called by ip-leases. Something like reset_tun() or so. If you can
update the patch would be nice, otherwise I'll try to check it, next
week.

> I'm not sure if the same behaviour is required on Linux -- probably
> not, since nobody has reported this problem so far.

Most probably we would need to add some code for ipv6 in linux as well. 

regards,
Nikos





More information about the openconnect-devel mailing list