A generic netlink user has no interest in knowing how to
address the source of the original request.
Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>
Index: net-2.6.20/include/net/genetlink.h
===================================================================
--- net-2.6.20.orig/include/net/genetlink.h 2006-11-14 12:23:56.000000000
+0100
+++ net-2.6.20/include/net/genetlink.h 2006-11-14 12:46:16.000000000 +0100
@@ -150,6 +150,16 @@
}
/**
+ * genlmsg_reply - reply to a request
+ * @skb: netlink message to be sent back
+ * @info: receiver information
+ */
+static inline int genlmsg_reply(struct sk_buff *skb, struct genl_info *info)
+{
+ return genlmsg_unicast(skb, info->snd_pid);
+}
+
+/**
* gennlmsg_data - head of message payload
* @gnlh: genetlink messsage header
*/
Index: net-2.6.20/net/netlabel/netlabel_cipso_v4.c
===================================================================
--- net-2.6.20.orig/net/netlabel/netlabel_cipso_v4.c 2006-11-14
12:23:43.000000000 +0100
+++ net-2.6.20/net/netlabel/netlabel_cipso_v4.c 2006-11-14 12:46:02.000000000
+0100
@@ -568,7 +568,7 @@
genlmsg_end(ans_skb, data);
- ret_val = genlmsg_unicast(ans_skb, info->snd_pid);
+ ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto list_failure;
Index: net-2.6.20/net/netlink/genetlink.c
===================================================================
--- net-2.6.20.orig/net/netlink/genetlink.c 2006-11-14 12:23:43.000000000
+0100
+++ net-2.6.20/net/netlink/genetlink.c 2006-11-14 12:46:02.000000000 +0100
@@ -529,7 +529,7 @@
goto errout;
}
- err = genlmsg_unicast(msg, info->snd_pid);
+ err = genlmsg_reply(msg, info);
errout:
return err;
}
Index: net-2.6.20/net/netlabel/netlabel_mgmt.c
===================================================================
--- net-2.6.20.orig/net/netlabel/netlabel_mgmt.c 2006-11-14
12:23:43.000000000 +0100
+++ net-2.6.20/net/netlabel/netlabel_mgmt.c 2006-11-14 12:46:02.000000000
+0100
@@ -390,7 +390,7 @@
genlmsg_end(ans_skb, data);
- ret_val = genlmsg_unicast(ans_skb, info->snd_pid);
+ ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto listdef_failure;
return 0;
@@ -512,7 +512,7 @@
genlmsg_end(ans_skb, data);
- ret_val = genlmsg_unicast(ans_skb, info->snd_pid);
+ ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto version_failure;
return 0;
Index: net-2.6.20/net/netlabel/netlabel_unlabeled.c
===================================================================
--- net-2.6.20.orig/net/netlabel/netlabel_unlabeled.c 2006-11-14
12:23:43.000000000 +0100
+++ net-2.6.20/net/netlabel/netlabel_unlabeled.c 2006-11-14
12:46:02.000000000 +0100
@@ -160,7 +160,7 @@
genlmsg_end(ans_skb, data);
- ret_val = genlmsg_unicast(ans_skb, info->snd_pid);
+ ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto list_failure;
return 0;
--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html