Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grid5000
reference-repository
Commits
3b69ba83
Commit
3b69ba83
authored
Nov 02, 2020
by
IMBERT Matthieu
Committed by
LOUP David
Nov 12, 2020
Browse files
ipv6: always put explicit interface field, even for default (0) interface
parent
a4d9ffa2
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/refrepo/input_loader.rb
View file @
3b69ba83
...
...
@@ -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'
%
(
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'
%
(
ip4
.
split
(
'.'
)[
3
].
to_i
)
hn
[
'kavlan6'
][
iface
][
"kavlan-
#{
kvl_id
}
"
]
=
ip6
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment