summaryrefslogtreecommitdiffhomepage
path: root/system-linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'system-linux.c')
-rw-r--r--system-linux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/system-linux.c b/system-linux.c
index c4d094d..24ea2e3 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -350,6 +350,8 @@ static int system_if_resolve(struct device *dev)
static int system_if_flags(const char *ifname, unsigned add, unsigned rem)
{
struct ifreq ifr;
+
+ memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
ioctl(sock_ioctl, SIOCGIFFLAGS, &ifr);
ifr.ifr_flags |= add;