kernel-netlink: Initialize ifreq structs when detecting offload capability
authorTobias Brunner <tobias@strongswan.org>
Wed, 11 Aug 2021 13:35:52 +0000 (15:35 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 11 Aug 2021 13:35:52 +0000 (15:35 +0200)
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c

index d838945..7a6d24b 100644 (file)
@@ -1323,7 +1323,7 @@ static void netlink_find_offload_feature(const char *ifname)
 {
        struct ethtool_sset_info *sset_info;
        struct ethtool_gstrings *cmd = NULL;
-       struct ifreq ifr;
+       struct ifreq ifr = { 0 };
        uint32_t sset_len, i;
        char *str;
        int err, query_socket;
@@ -1392,7 +1392,7 @@ static bool netlink_detect_offload(const char *ifname)
 {
        struct ethtool_gfeatures *cmd;
        uint32_t feature_bit;
-       struct ifreq ifr;
+       struct ifreq ifr = { 0 };
        int query_socket;
        int block;
        bool ret = FALSE;