diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-12-08 11:09:02 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-12-08 11:09:02 +0100 |
commit | bf6cfeb1dc6652eaff1b7c4edda45e15f5abf361 (patch) | |
tree | 936fa6dfa0aaabff35b3cd0a287f0623dfc04093 /src/network.c | |
parent | 29b5df53bcbef17722ab2b389f3352c4e86b4795 (diff) | |
download | conntrack-tools-bf6cfeb1dc6652eaff1b7c4edda45e15f5abf361.tar.gz conntrack-tools-bf6cfeb1dc6652eaff1b7c4edda45e15f5abf361.zip |
network: remove length parameter of mcast_buffered_send_netmsg()
This patch simplifies mcast_buffered_send_netmsg() by removing the
length parameter. Instead, we use the length field in the nethdr
to know the message size to be sent.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/network.c')
-rw-r--r-- | src/network.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network.c b/src/network.c index 2f83d3b..a6ecb7e 100644 --- a/src/network.c +++ b/src/network.c @@ -108,10 +108,9 @@ void mcast_buffered_destroy(void) } /* return 0 if it is not sent, otherwise return 1 */ -int mcast_buffered_send_netmsg(struct mcast_sock *m, void *data, size_t len) +int mcast_buffered_send_netmsg(struct mcast_sock *m, const struct nethdr *net) { - int ret = 0; - struct nethdr *net = data; + int ret = 0, len = ntohs(net->len); retry: if (tx_buflen + len < tx_buflenmax) { |