Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f1e9a7d8 authored by IMBERT Matthieu's avatar IMBERT Matthieu Committed by Baptiste Jonglez
Browse files

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

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