Commit d19b3a61 authored by Jondy Zhao's avatar Jondy Zhao

Add /usr/local/bin to PATH in the ovpv-client script

Fix show replay messages when using wireless network
parent de0b065e
......@@ -4,7 +4,7 @@ import os, sys
if os.environ['script_type'] == 'up':
# OpenVPN unsets PATH before calling hooks
# which is equivalent to set /bin:/usr/bin
os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin'
os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin'
os.execlp('ip', 'ip', 'link', 'set', os.environ['dev'], 'up')
# Write into pipe external ip address received
......
......@@ -13,6 +13,7 @@ def openvpn(iface, encrypt, *args, **kw):
'--persist-tun',
'--persist-key',
'--script-security', '2',
'--mute-replay-warnings',
'--up', ovpn_client,
#'--user', 'nobody', '--group', 'nogroup',
] + list(args)
......
......@@ -468,7 +468,7 @@ class TunnelManager(object):
msg.append(encode(self._peer_db.getPeerList().next()))
if msg:
try:
self.sock.sendto('\1' + ''.join(msg), address)
self.sock.sendto('\1' + ''.join(msg), address[:2])
except socket.error, e:
logging.info('Failed to reply to %s (%s)', address, e)
elif code == 255:
......
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