diff options
author | Petr Menšík <pemensik@redhat.com> | 2018-08-15 18:17:00 +0200 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2018-09-04 22:47:58 +0100 |
commit | 47b45b2967c931fed3c89a2e6a8df9f9183a5789 (patch) | |
tree | 3d2fdcc7cecc43d48cff8d80b19d2ce655bff31e /src/netlink.c | |
parent | 2b38e3823b12ab13f86c3a44648de436daadb1f6 (diff) | |
download | dnsmasq-47b45b2967c931fed3c89a2e6a8df9f9183a5789.tar.gz |
Fix lengths of interface names
Use helper function similar to copy correctly limited names into
buffers.
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/netlink.c b/src/netlink.c index 05153f5..849c2ff 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -149,10 +149,15 @@ int iface_enumerate(int family, void *parm, int (*callback)()) struct rtgenmsg g; } req; + memset(&req, 0, sizeof(req)); + memset(&addr, 0, sizeof(addr)); + addr.nl_family = AF_NETLINK; +#if 0 addr.nl_pad = 0; addr.nl_groups = 0; addr.nl_pid = 0; /* address to kernel */ +#endif again: if (family == AF_UNSPEC) |