diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-03-20 19:39:38 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-03-20 19:39:38 +0100 |
commit | 0114456525a8a805d0a53040b7170b7c7d7f7007 (patch) | |
tree | 447df64c6b7438ef71577b92b9751c3a1b45dfb5 /src/sync-mode.c | |
parent | 899785226af55b1c09b2b4d57345da2e07e5f729 (diff) | |
download | conntrack-tools-0114456525a8a805d0a53040b7170b7c7d7f7007.tar.gz conntrack-tools-0114456525a8a805d0a53040b7170b7c7d7f7007.zip |
sync-mode: fix broken dedicated-link change in multichannel layer
This patch fixes a problem that was introduced while adding the
multichannel support.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r-- | src/sync-mode.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c index 776b4ab..298fcd2 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -36,14 +36,7 @@ #include <net/if.h> static void -mcast_change_current_link(int if_idx) -{ - if (if_idx != multichannel_get_current_ifindex(STATE_SYNC(channel))) - multichannel_set_current_channel(STATE_SYNC(channel), if_idx); -} - -static void -do_channel_handler_step(int if_idx, struct nethdr *net, size_t remain) +do_channel_handler_step(int i, struct nethdr *net, size_t remain) { char __ct[nfct_maxsize()]; struct nf_conntrack *ct = (struct nf_conntrack *)(void*) __ct; @@ -58,10 +51,10 @@ do_channel_handler_step(int if_idx, struct nethdr *net, size_t remain) switch (STATE_SYNC(sync)->recv(net)) { case MSG_DATA: - mcast_change_current_link(if_idx); + multichannel_change_current_channel(STATE_SYNC(channel), i); break; case MSG_CTL: - mcast_change_current_link(if_idx); + multichannel_change_current_channel(STATE_SYNC(channel), i); return; case MSG_BAD: STATE_SYNC(error).msg_rcv_malformed++; @@ -123,7 +116,7 @@ retry: } /* handler for messages received */ -static void channel_handler(struct channel *m, int if_idx) +static void channel_handler(struct channel *m, int i) { ssize_t numbytes; ssize_t remain; @@ -168,7 +161,7 @@ static void channel_handler(struct channel *m, int if_idx) HDR_NETWORK2HOST(net); - do_channel_handler_step(if_idx, net, remain); + do_channel_handler_step(i, net, remain); ptr += net->len; remain -= net->len; } |