dhcp: Properly initialize struct when binding to interface
authorTobias Brunner <tobias@strongswan.org>
Tue, 16 Feb 2021 14:22:18 +0000 (15:22 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 16 Feb 2021 14:22:18 +0000 (15:22 +0100)
src/libcharon/plugins/dhcp/dhcp_socket.c

index ecd92f2..ce3191d 100644 (file)
@@ -675,7 +675,7 @@ METHOD(dhcp_socket_t, destroy, void,
  */
 static bool bind_to_device(int fd, char *iface)
 {
-       struct ifreq ifreq;
+       struct ifreq ifreq = {};
 
        if (strlen(iface) > sizeof(ifreq.ifr_name))
        {