Re: [PATCH next] utils: bpf_compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 1, 2013 at 6:20 PM, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> On Tue, Mar 12, 2013 at 11:44:12AM -0400, Willem de Bruijn wrote:
>> V2
>> - update build process to
>>   - succeed without bpf_compiler when --enable-bpf-compiler is not set
>>   - succeed with bpf_compiler when this flag is set and libpcap is found
>>   - fail when this flag is set but libpcap is absent
>> - release memory allocated by pcap on exit
>
> Applied with changes:

Thanks, Pablo.

> * renamed utility to add the `nf' prefix.
>
> * the output of the utility is now exactly what iptables -m bpf --bytecode
>   needs, just to make it easier to everyone.
>
> Still missing a hard fail if --enable-bpf-compiler is set and libpcap
> is not available in the system,

Compilation and linking will both fail hard:

if gcc -DHAVE_CONFIG_H -I. -I. -I..  -D_LARGEFILE_SOURCE=1
-D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT
-DXTABLES_LIBDIR=\"/usr/local/lib/xtables\" -DXTABLES_INTERNAL
-I../include -I../include   -Wall -Waggregate-return
-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow
-Wstrict-prototypes -Winline -pipe -g -O2 -MT nfbpf_compile.o -MD -MP
-MF ".deps/nfbpf_compile.Tpo" -c -o nfbpf_compile.o nfbpf_compile.c; \
then mv -f ".deps/nfbpf_compile.Tpo" ".deps/nfbpf_compile.Po"; else rm
-f ".deps/nfbpf_compile.Tpo"; exit 1; fi
nfbpf_compile.c:12:18: fatal error: pcap.h: No such file or directory
compilation terminated.
make: *** [nfbpf_compile.o] Error 1

Do you want the configure script itself to fail before that step?

> I'd appreciate if you send me a follow
> up patch to address this. You may want to have a look at how ulogd2
> does this in its configure fail as reference.

That skips compilation if HAVE_PCAP is false, but it does not fail
hard during configure, either. At least, that's what I gather from
reading and running

https://git.netfilter.org/ulogd2/tree/configure.ac#n23
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux