aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2023-04-21 09:47:20 +0200
committerStephen Hemminger <stephen@networkplumber.org>2023-04-21 20:13:08 -0700
commit1371d7deaa2011f5e611e7ce9fdad65483f248dd (patch)
tree69aee98ac6445508749b29e4496a664c893eab7d
parent3921f56ec3be1d3cf6a06e9dfc0192045785d1df (diff)
downloadiproute2-1371d7deaa2011f5e611e7ce9fdad65483f248dd.tar.gz
iplink: fix help of 'netns' arg
'ip link set foo netns /proc/1/ns/net' is a valid command. Let's update the doc accordingly. Fixes: 0dc34c7713bb ("iproute2: Add processless network namespace support") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r--ip/iplink.c4
-rw-r--r--man/man8/ip-link.8.in26
2 files changed, 21 insertions, 9 deletions
diff --git a/ip/iplink.c b/ip/iplink.c
index 0aaca3505..690636b65 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -63,7 +63,7 @@ void iplink_usage(void)
" [ mtu MTU ] [index IDX ]\n"
" [ numtxqueues QUEUE_COUNT ]\n"
" [ numrxqueues QUEUE_COUNT ]\n"
- " [ netns { PID | NETNSNAME } ]\n"
+ " [ netns { PID | NETNSNAME | NETNSFILE } ]\n"
" type TYPE [ ARGS ]\n"
"\n"
" ip link delete { DEVICE | dev DEVICE | group DEVGROUP } type TYPE [ ARGS ]\n"
@@ -88,7 +88,7 @@ void iplink_usage(void)
" [ address LLADDR ]\n"
" [ broadcast LLADDR ]\n"
" [ mtu MTU ]\n"
- " [ netns { PID | NETNSNAME } ]\n"
+ " [ netns { PID | NETNSNAME | NETNSFILE } ]\n"
" [ link-netns NAME | link-netnsid ID ]\n"
" [ alias NAME ]\n"
" [ vf NUM [ mac LLADDR ]\n"
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index a4e0c4030..e23474b35 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -49,7 +49,7 @@ ip-link \- network device configuration
.IR BYTES " ]"
.br
.RB "[ " netns " {"
-.IR PID " | " NETNSNAME " } ]"
+.IR PID " | " NETNSNAME " | " NETNSFILE " } ]"
.br
.BI type " TYPE"
.RI "[ " ARGS " ]"
@@ -118,7 +118,7 @@ ip-link \- network device configuration
.IR MTU " ]"
.br
.RB "[ " netns " {"
-.IR PID " | " NETNSNAME " } ]"
+.IR PID " | " NETNSNAME " | " NETNSFILE " } ]"
.br
.RB "[ " link-netnsid
.IR ID " ]"
@@ -465,8 +465,15 @@ specifies the desired index of the new virtual device. The link
creation fails, if the index is busy.
.TP
-.BI netns " { PID | NETNSNAME } "
-specifies the desired network namespace to create interface in.
+.B netns
+.RI "{ " PID " | " NETNSNAME " | " NETNSFILE " }"
+.br
+create the device in the network namespace associated with process
+.IR "PID " or
+the name
+.IR "NETNSNAME " or
+the file
+.IR "NETNSFILE".
.TP
VLAN Type Support
@@ -2188,10 +2195,15 @@ the interface is
.IR "POINTOPOINT" .
.TP
-.BI netns " NETNSNAME " \fR| " PID"
-move the device to the network namespace associated with name
+.B netns
+.RI "{ " PID " | " NETNSNAME " | " NETNSFILE " }"
+.br
+move the device to the network namespace associated with process
+.IR "PID " or
+the name
.IR "NETNSNAME " or
-.RI process " PID".
+the file
+.IR "NETNSFILE".
Some devices are not allowed to change network namespace: loopback, bridge,
wireless. These are network namespace local devices. In such case