aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/network.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-09-28 13:23:09 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-09-28 13:23:09 -0400
commitd50b3b3db2df3ac5e82bbf49eb8de132099488f0 (patch)
tree3c212f9391035d677a7fbb81c8272a3ff49224e9 /src/firejail/network.c
parentprofile cleanup (diff)
downloadfirejail-d50b3b3db2df3ac5e82bbf49eb8de132099488f0.tar.gz
firejail-d50b3b3db2df3ac5e82bbf49eb8de132099488f0.tar.zst
firejail-d50b3b3db2df3ac5e82bbf49eb8de132099488f0.zip
--veth-name option
Diffstat (limited to 'src/firejail/network.c')
-rw-r--r--src/firejail/network.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/firejail/network.c b/src/firejail/network.c
index aac48e521..4473ef099 100644
--- a/src/firejail/network.c
+++ b/src/firejail/network.c
@@ -204,6 +204,7 @@ void net_if_up(const char *ifname) {
204 // read the existing flags 204 // read the existing flags
205 if (ioctl(sock, SIOCGIFFLAGS, &ifr ) < 0) { 205 if (ioctl(sock, SIOCGIFFLAGS, &ifr ) < 0) {
206 close(sock); 206 close(sock);
207 printf("Error: cannot bring up interface %s\n", ifname);
207 errExit("ioctl"); 208 errExit("ioctl");
208 } 209 }
209 210
@@ -212,6 +213,7 @@ void net_if_up(const char *ifname) {
212 // set the new flags 213 // set the new flags
213 if (ioctl( sock, SIOCSIFFLAGS, &ifr ) < 0) { 214 if (ioctl( sock, SIOCSIFFLAGS, &ifr ) < 0) {
214 close(sock); 215 close(sock);
216 printf("Error: cannot bring up interface %s\n", ifname);
215 errExit("ioctl"); 217 errExit("ioctl");
216 } 218 }
217 219
@@ -219,6 +221,7 @@ void net_if_up(const char *ifname) {
219 // read the existing flags 221 // read the existing flags
220 if (ioctl(sock, SIOCGIFFLAGS, &ifr ) < 0) { 222 if (ioctl(sock, SIOCGIFFLAGS, &ifr ) < 0) {
221 close(sock); 223 close(sock);
224 printf("Error: cannot bring up interface %s\n", ifname);
222 errExit("ioctl"); 225 errExit("ioctl");
223 } 226 }
224 227
@@ -230,6 +233,7 @@ void net_if_up(const char *ifname) {
230 // read the existing flags 233 // read the existing flags
231 if (ioctl(sock, SIOCGIFFLAGS, &ifr ) < 0) { 234 if (ioctl(sock, SIOCGIFFLAGS, &ifr ) < 0) {
232 close(sock); 235 close(sock);
236 printf("Error: cannot bring up interface %s\n", ifname);
233 errExit("ioctl"); 237 errExit("ioctl");
234 } 238 }
235 if (ifr.ifr_flags & IFF_RUNNING) 239 if (ifr.ifr_flags & IFF_RUNNING)
@@ -260,6 +264,7 @@ void net_if_down(const char *ifname) {
260 // read the existing flags 264 // read the existing flags
261 if (ioctl(sock, SIOCGIFFLAGS, &ifr ) < 0) { 265 if (ioctl(sock, SIOCGIFFLAGS, &ifr ) < 0) {
262 close(sock); 266 close(sock);
267 printf("Error: cannot shut down interface %s\n", ifname);
263 errExit("ioctl"); 268 errExit("ioctl");
264 } 269 }
265 270
@@ -268,6 +273,7 @@ void net_if_down(const char *ifname) {
268 // set the new flags 273 // set the new flags
269 if (ioctl( sock, SIOCSIFFLAGS, &ifr ) < 0) { 274 if (ioctl( sock, SIOCSIFFLAGS, &ifr ) < 0) {
270 close(sock); 275 close(sock);
276 printf("Error: cannot shut down interface %s\n", ifname);
271 errExit("ioctl"); 277 errExit("ioctl");
272 } 278 }
273 279