No subject


Thu Nov 23 16:31:58 EST 2017


configure:22627: checking for pcap_datalink in -lpcap
configure:22657: gcc -o conftest -g -O2 -Wall    conftest.c -lpcap  -lm
-lnsl  >&5
/usr/local/lib/libpcap.so: undefined reference to `pfring_open'
/usr/local/lib/libpcap.so: undefined reference to `pfring_set_reflector'
/usr/local/lib/libpcap.so: undefined reference to `pfring_set_cluster'
/usr/local/lib/libpcap.so: undefined reference to `pfring_close'
/usr/local/lib/libpcap.so: undefined reference to
`pfring_remove_from_cluster'
/usr/local/lib/libpcap.so: undefined reference to `pfring_recv'
collect2: ld returned 1 exit status
configure:22663: $? =3D 1
configure: failed program was:
| /* confdefs.h.  */

As a quick test I changed the AC_CHECK_LIB to...

AC_CHECK_LIB(pcap, pcap_datalink,, LPCAP=3D"no",-lpfring)

And as long as libpfring was installed somewhere where configure could find
it (/usr/lib /usr/local/lib) the new AC_CHECK_LIB would pass.

Also, configure would pass if you add LIBS=3D"-lpfring" to the end of the
./configure command.

So the problem is that if you dynamically install a modified libpcap that
requires some other library the AC_CHECK_LIB(pcap, pcap_datalink,,
LPCAP=3D"no") will/may fail.

I've written a pfring patch to the configure.in in snort-2.6.1.2 to

1. create the following options.
--with-libpfring-includes=3D
--with-libpfring-libraries=3D

2. Added a check so that if the normal pcap/pacp_datalink check fails then
check to see if the user is using a pfring-enabled pcap.

3. Change the libpcap library/headers error to only appears if neither a
standard libpcap or a pfring-enabled libpcap are located.

With the growing popularity of PFRING I thought this might be useful.

Wally

--=20

@xxxxxxx{=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>
Jason Wallace, SnortCP
Sr. Software Engineer
Raritan Computer Inc.
V: 919.851.3663 x1316
M: 919.906.2301
F: 919.851.3655
jason.wallace at ...2924...
www.raritan.com

Public Key Available at:
https://keyserver.pgp.com



--B_3253606248_12699998
Content-type: application/octet-stream; name="snort_pfring.patch.gz"
Content-disposition: attachment;
	filename="snort_pfring.patch.gz"
Content-transfer-encoding: base64

H4sIC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WmacfFSgtu
71ZfEWFd0PJIKKnw9Jm4Xov6EP5vqQoqA94wzI3qGAf2FJ8fKq5bVDu0tlQ8ntJkJ/x8Jzw2
wXaxbPUjpKLZazj1M4hlVSGWY0y3/wOX0ekK2g4FHTJJglOFoiMtRoOqcmd/NJ7qdCS+b7Bj
eGy3nQnV069OhTrQublQt/rFyVAHO54NxX41HdSXhf66gICGJI+lV70zB0Y7zwSon3bMfXwt
KjNUbDyZ3n1uToezuXc7Wa2G1xPre+NfyU9M7fcJAAA=

--B_3253606248_12699998--



--PGP_Universal_C3DE594D_5118BECA_464DE83E_267F36AE
Content-Type: application/pgp-signature;
	x-mac-type=70674453;
	name=PGP.sig
Content-Disposition: attachment; filename=PGP.sig

-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.5.3 (Build 5003)

qANQR1DEDQMBCAFPJCm93cuu9AHCwFUDBQFFyK1ATyQpvd3LrvQBCNy/B/9rVv1z
IqBEeiugE1IBbf5tccwjHyTpulXh+kbI0wkuVXqje2buI2xTmgigz9LsvKnC/bhz
S3o8wf5538vfSaiu3QTBnuTy/oU62xfLLJfDcWcLllJCSwuQmt04hfJONgcy5BKb
49jraz4xQsgpbeBj+nHjU2slJeLr0R/uM+IEcPoXE53zet30oOfZ36ewsDa1+qA/
rt0MFl1PTjz4mOfKjVDIU/zJg3TS/54nPilj7H2dZly5wmrRuBqbqIW+vmOXYl3h
WYlrbRB26EpvcuZ0cQKWQSJYEPKhb4+I4vyTjj13n67uqL41/h/KUsLWYQ0Bg3Vi
fB8ggagEQ3tTBujY
=OqIm
-----END PGP SIGNATURE-----

--PGP_Universal_C3DE594D_5118BECA_464DE83E_267F36AE--




More information about the Snort-devel mailing list