ipfw and netlink

Viljar Tulit (viljar@ats.cyber.ee)
Tue, 7 Apr 1998 17:27:37 +0300 (EET DST)


hi,
ip_fw uses netlink_post(), but for initialisation:
netlink_kernel_create().

Viljar.

--- ip_fw.c.ori Tue Apr 7 16:16:41 1998
+++ ip_fw.c Tue Apr 7 16:46:45 1998
@@ -613,7 +613,11 @@
skb_put(skb,len);
memcpy(skb->data,ip,len);
if(netlink_post(NETLINK_FIREWALL, skb))
+ {
+ if (net_ratelimit())
+ printk(KERN_WARNING "NetLink drops packet\n");
kfree_skb(skb);
+ }
}
}
#endif
@@ -1352,6 +1356,8 @@
register_netdevice_notifier(&ipfw_dev_notifier);
#endif
#ifdef CONFIG_IP_FIREWALL_NETLINK
- ipfwsk = netlink_kernel_create(NETLINK_FIREWALL, NULL);
+ /*ipfwsk = netlink_kernel_create(NETLINK_FIREWALL, NULL);*/
+ if(netlink_attach(NETLINK_FIREWALL,NULL)!=0)
+ printk(KERN_WARNING "Cant register firewall netlink\n");
#endif
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu