From 13b2e1bd3f3b689128bed5956cbb48c5dbf8014c Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 21 Jun 2015 17:16:12 +0200 Subject: [PATCH] =?UTF-8?q?Quand=20on=20a=202=20interface=206,=20on=20rajo?= =?UTF-8?q?ute=20un=20mode=20public=20pour=20=C3=A9viter=20d'avoir=202=20f?= =?UTF-8?q?ois=20fe80::=20en=20gateway=20(plantage=20de=20if)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Python/etc/network/interfaces | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Python/etc/network/interfaces b/Python/etc/network/interfaces index c6f786b..a0a8e60 100644 --- a/Python/etc/network/interfaces +++ b/Python/etc/network/interfaces @@ -226,7 +226,7 @@ def interface6(interface, list_ip, mode = 'serveur'): 'netmask': (main_ip.split('/') + ['64'])[1], }) # Avoid loops - if mode != 'routeur': + if mode != 'routeur' and mode != 'public': out(' gateway fe80::1') for ip in list_ip: out(' up ip a add %s dev $IFACE' % (ip,)) @@ -238,7 +238,7 @@ def pub6(interface, mode='serveur', list_ip=[]): list_ip = [pubip6(interface) + '/64'] + list_ip interface6(interface, list_ip, mode=mode) -def wifi6(interface, list_ip=[], name=None): +def wifi6(interface, list_ip=[], name=None, mode = 'serveur'): conf_prefix = "fda8:5d34:a228:c04:%s/64" list_ip = [ "2a01:240:fe3d:c04:%s/64" % eui64(interface), conf_prefix % eui64(interface), @@ -246,7 +246,7 @@ def wifi6(interface, list_ip=[], name=None): if name is not None: list_ip.append(conf_prefix % str64(name)) - interface6(interface, list_ip) + interface6(interface, list_ip, mode=mode) def adm6(interface): out("""iface %(interface)s inet6 static