summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-20 12:53:17 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-20 12:54:49 +0100
commit672eaeb2be1ce3176083017283389d0c0bd5d052 (patch)
treed08306b99dd4c361099938ef225fe366116d5113
parent4eef27f0e8345341805949d72c1b2949551fb467 (diff)
downloadvyos-1x-672eaeb2be1ce3176083017283389d0c0bd5d052.tar.gz
vyos-1x-672eaeb2be1ce3176083017283389d0c0bd5d052.zip
tunnel: T3068: automatic generate link-local adresses
-rw-r--r--python/vyos/ifconfig/tunnel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/ifconfig/tunnel.py b/python/vyos/ifconfig/tunnel.py
index 05520ba84..7264b6296 100644
--- a/python/vyos/ifconfig/tunnel.py
+++ b/python/vyos/ifconfig/tunnel.py
@@ -142,9 +142,9 @@ class _Tunnel(Interface):
"""
# we choose 40 random bytes for the MAC address, this gives
# us e.g. EUI('00-EA-EE-D6-A3-C8') or EUI('00-41-B9-0D-F2-2A')
- tmp = EUI(getrandbits(40)).value
+ tmp = EUI(getrandbits(48)).value
# set locally administered bit in MAC address
- tmp |= 0x020000000000
+ tmp |= 0xf20000000000
# convert integer to "real" MAC address representation
mac = EUI(hex(tmp).split('x')[-1])
# change dialect to use : as delimiter instead of -