mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-09 08:16:58 +08:00
Fix network namespace setup script
At least my machine was generating IDs that were to long and any test that required networking wouldn't work. This patch restricts the namespace names to 4 digits. Signed-off-by: Lee Keitel <lee@keitel.xyz>
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
6e5bbcf5ac
commit
70d936ca95
14
tests/ns.sh
14
tests/ns.sh
@@ -75,13 +75,13 @@ trap nsfinish EXIT
|
||||
|
||||
echo " * Setting up namespaces..."
|
||||
set -e
|
||||
NSNAME1="ocserv-c-tmp-$$"
|
||||
NSNAME3="ocserv-c-2-tmp-$$"
|
||||
NSNAME2="ocserv-s-tmp-$$"
|
||||
ETHNAME1="oceth-c$$"
|
||||
ETHNAME2="oceth-s$$"
|
||||
ETHNAME3="oceth-c-2$$"
|
||||
ETHNAME4="oceth-s-2$$"
|
||||
NSNAME1="ocserv-c-tmp-${$:0:4}"
|
||||
NSNAME3="ocserv-c-2-tmp-${$:0:4}"
|
||||
NSNAME2="ocserv-s-tmp-${$:0:4}"
|
||||
ETHNAME1="oceth-c${$:0:4}"
|
||||
ETHNAME2="oceth-s${$:0:4}"
|
||||
ETHNAME3="oceth-c-2${$:0:4}"
|
||||
ETHNAME4="oceth-s-2${$:0:4}"
|
||||
|
||||
${IP} netns add ${NSNAME1}
|
||||
${IP} netns add ${NSNAME2}
|
||||
|
||||
Reference in New Issue
Block a user