Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 245752 | Differences between
and this patch

Collapse All | Expand All

(-)snort-2.8.3.1/configure.in (-31 / +31 lines)
Lines 1151-1169 Link Here
1151
         else
1151
         else
1152
            libnet_dir="/usr/include /usr/local/include /sw/include"
1152
            libnet_dir="/usr/include /usr/local/include /sw/include"
1153
        fi
1153
        fi
1154
        AC_MSG_CHECKING("for libnet.h version 1.0.x")
1154
        AC_MSG_CHECKING("for libnet-1.0.h version 1.0.x")
1155
        for i in $libnet_dir; do
1155
        for i in $libnet_dir; do
1156
            if test -r "$i/libnet.h"; then
1156
            if test -r "$i/libnet-1.0.h"; then
1157
                LIBNET_INC_DIR="$i"
1157
                LIBNET_INC_DIR="$i"
1158
            fi
1158
            fi
1159
        done
1159
        done
1160
1160
1161
        if test "$LIBNET_INC_DIR" != ""; then
1161
        if test "$LIBNET_INC_DIR" != ""; then
1162
            if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0 >/dev/null"; then
1162
            if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0 >/dev/null"; then
1163
                FAIL_MESSAGE("libnet 1.0.x (libnet.h)", $LIBNET_INC_DIR)
1163
                FAIL_MESSAGE("libnet 1.0.x (libnet-1.0.h)", $LIBNET_INC_DIR)
1164
            fi
1164
            fi
1165
            CFLAGS="${CFLAGS} `libnet-config --defines` `libnet-config --cflags`"
1165
            CFLAGS="${CFLAGS} `libnet-1.0-config --defines` `libnet-1.0-config --cflags`"
1166
            LIBS="${LIBS} `libnet-config --libs`"
1166
            LIBS="${LIBS} `libnet-1.0-config --libs`"
1167
            CPPFLAGS="${CPPFLAGS} -I${LIBNET_INC_DIR}"
1167
            CPPFLAGS="${CPPFLAGS} -I${LIBNET_INC_DIR}"
1168
            AC_MSG_RESULT($i)
1168
            AC_MSG_RESULT($i)
1169
        else
1169
        else
Lines 1185-1192 Link Here
1185
[  --enable-flexresp        Flexible Responses on hostile connection attempts],
1185
[  --enable-flexresp        Flexible Responses on hostile connection attempts],
1186
       enable_flexresp="$enableval", enable_flexresp="no")
1186
       enable_flexresp="$enableval", enable_flexresp="no")
1187
if test "x$enable_flexresp" = "xyes"; then
1187
if test "x$enable_flexresp" = "xyes"; then
1188
    CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-config --defines --cflags`"
1188
    CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-1.0-config --defines --cflags`"
1189
    LDFLAGS="${LDFLAGS} `libnet-config --libs`"
1189
    LDFLAGS="${LDFLAGS} `libnet-1.0-config --libs`"
1190
fi
1190
fi
1191
                
1191
                
1192
if test "x$enable_flexresp" != "xno" -a "x$enable_flexresp" = "xyes"; then
1192
if test "x$enable_flexresp" != "xno" -a "x$enable_flexresp" = "xyes"; then
Lines 1196-1216 Link Here
1196
        exit
1196
        exit
1197
    fi
1197
    fi
1198
1198
1199
    if test `libnet-config --cflags | wc -c` = "1"; then
1199
    if test `libnet-1.0-config --cflags | wc -c` = "1"; then
1200
        CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
1200
        CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
1201
        LIBNET_CONFIG_BROKEN_CFLAGS="yes"
1201
        LIBNET_CONFIG_BROKEN_CFLAGS="yes"
1202
    fi
1202
    fi
1203
1203
1204
    if test `libnet-config --libs | wc -c` = "1"; then
1204
    if test `libnet-1.0-config --libs | wc -c` = "1"; then
1205
        AC_MSG_WARN(libnet-config --libs is broken on your system.  If you)
1205
        AC_MSG_WARN(libnet-1.0-config --libs is broken on your system.  If you)
1206
        AC_MSG_WARN(are using a precompiled package please notify the) 
1206
        AC_MSG_WARN(are using a precompiled package please notify the) 
1207
        AC_MSG_WARN(maintainer.)
1207
        AC_MSG_WARN(maintainer.)
1208
        LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib"
1208
        LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib"
1209
        LIBS="${LIBS} -lnet"
1209
        LIBS="${LIBS} -lnet-1.0"
1210
    fi
1210
    fi
1211
1211
1212
    LNET=""
1212
    LNET=""
1213
    AC_CHECK_HEADERS(libnet.h,, LNET="no")
1213
    AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no")
1214
    if test "x$LNET" = "xno"; then
1214
    if test "x$LNET" = "xno"; then
1215
        echo
1215
        echo
1216
        echo "   ERROR!  Libnet header not found, go get it from"
1216
        echo "   ERROR!  Libnet header not found, go get it from"
Lines 1228-1260 Link Here
1228
            libnet_dir="/usr/include /usr/local/include /sw/include"
1228
            libnet_dir="/usr/include /usr/local/include /sw/include"
1229
        fi
1229
        fi
1230
    else
1230
    else
1231
        libnet_dir=`libnet-config --cflags | cut -dI -f2`
1231
        libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
1232
    fi
1232
    fi
1233
1233
1234
    LIBNET_INC_DIR=""
1234
    LIBNET_INC_DIR=""
1235
    for i in $libnet_dir; do
1235
    for i in $libnet_dir; do
1236
        if test -r "$i/libnet.h"; then
1236
        if test -r "$i/libnet-1.0.h"; then
1237
            LIBNET_INC_DIR="$i"
1237
            LIBNET_INC_DIR="$i"
1238
        fi
1238
        fi
1239
    done
1239
    done
1240
1240
1241
    if test "x$LIBNET_INC_DIR" != "x"; then
1241
    if test "x$LIBNET_INC_DIR" != "x"; then
1242
        if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
1242
        if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
1243
            AC_MSG_RESULT(no)
1243
            AC_MSG_RESULT(no)
1244
            echo
1244
            echo
1245
            echo "   ERROR!  Snort with --enable-flexresp will *only* work with"
1245
            echo "   ERROR!  Snort with --enable-flexresp will *only* work with"
1246
            echo "   libnet version 1.0.2a, go get it from"
1246
            echo "   libnet version 1.0.2a, go get it from"
1247
            echo "   http://www.packetfactory.net/projects/libnet/"
1247
            echo "   http://www.packetfactory.net/projects/libnet/"
1248
            FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR)
1248
            FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR)
1249
        fi
1249
        fi
1250
        AC_MSG_RESULT(yes)
1250
        AC_MSG_RESULT(yes)
1251
    else
1251
    else
1252
        AC_MSG_RESULT(no)
1252
        AC_MSG_RESULT(no)
1253
        FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir)
1253
        FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir)
1254
    fi
1254
    fi
1255
1255
1256
    LNET=""
1256
    LNET=""
1257
    AC_CHECK_LIB(net, libnet_build_ip,, LNET="no")
1257
    AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no")
1258
    if test "x$LNET" = "xno"; then
1258
    if test "x$LNET" = "xno"; then
1259
        echo
1259
        echo
1260
        echo "   ERROR!  Libnet library not found, go get it from"
1260
        echo "   ERROR!  Libnet library not found, go get it from"
Lines 1305-1312 Link Here
1305
[  --enable-react           Intercept and terminate offending HTTP accesses],
1305
[  --enable-react           Intercept and terminate offending HTTP accesses],
1306
       enable_react="$enableval", enable_react="no")
1306
       enable_react="$enableval", enable_react="no")
1307
if test "x$enable_react" = "xyes"; then
1307
if test "x$enable_react" = "xyes"; then
1308
    CPPFLAGS="${CPPFLAGS} -DENABLE_REACT `libnet-config --defines --cflags`"
1308
    CPPFLAGS="${CPPFLAGS} -DENABLE_REACT `libnet-1.0-config --defines --cflags`"
1309
    LDFLAGS="${LDFLAGS} `libnet-config --libs`"
1309
    LDFLAGS="${LDFLAGS} `libnet-1.0-config --libs`"
1310
fi
1310
fi
1311
1311
1312
if test "x$enable_react" != "xno" -a "x$enable_react" = "xyes"; then
1312
if test "x$enable_react" != "xno" -a "x$enable_react" = "xyes"; then
Lines 1317-1329 Link Here
1317
        exit
1317
        exit
1318
    fi
1318
    fi
1319
1319
1320
    if test `libnet-config --cflags | wc -c` = "1"; then
1320
    if test `libnet-1.0-config --cflags | wc -c` = "1"; then
1321
        CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
1321
        CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
1322
        LIBNET_CONFIG_BROKEN_CFLAGS="yes"
1322
        LIBNET_CONFIG_BROKEN_CFLAGS="yes"
1323
    fi
1323
    fi
1324
1324
1325
    if test `libnet-config --libs | wc -c` = "1"; then
1325
    if test `libnet-1.0-config --libs | wc -c` = "1"; then
1326
        AC_MSG_WARN(libnet-config --libs is broken on your system.  If you)
1326
        AC_MSG_WARN(libnet-1.0-config --libs is broken on your system.  If you)
1327
        AC_MSG_WARN(are using a precompiled package please notify the)
1327
        AC_MSG_WARN(are using a precompiled package please notify the)
1328
        AC_MSG_WARN(maintainer.)
1328
        AC_MSG_WARN(maintainer.)
1329
        LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib"
1329
        LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib"
Lines 1331-1337 Link Here
1331
    fi
1331
    fi
1332
1332
1333
    LNET=""
1333
    LNET=""
1334
    AC_CHECK_HEADERS(libnet.h,, LNET="no")
1334
    AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no")
1335
    if test "x$LNET" = "xno"; then
1335
    if test "x$LNET" = "xno"; then
1336
        echo
1336
        echo
1337
        echo "   ERROR!  Libnet header not found, go get it from"
1337
        echo "   ERROR!  Libnet header not found, go get it from"
Lines 1349-1381 Link Here
1349
            libnet_dir="/usr/include /usr/local/include /sw/include"
1349
            libnet_dir="/usr/include /usr/local/include /sw/include"
1350
        fi
1350
        fi
1351
    else
1351
    else
1352
        libnet_dir=`libnet-config --cflags | cut -dI -f2`
1352
        libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
1353
    fi
1353
    fi
1354
1354
1355
    LIBNET_INC_DIR=""
1355
    LIBNET_INC_DIR=""
1356
    for i in $libnet_dir; do
1356
    for i in $libnet_dir; do
1357
        if test -r "$i/libnet.h"; then
1357
        if test -r "$i/libnet-1.0.h"; then
1358
            LIBNET_INC_DIR="$i"
1358
            LIBNET_INC_DIR="$i"
1359
        fi
1359
        fi
1360
    done
1360
    done
1361
1361
1362
    if test "x$LIBNET_INC_DIR" != "x"; then
1362
    if test "x$LIBNET_INC_DIR" != "x"; then
1363
        if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
1363
        if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
1364
            AC_MSG_RESULT(no)
1364
            AC_MSG_RESULT(no)
1365
            echo
1365
            echo
1366
            echo "   ERROR!  Snort with --enable-react will *only* work with"
1366
            echo "   ERROR!  Snort with --enable-react will *only* work with"
1367
            echo "   libnet version 1.0.2a, go get it from"
1367
            echo "   libnet version 1.0.2a, go get it from"
1368
            echo "   http://www.packetfactory.net/projects/libnet/"
1368
            echo "   http://www.packetfactory.net/projects/libnet/"
1369
            FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR)
1369
            FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR)
1370
        fi
1370
        fi
1371
        AC_MSG_RESULT(yes)
1371
        AC_MSG_RESULT(yes)
1372
    else
1372
    else
1373
        AC_MSG_RESULT(no)
1373
        AC_MSG_RESULT(no)
1374
        FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir)
1374
        FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir)
1375
    fi
1375
    fi
1376
1376
1377
    LNET=""
1377
    LNET=""
1378
    AC_CHECK_LIB(net, libnet_build_ip,, LNET="no")
1378
    AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no")
1379
    if test "x$LNET" = "xno"; then
1379
    if test "x$LNET" = "xno"; then
1380
        echo
1380
        echo
1381
        echo "   ERROR!  Libnet library not found, go get it from"
1381
        echo "   ERROR!  Libnet library not found, go get it from"
(-)snort-2.8.3.1/src/detection-plugins/sp_react.c (-1 / +1 lines)
Lines 59-65 Link Here
59
#include <stdlib.h>
59
#include <stdlib.h>
60
#include <string.h>
60
#include <string.h>
61
#include <ctype.h>
61
#include <ctype.h>
62
#include <libnet.h>
62
#include <libnet-1.0.h>
63
63
64
#include "rules.h"
64
#include "rules.h"
65
#include "decode.h"
65
#include "decode.h"
(-)snort-2.8.3.1/src/detection-plugins/sp_respond.c (-1 / +1 lines)
Lines 36-42 Link Here
36
36
37
37
38
#if defined(ENABLE_RESPONSE) && !defined(ENABLE_RESPONSE2)
38
#if defined(ENABLE_RESPONSE) && !defined(ENABLE_RESPONSE2)
39
#include <libnet.h>
39
#include <libnet-1.0.h>
40
40
41
#include "decode.h"
41
#include "decode.h"
42
#include "rules.h"
42
#include "rules.h"
(-)snort-2.8.3.1/src/inline.c (-1 / +1 lines)
Lines 20-26 Link Here
20
#include <stdlib.h>
20
#include <stdlib.h>
21
#include <string.h>
21
#include <string.h>
22
#include <pcap.h>
22
#include <pcap.h>
23
#include <libnet.h>
23
#include <libnet-1.0.h>
24
24
25
#include "decode.h"
25
#include "decode.h"
26
#include "inline.h"
26
#include "inline.h"

Return to bug 245752