Skip to contentSkip to conversation

conntrack tool: Fix loading of protocol helpers

PATCH Applied Thomas Jarosch 3 participants 7 messages Mar 16, 2007 – Mar 27, 2007 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 conntrack tool: Fix loading of protocol helpers

Hello,

the pkgconfig changes from August 2006 broke the loading of the protocol helpers as dlopen() doesn't search for symbols in the main executable. As a result the protocol helpers can't find register_proto().

Attached patch fixes the problem.

Does anyone have a short example how to use the -G functionality of the tool?

Have a nice weekend,
Thomas

src/Makefile.am +1 -1
diff -u -r -p conntrack-20070315/src/Makefile.am conntrack.fixed/src/Makefile.am
@@ -3,5 +3,5 @@ LIBS = @CONNTRACK_LIBS@
 
 sbin_PROGRAMS = conntrack
 conntrack_SOURCES = conntrack.c
-#conntrack_LDFLAGS = $(all_libraries) -rdynamic
+conntrack_LDFLAGS = -rdynamic
  
#1 lore raw
Quoted 7 lines · Thomas Jarosch

Hello,

the pkgconfig changes from August 2006 broke the loading of the protocol helpers as dlopen() doesn't search for symbols in the main executable. As a result the protocol helpers can't find register_proto().

Attached patch fixes the problem.

Applied, thanks again Thomas.

Quoted 1 line

Does anyone have a short example how to use the -G functionality of the tool?

Not out of my head, sorry.

#2 lore raw
In reply to Thomas Jarosch
Quoted 1 line · Thomas Jarosch

Does anyone have a short example how to use the -G functionality of the tool?

Have a look at the script called test.sh under SVN, you can find one there.

Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
#3 lore raw

Hello Pablo,

Quoted 3 lines
Quoted 1 line

Does anyone have a short example how to use the -G functionality of the tool?

Have a look at the script called test.sh under SVN, you can find one there.

Thanks, that's exactly what I've searched for. I didn't notice it because it's called "test.sh". What about the attached patch for the manual page? ;-)

Cheers,
Thomas

conntrack.new renamed from conntrack.8 +2 -0
@@ -127,6 +127,8 @@
 The exit code is 0 for correct function.  Errors which appear to be caused by
 invalid command line parameters cause an exit code of 2.  Any other errors
 cause an exit code of 1.
+.SH EXAMPLE USAGE
+See the included test.sh script for a extensive usage example.
 .SH BUGS
 Bugs? What's this ;-)
 .SH SEE ALSO
#4 lore raw

Hi Thomas,

Quoted 6 lines · Thomas Jarosch
Quoted 2 lines

Have a look at the script called test.sh under SVN, you can find one there.

Thanks, that's exactly what I've searched for. I didn't notice it because it's called "test.sh". What about the attached patch for the manual page? ;-)

I'd prefer some examples directly hardcoded to the manpage since test.sh is not distributed inside a release package, so this could get people confused. So, would you resend me a patch with some examples? Thanks!

Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
#5 lore raw

Hello Pablo,

Quoted 10 lines · Pablo Neira Ayuso
Quoted 6 lines
Quoted 2 lines

Have a look at the script called test.sh under SVN, you can find one there.

Thanks, that's exactly what I've searched for. I didn't notice it because it's called "test.sh". What about the attached patch for the manual page? ;-)

I'd prefer some examples directly hardcoded to the manpage since test.sh is not distributed inside a release package, so this could get people confused. So, would you resend me a patch with some examples? Thanks!

What about renaming test.sh to example.sh and include it in the normal distribution?

Cheers,
Thomas

#6 lore raw
Quoted 6 lines · Thomas Jarosch
Quoted 3 lines

I'd prefer some examples directly hardcoded to the manpage since test.sh is not distributed inside a release package, so this could get people confused. So, would you resend me a patch with some examples? Thanks!

What about renaming test.sh to example.sh and include it in the normal distribution?

Hm, I don't like it either. Think of packaged versions provided by vendors, they would have to put the script somewhere in the directory tree. I still prefer the examples hardcoded in the manpage. Actually, I usually like finding examples in manpages :)

Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris