kernel-netlink: Initialize ifreq structs when detecting offload capability

This commit is contained in:
Tobias Brunner 2021-08-11 15:35:52 +02:00
parent 5d6e69a6e4
commit 1c4e134f26
1 changed files with 2 additions and 2 deletions

View File

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