
Adapt to netlink changes in 3.6

Signed-off-by: Thomas Backlund <tmb@mageia.org>

--- linux/net/ipv4/netfilter/ipt_IFWLOG.c.orig	2012-10-17 22:44:57.000000000 +0300
+++ linux/net/ipv4/netfilter/ipt_IFWLOG.c	2012-10-17 23:17:10.012725918 +0300
@@ -56,9 +56,9 @@ static void send_packet(const struct nl_
 		return;
 	}
 
-	nlh = NLMSG_PUT(skb, 0, 0, 0, size - sizeof(*nlh));
+	nlh = nlmsg_put(skb, 0, 0, 0, size - sizeof(*nlh), 0);
 
-	memcpy(NLMSG_DATA(nlh), (const void *) msg, sizeof(*msg));
+	memcpy(nlmsg_data(nlh), (const void *) msg, sizeof(*msg));
 
 	NETLINK_CB(skb).pid = 0;  /* from kernel */
 	NETLINK_CB(skb).dst_group = IFWLOGNLGRP_DEF;
@@ -169,9 +169,11 @@ static struct xt_target ipt_IFWLOG = {
 static int __init ipt_ifwlog_init(void)
 {
 	int err;
+	struct netlink_kernel_cfg cfg = {
+		.groups = IFWLOGNLGRP_MAX,
+	};
 
-	nl = netlink_kernel_create(&init_net, NETLINK_IFWLOG, IFWLOGNLGRP_MAX,
-				   NULL, NULL, THIS_MODULE);
+	nl = netlink_kernel_create(&init_net, NETLINK_IFWLOG, THIS_MODULE, &cfg);
 	if (!nl) {
 		PRINTR(KERN_WARNING "IFWLOG: cannot create netlink socket\n");
 		return -ENOMEM;
