summaryrefslogtreecommitdiff
path: root/src/network.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-01-17 18:03:52 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-01-17 18:03:52 +0100
commit7ae054f8aae252ee9c57e26327675e466fc1d15d (patch)
tree8014a333b430477e336afd4621f49097c8d17435 /src/network.c
parentd581381870486687586dea4ebf4b7065ae408cd0 (diff)
downloadconntrack-tools-7ae054f8aae252ee9c57e26327675e466fc1d15d.tar.gz
conntrack-tools-7ae054f8aae252ee9c57e26327675e466fc1d15d.zip
src: support for redundant dedicated links
This patch adds support for redundant dedicated links. You can add a pool of dedicated links that can be used if the current active fails. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/network.c')
-rw-r--r--src/network.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/network.c b/src/network.c
index 7a106b1..f71aef0 100644
--- a/src/network.c
+++ b/src/network.c
@@ -95,7 +95,8 @@ void mcast_buffered_destroy(void)
}
/* return 0 if it is not sent, otherwise return 1 */
-int mcast_buffered_send_netmsg(struct mcast_sock *m, const struct nethdr *net)
+int
+mcast_buffered_send_netmsg(struct mcast_sock_multi *m, const struct nethdr *net)
{
int ret = 0, len = ntohs(net->len);
@@ -104,7 +105,7 @@ retry:
memcpy(tx_buf + tx_buflen, net, len);
tx_buflen += len;
} else {
- mcast_send(m, tx_buf, tx_buflen);
+ mcast_send(mcast_get_current_link(m), tx_buf, tx_buflen);
ret = 1;
tx_buflen = 0;
goto retry;
@@ -113,14 +114,14 @@ retry:
return ret;
}
-ssize_t mcast_buffered_pending_netmsg(struct mcast_sock *m)
+ssize_t mcast_buffered_pending_netmsg(struct mcast_sock_multi *m)
{
ssize_t ret;
if (tx_buflen == 0)
return 0;
- ret = mcast_send(m, tx_buf, tx_buflen);
+ ret = mcast_send(mcast_get_current_link(m), tx_buf, tx_buflen);
tx_buflen = 0;
return ret;