[PATCH] Updating id field in backports genl family

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 backport/compat/backport-4.12.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backport/compat/backport-4.12.c b/backport/compat/backport-4.12.c
index 2372a11..4948b53 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
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux