summaryrefslogtreecommitdiffstats
path: root/input/packet
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-12-08 07:27:02 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-12-08 07:27:02 +0000
commitad0264a51f59f911bf8b48c03e80e8358c67de38 (patch)
treee57685adcf6e7a25ff4a26fb6aadf1e17392d2f5 /input/packet
parent26d2c3848c5851bc204280179d3b1f8d643bf078 (diff)
more verbose error reporting
Diffstat (limited to 'input/packet')
-rw-r--r--input/packet/ulogd_inppkt_NFLOG.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
index 7e9a00a..e04799e 100644
--- a/input/packet/ulogd_inppkt_NFLOG.c
+++ b/input/packet/ulogd_inppkt_NFLOG.c
@@ -312,22 +312,35 @@ static int start(struct ulogd_pluginstance *upi)
goto out_handle;
if (unbind_ce(upi->config_kset).u.value > 0) {
- ulogd_log(ULOGD_NOTICE, "forcing unbind of existing log handler for "
- "protocol %d\n", af_ce(upi->config_kset).u.value);
- nflog_unbind_pf(ui->nful_h, af_ce(upi->config_kset).u.value);
+ ulogd_log(ULOGD_NOTICE, "forcing unbind of existing log "
+ "handler for protocol %d\n",
+ af_ce(upi->config_kset).u.value);
+ if (nflog_unbind_pf(ui->nful_h,
+ af_ce(upi->config_kset).u.value) < 0) {
+ ulogd_log(ULOGD_ERROR, "unable to force-unbind "
+ "existing log handler for protocol %d\n",
+ af_ce(upi->config_kset).u.value);
+ goto out_handle;
+ }
}
ulogd_log(ULOGD_DEBUG, "binding to protocol family %d\n",
af_ce(upi->config_kset).u.value);
- if (nflog_bind_pf(ui->nful_h, af_ce(upi->config_kset).u.value) < 0)
+ if (nflog_bind_pf(ui->nful_h, af_ce(upi->config_kset).u.value) < 0) {
+ ulogd_log(ULOGD_ERROR, "unable to bind to protocol family %d\n",
+ af_ce(upi->config_kset).u.value);
goto out_bind_pf;
+ }
ulogd_log(ULOGD_DEBUG, "binding to log group %d\n",
group_ce(upi->config_kset).u.value);
ui->nful_gh = nflog_bind_group(ui->nful_h,
group_ce(upi->config_kset).u.value);
- if (!ui->nful_gh)
+ if (!ui->nful_gh) {
+ ulogd_log(ULOGD_ERROR, "unable to bind to log group %d\n",
+ group_ce(upi->config_kset).u.value);
goto out_bind;
+ }
nflog_set_mode(ui->nful_gh, NFULNL_COPY_PACKET, 0xffff);