Skip to content

Commit 2bafc20

Browse files
committed
feat: pass any additional arguments to targetpid discovery
1 parent 779c096 commit 2bafc20

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ $ macvtap-mknod-for-unprivileged-netns mytap
1919

2020
## Configuration
2121

22-
This tool executes `/bin/macvtap-mknod-targetpid-discovery [interface name]` to
23-
discover which network namespace to access. From under `/proc/PID/ns` the files
24-
`user` and `net` are used to enter the respective namespaces.
22+
This tool executes `/bin/macvtap-mknod-targetpid-discovery [...]` to discover
23+
which network namespace to access. From under `/proc/PID/ns` the files `user`
24+
and `net` are used to enter the respective namespaces.
2525

2626
`make install` creates this path as a symbolic link, which points to a script
2727
for rootless Podman. This can be replaced to support differently initialised
2828
network namespaces.
2929

30-
The ifname argument is not used, but it may be used in custom implementations.
30+
None of the arguments are used for target PID discovery, but all arguments are
31+
passed and may be used in custom implementations.
3132

3233

3334
## Security considerations

src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ bool dev_valid_name(const char *name) {
296296
}
297297

298298
int32_t main(int32_t argc, char *argv[]) {
299-
if (argc != 2) {
300-
fprintf(stderr, "usage: %s [interface name]\n", argv[0]);
299+
if (argc < 2) {
300+
fprintf(stderr, "usage: %s [interface name] [additional arguments to pass to targetpid discovery]\n", argv[0]);
301301
return 1;
302302
}
303303

0 commit comments

Comments
 (0)