diff options
Diffstat (limited to 'src/fnet')
-rw-r--r-- | src/fnet/fnet.h | 2 | ||||
-rw-r--r-- | src/fnet/interface.c | 8 | ||||
-rw-r--r-- | src/fnet/main.c | 10 | ||||
-rw-r--r-- | src/fnet/veth.c | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/fnet/fnet.h b/src/fnet/fnet.h index c9d40ec1d..f9b09d7ea 100644 --- a/src/fnet/fnet.h +++ b/src/fnet/fnet.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2014-2023 Firejail Authors | 2 | * Copyright (C) 2014-2023 Firejail Authors |
3 | * | 3 | * |
4 | * This file is part of firejail project | 4 | * This file is part of firejail project |
diff --git a/src/fnet/interface.c b/src/fnet/interface.c index aa0981269..ca7c744ed 100644 --- a/src/fnet/interface.c +++ b/src/fnet/interface.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2014-2023 Firejail Authors | 2 | * Copyright (C) 2014-2023 Firejail Authors |
3 | * | 3 | * |
4 | * This file is part of firejail project | 4 | * This file is part of firejail project |
@@ -57,7 +57,7 @@ void net_bridge_add_interface(const char *bridge, const char *dev) { | |||
57 | 57 | ||
58 | int sock; | 58 | int sock; |
59 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) | 59 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) |
60 | errExit("socket"); | 60 | errExit("socket"); |
61 | 61 | ||
62 | memset(&ifr, 0, sizeof(ifr)); | 62 | memset(&ifr, 0, sizeof(ifr)); |
63 | strncpy(ifr.ifr_name, bridge, IFNAMSIZ - 1); | 63 | strncpy(ifr.ifr_name, bridge, IFNAMSIZ - 1); |
@@ -237,7 +237,7 @@ int net_get_mac(const char *ifname, unsigned char mac[6]) { | |||
237 | int sock; | 237 | int sock; |
238 | 238 | ||
239 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) | 239 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) |
240 | errExit("socket"); | 240 | errExit("socket"); |
241 | 241 | ||
242 | memset(&ifr, 0, sizeof(ifr)); | 242 | memset(&ifr, 0, sizeof(ifr)); |
243 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); | 243 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); |
@@ -291,7 +291,7 @@ int net_if_mac(const char *ifname, const unsigned char mac[6]) { | |||
291 | int sock; | 291 | int sock; |
292 | 292 | ||
293 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) | 293 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) |
294 | errExit("socket"); | 294 | errExit("socket"); |
295 | 295 | ||
296 | memset(&ifr, 0, sizeof(ifr)); | 296 | memset(&ifr, 0, sizeof(ifr)); |
297 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); | 297 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); |
diff --git a/src/fnet/main.c b/src/fnet/main.c index 1c48622a0..96c4f1478 100644 --- a/src/fnet/main.c +++ b/src/fnet/main.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2014-2023 Firejail Authors | 2 | * Copyright (C) 2014-2023 Firejail Authors |
3 | * | 3 | * |
4 | * This file is part of firejail project | 4 | * This file is part of firejail project |
@@ -47,7 +47,7 @@ static void usage(void) { | |||
47 | printf("\tfnet config mac addr\n"); | 47 | printf("\tfnet config mac addr\n"); |
48 | printf("\tfnet config ipv6 dev ip\n"); | 48 | printf("\tfnet config ipv6 dev ip\n"); |
49 | printf("\tfnet ifup dev\n"); | 49 | printf("\tfnet ifup dev\n"); |
50 | printf("\tfnet waitll dev\n"); | 50 | printf("\tfnet waitll dev\n"); |
51 | } | 51 | } |
52 | 52 | ||
53 | int main(int argc, char **argv) { | 53 | int main(int argc, char **argv) { |
@@ -144,9 +144,9 @@ printf("\n"); | |||
144 | else if (argc == 5 && strcmp(argv[1], "config") == 0 && strcmp(argv[2], "ipv6") == 0) { | 144 | else if (argc == 5 && strcmp(argv[1], "config") == 0 && strcmp(argv[2], "ipv6") == 0) { |
145 | net_if_ip6(argv[3], argv[4]); | 145 | net_if_ip6(argv[3], argv[4]); |
146 | } | 146 | } |
147 | else if (argc == 3 && strcmp(argv[1], "waitll") == 0) { | 147 | else if (argc == 3 && strcmp(argv[1], "waitll") == 0) { |
148 | net_if_waitll(argv[2]); | 148 | net_if_waitll(argv[2]); |
149 | } | 149 | } |
150 | else { | 150 | else { |
151 | fprintf(stderr, "Error fnet: invalid arguments\n"); | 151 | fprintf(stderr, "Error fnet: invalid arguments\n"); |
152 | return 1; | 152 | return 1; |
diff --git a/src/fnet/veth.c b/src/fnet/veth.c index 2a23c6bd4..2111cfa56 100644 --- a/src/fnet/veth.c +++ b/src/fnet/veth.c | |||
@@ -24,8 +24,8 @@ | |||
24 | * | 24 | * |
25 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> | 25 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* | 28 | /* |
29 | * Copyright (C) 2014-2023 Firejail Authors | 29 | * Copyright (C) 2014-2023 Firejail Authors |
30 | * | 30 | * |
31 | * This file is part of firejail project | 31 | * This file is part of firejail project |