From f34ce674f3f7aad658fa7c03f37d57a99479052b Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Mon, 20 Jul 2015 18:49:04 +0200 Subject: 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 --- dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.3-54-g00ecf