diff options
author | Aaron Komisar <aaron.komisar@tandemg.com> | 2018-05-24 13:57:33 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-06-04 23:13:00 +0200 |
commit | c6e4ad12e850b0251242de8ebc01b649dccf9230 (patch) | |
tree | 3bbe00fc9184edd9ce0c1960e0d582aa948d16ba /backport | |
parent | 98272f479c2126a135dfcb12484e93d5888164ab (diff) |
backports: update id field in backports genl family
Family ID from the original family struct will be used when building
genl messages (sent as nlmsg_type), so the new id should be updated in
the original (older kernel format) family struct too
Signed-off-by: Aaron Komisar <aaron.komisar@tandemg.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/compat/backport-4.12.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backport/compat/backport-4.12.c b/backport/compat/backport-4.12.c index 2372a118..4948b531 100644 --- a/backport/compat/backport-4.12.c +++ b/backport/compat/backport-4.12.c @@ -225,6 +225,13 @@ int bp_extack_genl_register_family(struct genl_family *family) /* copy this since the family might access it directly */ family->id = copy->family.id; family->attrbuf = copy->family.attrbuf; + + /* family ID from the original family struct will be used when building + * genl messages (sent as nlmsg_type), so the new id should be updated + * in the original (older kernel format) family struct too + */ + family->family.id = copy->family.id; + #if LINUX_VERSION_IS_GEQ(3,13,0) family->mcgrp_offset = copy->family.mcgrp_offset; #endif |