Quand on a 2 interface 6, on rajoute un mode public pour éviter d'avoir 2 fois fe80:: en gateway (plantage de if)
This commit is contained in:
parent
b73a417aa7
commit
13b2e1bd3f
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue