Commit dc39fefa authored by Killian Lufau's avatar Killian Lufau

fix disable-proto option

The default value for disable-proto is {'udp', 'udp6'}, and it's
not possible to get { <proto> } as a final value for disable-proto
when passing `disable-proto <proto>`, because this results in
disable_proto being equal to {'udp', 'udp6', <proto>}.
Similarly, passing both `disable-proto <proto>`
and `disable-proto none` results in the `none` overwriting anything
else, resulting in disable_proto being an empty list.
The goal here is to allow to only keep the protocol we want to disable
when passing `disable-proto <proto>`, the default 'udp' and 'udp6'
are in this case removed from disable_proto.
parent d398aa93
......@@ -157,6 +157,8 @@ def main():
if 'none' in config.disable_proto:
config.disable_proto = ()
elif len(config.disable_proto) > 2:
config.disable_proto = config.disable_proto[2:]
if config.default:
# Make sure we won't tunnel over re6st.
config.disable_proto = tuple(set(('tcp6', 'udp6')).union(
......
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