diff options
author | 2020-12-07 10:27:11 -0500 | |
---|---|---|
committer | 2020-12-07 10:27:11 -0500 | |
commit | 4bc92b8fd0a5c22c7d4c6f9323378501c60ff149 (patch) | |
tree | aa70124d8cb62f9a96e24c3b4b4527363ee42640 /src | |
parent | Merge pull request #3772 from smitsohu/smitsohu-openat2 (diff) | |
download | firejail-4bc92b8fd0a5c22c7d4c6f9323378501c60ff149.tar.gz firejail-4bc92b8fd0a5c22c7d4c6f9323378501c60ff149.tar.zst firejail-4bc92b8fd0a5c22c7d4c6f9323378501c60ff149.zip |
check --mac= for multicast addresses (#3784)
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 53300fe2d..b8ed29ece 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -2397,6 +2397,13 @@ int main(int argc, char **argv, char **envp) { | |||
2397 | fprintf(stderr, "Error: invalid MAC address\n"); | 2397 | fprintf(stderr, "Error: invalid MAC address\n"); |
2398 | exit(1); | 2398 | exit(1); |
2399 | } | 2399 | } |
2400 | |||
2401 | // check multicast address | ||
2402 | if (br->macsandbox[0] & 1) { | ||
2403 | fprintf(stderr, "Error: invalid MAC address (multicast)\n"); | ||
2404 | exit(1); | ||
2405 | } | ||
2406 | |||
2400 | } | 2407 | } |
2401 | else | 2408 | else |
2402 | exit_err_feature("networking"); | 2409 | exit_err_feature("networking"); |