netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pete Whiting <pete@whitings.org>
To: netfilter-devel@vger.kernel.org
Subject: trying to test libnetfilter_queue on openwrt kamikaze_RC2 - failing with "connection refused"
Date: Sat, 31 Jan 2009 21:47:05 -0700	[thread overview]
Message-ID: <3ba156dd0901312047s3f54f6a4t3b43a36025103dfe@mail.gmail.com> (raw)

I am trying to build/test libnetfilter_queue for a user-space app
running on openwrt. Compile failed in the utils subdirectory until I
modified Makefile.in to include libnfnetlink.so:

--- original-libnetfilter_queue-0.0.16/utils/Makefile.in	2008-06-27
04:07:44.000000000 -0600
+++ libnetfilter_queue-0.0.16/utils/Makefile.in	2009-01-31
18:29:03.000000000 -0700
@@ -48,7 +48,7 @@ nfqnl_test_OBJECTS = $(am_nfqnl_test_OBJ
 nfqnl_test_DEPENDENCIES = ../src/libnetfilter_queue.la
 nfqnl_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(nfqnl_test_LDFLAGS) $(LDFLAGS) -o $@
+	$(nfqnl_test_LDFLAGS) $(LDFLAGS) -o $@ libnfnetlink.so
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles

I'm sure there is a better way to do this.

Once built and installed I tried running nfqnl_test as root:
root@Kamikaze_RC2:~# ./nfqnl_test
opening library handle
unbinding existing nf_queue handler for AF_INET (if any)
nfnl_talk: sendmsg(netlink) Connection refused
error during nfq_unbind_pf()

I verified that xt_NFQUEUE is installed:
root@Kamikaze_RC2:~# lsmod | grep QUEUE
xt_NFQUEUE               672  0
x_tables                8976  16
xt_NFQUEUE,ipt_ULOG,xt_string,xt_layer7,ipt_ipp2p,ipt_MASQUERADE,iptable_nat,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_multiport,xt_mac,xt_limit,ip_tables,xt_tcpudp

strace shows the following:
socket(PF_NETLINK, SOCK_RAW, 12)        = 3
getsockname(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 0
time(NULL)                              = 1232458046
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=1065, groups=00000000}, [12]) = 0
bind(3, {sa_family=AF_NETLINK, pid=1065, groups=00000000}, 12) = 0
write(1, "unbinding existing nf_queue hand"..., 57) = 57
sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\34\0\0\0\2\3\5\0@\321uI\0\0\0\0\0\0\0\0\10\0\1\0\4\10\0\2",
28}], msg_controllen=0, msg_flags=0}, 0) = -1 ECONNREFUSED (Connection
refused)
write(2, "nfnl_talk", 9nfnl_talk)                = 9
write(2, ": sendmsg(netlink) ", 19: sendmsg(netlink) )     = 19
write(2, "Connection refused", 18Connection refused)      = 18
write(2, "\n", 1
)                       = 1

kernel version is 2.6.25.17

thanks for any suggestions.
pete

             reply	other threads:[~2009-02-01  4:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-01  4:47 Pete Whiting [this message]
2009-02-01 11:29 ` trying to test libnetfilter_queue on openwrt kamikaze_RC2 - failing with "connection refused" Eric Leblond
2009-02-01 12:38   ` Pete Whiting

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ba156dd0901312047s3f54f6a4t3b43a36025103dfe@mail.gmail.com \
    --to=pete@whitings.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).