summaryrefslogtreecommitdiff
path: root/dev.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2015-07-20 18:49:04 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2015-07-20 18:49:04 +0200
commitf34ce674f3f7aad658fa7c03f37d57a99479052b (patch)
tree3e46e6fef67b59351f21fad3ed73ee2539644ff1 /dev.c
parent96d822d2c0ef2be429b1c11bbe9a9c03bedd500d (diff)
dev: device_set_flags: also dump error
We currently don't dump the actual error message whereas we should allow the user to identify a problem more easily. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'dev.c')
-rw-r--r--dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dev.c b/dev.c
index 20dfe17..cf8d643 100644
--- a/dev.c
+++ b/dev.c
@@ -175,7 +175,7 @@ void device_set_flags(const char *ifname, const short flags)
ret = ioctl(sock, SIOCSIFFLAGS, &ifr);
if (unlikely(ret < 0))
- panic("Cannot set NIC flags!\n");
+ panic("Cannot set NIC flags (%s)!\n", strerror(errno));
close(sock);
}