diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c index 2051a9966d..51c0cea7fe 100644 --- a/src/udev/net/ethtool-util.c +++ b/src/udev/net/ethtool-util.c @@ -320,7 +320,7 @@ int ethtool_set_features(int *fd, const char *ifname, int *features) { if (r < 0) return log_warning_errno(r, "link_config: could not get ethtool features for %s", ifname); - sfeatures = alloca0(sizeof(struct ethtool_gstrings) + DIV_ROUND_UP(strings->len, 32U) * sizeof(sfeatures->features[0])); + sfeatures = alloca0(sizeof(struct ethtool_sfeatures) + DIV_ROUND_UP(strings->len, 32U) * sizeof(sfeatures->features[0])); sfeatures->cmd = ETHTOOL_SFEATURES; sfeatures->size = DIV_ROUND_UP(strings->len, 32U);