Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
f-interop-contributors
agent
Commits
dc19a9ef
Commit
dc19a9ef
authored
Mar 25, 2018
by
Federico Sismondi
Browse files
fix for supporting old and new API call for configurating the agent
parent
18b8146a
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/opentun.py
View file @
dc19a9ef
...
...
@@ -452,8 +452,8 @@ class OpenTunLinux(object):
v
=
os
.
system
(
'ip tuntap add dev '
+
self
.
ifname
+
' mode tun user root'
)
v
=
os
.
system
(
'ip link set '
+
self
.
ifname
+
' up'
)
v
=
os
.
system
(
'ip -6 addr add '
+
self
.
ipv6_prefix
+
':'
+
self
.
ipv6_host
+
'/64 dev '
+
self
.
ifname
)
v
=
os
.
system
(
'ip -6 addr add fe80:'
+
self
.
ipv6_host
+
'/64 dev '
+
self
.
ifname
)
v
=
os
.
system
(
'ip -6 addr add '
+
self
.
ipv6_prefix
+
':
:
'
+
self
.
ipv6_host
+
'/64 dev '
+
self
.
ifname
)
v
=
os
.
system
(
'ip -6 addr add fe80:
:
'
+
self
.
ipv6_host
+
'/64 dev '
+
self
.
ifname
)
# v = os.system("ip addr add " + self.ipv4_host + "/24 dev " + self.ifname)
...
...
@@ -604,13 +604,7 @@ class OpenTunMACOS(object):
ipv4_netmask
=
[
255
,
255
,
0
,
0
]
self
.
ipv4_netmask
=
ipv4_netmask
log
.
debug
(
"IP info"
)
log
.
debug
(
'ipv6_prefix: '
+
self
.
ipv6_prefix
)
log
.
debug
(
'ipv6_host: '
+
self
.
ipv6_host
)
log
.
debug
(
'ipv6_no_forwarding: '
+
str
(
self
.
ipv6_no_forwarding
))
log
.
debug
(
'ipv4_host: '
+
self
.
ipv4_host
)
log
.
debug
(
'ipv4_network: '
+
str
(
self
.
ipv4_network
))
log
.
debug
(
'ipv4_netmask: '
+
str
(
self
.
ipv4_netmask
))
log
.
debug
(
"IP info:
\n
{}"
.
format
(
self
.
get_tun_configuration
()))
# local variables
self
.
tunIf
=
self
.
_createTunIf
()
...
...
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