dhcp: Properly initialize struct when binding to interface
This commit is contained in:
parent
fbb70c968b
commit
ff672c785b
|
@ -675,7 +675,7 @@ METHOD(dhcp_socket_t, destroy, void,
|
||||||
*/
|
*/
|
||||||
static bool bind_to_device(int fd, char *iface)
|
static bool bind_to_device(int fd, char *iface)
|
||||||
{
|
{
|
||||||
struct ifreq ifreq;
|
struct ifreq ifreq = {};
|
||||||
|
|
||||||
if (strlen(iface) > sizeof(ifreq.ifr_name))
|
if (strlen(iface) > sizeof(ifreq.ifr_name))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue