From bd05a7276a91cf7d42d59bfaedc0ce1825273a98 Mon Sep 17 00:00:00 2001 From: Raylan Date: Sat, 25 Jan 2025 08:41:09 -0300 Subject: [PATCH] Make --namespace and --namespace-pid mutually exclusive. --- sshuttle/options.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sshuttle/options.py b/sshuttle/options.py index 394cff6..ca49933 100644 --- a/sshuttle/options.py +++ b/sshuttle/options.py @@ -471,12 +471,15 @@ parser.add_argument( ) if sys.platform == 'linux': - parser.add_argument( + net_ns_group = parser.add_mutually_exclusive_group( + required=False) + + net_ns_group.add_argument( '--namespace', type=parse_namespace, help="Run inside of a net namespace with the given name." ) - parser.add_argument( + net_ns_group.add_argument( '--namespace-pid', type=int, help="""