diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-10-24 21:42:48 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-10-24 21:42:48 +0200 |
commit | 0d32c5c070f817229110f92d7b31df9a3e4eeec5 (patch) | |
tree | 5ee04a9e03de32d2029ad0d708811e382ca922d1 /netlink.patch | |
parent | 62a3d29539aa109fed1c8a20d63ef95948b13842 (diff) |
Fixes, cleanups, commentsv5.0-pre8
- More comments added to the code
- ICMP and ICMPv6 support added to the hash:ip,port, hash:ip,port,ip
and hash:ip,port,net types
- hash:net and hash:ip,port,net types are reworked
- hash:net,port type added
- Wrong direction parameters fixed in hash:ip,port
- Helps and manpage are updated
- More tests added
- Ugly macros are rewritten to functions in parse.c
(Holger Eitzenberger)
- resize related bug in hash types fixed (Holger Eitzenberger)
- autoreconf patches by Jan Engelhardt applied
- netlink patch minimalized: dumping can be initialized by a second
parsing of the message (thanks to David and Patrick for the suggestion)
- IPv4/IPv6 address attributes are introduced in order to fix the context
(suggested by David)
Diffstat (limited to 'netlink.patch')
-rw-r--r-- | netlink.patch | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/netlink.patch b/netlink.patch index 344cfc8..b651d44 100644 --- a/netlink.patch +++ b/netlink.patch @@ -12,75 +12,3 @@ index 9f00da2..9f51ff6 100644 #ifdef __KERNEL__ -diff --git a/include/linux/netlink.h b/include/linux/netlink.h -index ab5d312..ef8b229 100644 ---- a/include/linux/netlink.h -+++ b/include/linux/netlink.h -@@ -263,11 +263,14 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) - #define NLMSG_PUT(skb, pid, seq, type, len) \ - NLMSG_NEW(skb, pid, seq, type, len, 0) - --extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, -- const struct nlmsghdr *nlh, -- int (*dump)(struct sk_buff *skb, struct netlink_callback*), -- int (*done)(struct netlink_callback*)); -- -+extern int netlink_dump_init(struct sock *ssk, struct sk_buff *skb, -+ const struct nlmsghdr *nlh, -+ int (*dump)(struct sk_buff *skb, struct netlink_callback*), -+ int (*done)(struct netlink_callback*), -+ unsigned char init, ...); -+ -+#define netlink_dump_start(ssk, skb, nlh, dump, done) \ -+ netlink_dump_init(ssk, skb, nlh, dump, done, 0) - - #define NL_NONROOT_RECV 0x1 - #define NL_NONROOT_SEND 0x2 -diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c -index 19e9800..7d85d45 100644 ---- a/net/netlink/af_netlink.c -+++ b/net/netlink/af_netlink.c -@@ -1714,15 +1714,18 @@ errout: - return err; - } - --int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, -- const struct nlmsghdr *nlh, -- int (*dump)(struct sk_buff *skb, -- struct netlink_callback *), -- int (*done)(struct netlink_callback *)) -+int netlink_dump_init(struct sock *ssk, struct sk_buff *skb, -+ const struct nlmsghdr *nlh, -+ int (*dump)(struct sk_buff *skb, -+ struct netlink_callback *), -+ int (*done)(struct netlink_callback *), -+ unsigned char init, ...) - { - struct netlink_callback *cb; - struct sock *sk; - struct netlink_sock *nlk; -+ va_list args; -+ unsigned char i; - - cb = kzalloc(sizeof(*cb), GFP_KERNEL); - if (cb == NULL) -@@ -1733,6 +1736,10 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, - cb->nlh = nlh; - atomic_inc(&skb->users); - cb->skb = skb; -+ va_start(args, init); -+ for (i = 0; i < init; i++) -+ cb->args[i] = va_arg(args, long); -+ va_end(args); - - sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(skb).pid); - if (sk == NULL) { -@@ -1759,7 +1766,7 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, - */ - return -EINTR; - } --EXPORT_SYMBOL(netlink_dump_start); -+EXPORT_SYMBOL(netlink_dump_init); - - void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err) - { |