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

Brian Chu cynix at cynix.org
Wed Apr 15 02:42:26 PDT 2015


Hi Nikos,

Thanks for the suggestion. Please see updated patch.

Cheers,
Brian

On Tue, Apr 14, 2015 at 10:20 PM, Nikos Mavrogiannopoulos
<nmav at gnutls.org> wrote:
> 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
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-addresses-from-old-tun-device-when-stealing-l.patch
Type: application/octet-stream
Size: 2635 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20150415/72d72639/attachment.obj>


More information about the openconnect-devel mailing list