mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-24 15:22:34 +01:00
monitor: Remove GENL_ID_GENERATE
Kernel v4.10 and later no longer export GENL_ID_GENERATE (which was defined as 0). iwd was using this symbol to check for unmodified local values rather than to ask for a dynamically generated netlink ID anyway, so it makes sense to use the value 0 directly. This will work with kernels before and after the GENL_ID_GENERATE change.
This commit is contained in:
parent
9a8ffc473a
commit
0e108f9727
@ -78,7 +78,7 @@ static void genl_parse(uint16_t type, const void *data, uint32_t len,
|
||||
const struct genlmsghdr *genlmsg = data;
|
||||
const struct nlattr *nla;
|
||||
char name[GENL_NAMSIZ];
|
||||
uint16_t id = GENL_ID_GENERATE;
|
||||
uint16_t id = 0;
|
||||
|
||||
if (nlmon)
|
||||
return;
|
||||
@ -101,7 +101,7 @@ static void genl_parse(uint16_t type, const void *data, uint32_t len,
|
||||
}
|
||||
}
|
||||
|
||||
if (id == GENL_ID_GENERATE)
|
||||
if (id == 0)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, NL80211_GENL_NAME)) {
|
||||
@ -695,7 +695,7 @@ int main(int argc, char *argv[])
|
||||
const char *analyze_path = NULL;
|
||||
const char *ifname = NULL;
|
||||
struct iwmon_interface monitor_interface = { };
|
||||
uint16_t nl80211_family = GENL_ID_GENERATE;
|
||||
uint16_t nl80211_family = 0;
|
||||
struct l_signal *signal;
|
||||
sigset_t mask;
|
||||
int exit_status;
|
||||
@ -733,7 +733,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
nl80211_family = strtoul(optarg, NULL, 10);
|
||||
}
|
||||
if (nl80211_family == GENL_ID_GENERATE) {
|
||||
if (nl80211_family == 0) {
|
||||
usage();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -4160,7 +4160,7 @@ static void genl_ctrl(struct nlmon *nlmon, const void *data, uint32_t len)
|
||||
const struct genlmsghdr *genlmsg = data;
|
||||
const struct nlattr *nla;
|
||||
char name[GENL_NAMSIZ];
|
||||
uint16_t id = GENL_ID_GENERATE;
|
||||
uint16_t id = 0;
|
||||
|
||||
if (genlmsg->cmd != CTRL_CMD_NEWFAMILY)
|
||||
return;
|
||||
@ -4177,7 +4177,7 @@ static void genl_ctrl(struct nlmon *nlmon, const void *data, uint32_t len)
|
||||
}
|
||||
}
|
||||
|
||||
if (id == GENL_ID_GENERATE)
|
||||
if (id == 0)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, NL80211_GENL_NAME))
|
||||
|
Loading…
Reference in New Issue
Block a user