Commit 3b69ba83 authored by IMBERT Matthieu's avatar IMBERT Matthieu Committed by LOUP David
Browse files

ipv6: always put explicit interface field, even for default (0) interface

parent a4d9ffa2
...@@ -169,11 +169,7 @@ def add_ipv6(h) ...@@ -169,11 +169,7 @@ def add_ipv6(h)
ip6 += '%x' % h['ipv6']['site_indexes'][site_uid] ip6 += '%x' % h['ipv6']['site_indexes'][site_uid]
ip6 += '00:' ip6 += '00:'
ip6 += '%x' % ((ip4.split('.')[2].to_i & 0b1111) + 1) ip6 += '%x' % ((ip4.split('.')[2].to_i & 0b1111) + 1)
if idx > 0 ip6 += ':%x::' % idx
ip6 += ':%x::' % idx
else
ip6 += '::'
end
ip6 += '%x' % (ip4.split('.')[3].to_i) ip6 += '%x' % (ip4.split('.')[3].to_i)
nah['ip6'] = ip6 nah['ip6'] = ip6
end end
...@@ -222,11 +218,7 @@ def add_kavlan_ipv6s(h) ...@@ -222,11 +218,7 @@ def add_kavlan_ipv6s(h)
else else
ip6 += '%x' % ((ip4.split('.')[2].to_i & 0b1111) + 1) ip6 += '%x' % ((ip4.split('.')[2].to_i & 0b1111) + 1)
end end
if idx > 0 ip6 += ':%x::' % idx
ip6 += ':%x::' % idx
else
ip6 += '::'
end
ip6 += '%x' % (ip4.split('.')[3].to_i) ip6 += '%x' % (ip4.split('.')[3].to_i)
hn['kavlan6'][iface]["kavlan-#{kvl_id}"] = ip6 hn['kavlan6'][iface]["kavlan-#{kvl_id}"] = ip6
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment