]> git.pld-linux.org Git - packages/snort.git/blob - snort-libnet1.patch
- finished update to 2.4.3
[packages/snort.git] / snort-libnet1.patch
1 diff -urNbB snort-2.4.3.org/configure.in snort-2.4.3/configure.in
2 --- snort-2.4.3.org/configure.in        2005-10-17 00:21:08.000000000 +0200
3 +++ snort-2.4.3/configure.in    2005-10-31 00:46:20.301146250 +0100
4 @@ -743,21 +743,21 @@
5          if test -n "$with_libnet_includes" -a "$with_libnet_includes" != "no"; then
6              libnet_dir="${with_libnet_includes}"
7           else
8 -            libnet_dir="/usr/include /usr/local/include /sw/include"
9 +            libnet_dir="/usr/include /usr/local/include /sw/include /usr/include/libnet1"
10          fi
11          AC_MSG_CHECKING("for libnet.h version 1.0.x")
12          for i in $libnet_dir; do
13 -            if test -r $i/libnet.h; then
14 +            if test -r $i/libnet1.h; then
15                  LIBNET_INC_DIR=$i
16              fi
17          done
18  
19          if test "$LIBNET_INC_DIR" != ""; then
20 -            if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0 >/dev/null"; then
21 -                FAIL_MESSAGE("libnet 1.0.x (libnet.h)", $tmp)
22 +           if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet1.h | grep -v 1.0.2a >/dev/null"; then
23 +                   FAIL_MESSAGE("libnet 1.0.x (libnet1.h)", $tmp)
24              fi
25 -            CFLAGS="${CFLAGS} `libnet-config --defines` `libnet-config --cflags`"
26 -            LIBS="${LIBS} `libnet-config --libs`"
27 +           CFLAGS="${CFLAGS} `libnet1-config --defines` `libnet1-config --cflags`"
28 +           LIBS="${LIBS} `libnet1-config --libs`"
29              CPPFLAGS="${CPPFLAGS} -I${LIBNET_INC_DIR}"
30              AC_MSG_RESULT($i)
31          else
32 @@ -769,26 +769,25 @@
33  
34  AC_ARG_ENABLE(flexresp,
35  [  --enable-flexresp       Flexible Responses on hostile connection attempts],
36 -[ CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-config --defines --cflags`" LDFLAGS="${LDFLAGS} `libnet-config --libs`"],)
37 -                
38 +[ CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet1-config --defines --cflags`" LDFLAGS="${LDFLAGS} `libnet1-config --libs`"],)
39  
40  if test "$enable_flexresp" != "no" -a "$enable_flexresp" = "yes"; then
41  
42 -  if test `libnet-config --cflags | wc -c` = "1"; then
43 +  if test `libnet1-config --cflags | wc -c` = "1"; then
44      CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
45      LIBNET_CONFIG_BROKEN_CFLAGS=yes
46    fi
47  
48 -  if test `libnet-config --libs | wc -c` = "1"; then
49 -    AC_MSG_WARN(libnet-config --libs is broken on your system.  If you)
50 +  if test `libnet1-config --libs | wc -c` = "1"; then
51 +    AC_MSG_WARN(libnet1-config --libs is broken on your system.  If you)
52      AC_MSG_WARN(are using a precompiled package please notify the) 
53      AC_MSG_WARN(maintainer.)
54      LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib"
55      LIBS="${LIBS} -lnet"
56    fi
57  
58 -  LNET=""
59 -  AC_CHECK_HEADERS(libnet.h,, LNET="no")
60 +  LNET="yes"
61 +  AC_CHECK_HEADERS(libnet1.h,, LNET="no")
62    if test "$LNET" = "no"; then
63      echo
64      echo "   ERROR!  Libnet header not found, go get it from"
65 @@ -801,38 +800,38 @@
66    AC_MSG_CHECKING(for libnet version 1.0.2a)
67    if test "${LIBNET_CONFIG_BROKEN_CFLAGS}" = "yes"; then
68      if test -n "$with_libnet_includes" -a "$with_libnet_includes" != "no"; then
69 -      libnet_dir="${with_libnet_includes}"
70 +      libnet_dir="${with_libnet1_includes}"
71      else
72        libnet_dir="/usr/include /usr/local/include /sw/include"
73      fi
74    else
75 -    libnet_dir=`libnet-config --cflags | cut -dI -f2`
76 +    libnet_dir=`libnet1-config --cflags | cut -dI -f2`
77    fi
78  
79 -  LIBNET_INC_DIR=""
80 +  LIBNET_INC_DIR="/usr/include/libnet1"
81    for i in $libnet_dir; do
82 -    if test -r $i/libnet.h; then
83 +    if test -r $i/libnet1.h; then
84        LIBNET_INC_DIR=$i
85      fi
86    done
87  
88    if test "$LIBNET_INC_DIR" != ""; then
89 -    if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
90 +    if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet1.h | grep -v 1.0.2a >/dev/null"; then
91        AC_MSG_RESULT(no)
92        echo
93        echo "   ERROR!  Snort with --enable-flexresp will *only* work with"
94        echo "   libnet version 1.0.2a, go get it from"
95        echo "   http://www.packetfactory.net/projects/libnet/"
96 -      FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR)
97 +      FAIL_MESSAGE("libnet 1.0.2a (libnet1.h)", $LIBNET_INC_DIR)
98      fi
99      AC_MSG_RESULT(yes)
100    else
101      AC_MSG_RESULT(no)
102 -    FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir)
103 +    FAIL_MESSAGE("libnet 1.0.2a (libnet1.h)", $libnet_dir)
104    fi
105  
106    LNET=""
107 -  AC_CHECK_LIB(net, libnet_build_ip,, LNET="no")
108 +  AC_CHECK_LIB(net1, libnet_build_ip,, LNET="no")
109    if test "$LNET" = "no"; then
110      echo
111      echo "   ERROR!  Libnet library not found, go get it from"
112 diff -urNbB snort-2.4.3.org/src/detection-plugins/sp_react.c snort-2.4.3/src/detection-plugins/sp_react.c
113 --- snort-2.4.3.org/src/detection-plugins/sp_react.c    2004-03-23 16:34:46.000000000 +0100
114 +++ snort-2.4.3/src/detection-plugins/sp_react.c        2005-10-31 00:42:52.160138250 +0100
115 @@ -57,7 +57,7 @@
116  #include <stdlib.h>
117  #include <string.h>
118  #include <ctype.h>
119 -#include <libnet.h>
120 +#include <libnet1.h>
121  
122  #include "rules.h"
123  #include "decode.h"
124 diff -urNbB snort-2.4.3.org/src/detection-plugins/sp_respond.c snort-2.4.3/src/detection-plugins/sp_respond.c
125 --- snort-2.4.3.org/src/detection-plugins/sp_respond.c  2004-03-23 16:34:46.000000000 +0100
126 +++ snort-2.4.3/src/detection-plugins/sp_respond.c      2005-10-31 00:42:52.160138250 +0100
127 @@ -34,7 +34,7 @@
128  
129  
130  #ifdef ENABLE_RESPONSE
131 -#include <libnet.h>
132 +#include <libnet1.h>
133  
134  #include "decode.h"
135  #include "rules.h"
136 diff -urNbB snort-2.4.3.org/src/inline.c snort-2.4.3/src/inline.c
137 --- snort-2.4.3.org/src/inline.c        2005-05-05 22:00:35.000000000 +0200
138 +++ snort-2.4.3/src/inline.c    2005-10-31 00:42:52.160138250 +0100
139 @@ -3,7 +3,7 @@
140  #include <stdlib.h>
141  #include <string.h>
142  #include <pcap.h>
143 -#include <libnet.h>
144 +#include <libnet1.h>
145  
146  #include "decode.h"
147  #include "inline.h"
This page took 0.036817 seconds and 3 git commands to generate.