author | Rich Burridge <rich.burridge@oracle.com> |
Tue, 07 Feb 2017 09:08:08 -0800 | |
changeset 7650 | 2e39c59b83f8 |
parent 2198 | 168b8acace5f |
permissions | -rw-r--r-- |
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
1 |
Changes needed to get snort to successfully build on Solaris. |
1345
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
2 |
|
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
3 |
1/ We need to define our own equivalent (snort_in6_addr) of the in6_addr |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
4 |
struct from /usr/include/netinet/in.h because on Solaris we do not have |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
5 |
a s6_addr16 definition. We then have to use snort_in6_addr instead of |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
6 |
in6_addr in numerous places. |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
7 |
CR #25300643 has been filed for this Solaris include file omission. |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
8 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
9 |
2/ Uses gethrtime() rather than trying to read the %tick register (the |
1345
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
latter has issues in MP environments) |
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
11 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
12 |
3/ Remove the need to define lines like "CFLAGS += -Du_int8_t=uint8_t" |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
13 |
in the snort component Makefile by #include'ing "sf_types.h" in |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
14 |
snort-2.9.9.0/src/sfutil/sf_ip.h |
1345
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
15 |
|
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
16 |
4/ Prevent "-Wall" being added to CFLAGS by removing a bogus piece of |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
17 |
code in configure.in |
1345
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
|
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
19 |
The gethrtime() changes will be pushed upstream and the other configure.in |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
20 |
change. The others should be fixed by changes to standard Solaris headers. |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
21 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
22 |
--- snort-2.9.9.0.orig/configure.in 2016-11-14 21:27:15.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
23 |
+++ snort-2.9.9.0/configure.in 2017-01-25 09:36:56.282142284 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
24 |
@@ -889,27 +889,8 @@ |
1345
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
25 |
AC_MSG_RESULT(no) |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
26 |
fi |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
27 |
|
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
28 |
-# check for sparc %time register |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
29 |
-if eval "echo $host_cpu|grep -i sparc >/dev/null"; then |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
30 |
- OLD_CFLAGS="$CFLAGS" |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
31 |
- CFLAGS="$CFLAGS -mcpu=v9 " |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
32 |
- AC_MSG_CHECKING([for sparc %time register]) |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
33 |
- AC_RUN_IFELSE( |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
34 |
- [AC_LANG_PROGRAM( |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
35 |
- [[]], |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
36 |
- [[ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
37 |
- int val; |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
38 |
- __asm__ __volatile__("rd %%tick, %0" : "=r"(val)); |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
39 |
- ]])], |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
40 |
- [sparcv9="yes"], |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
41 |
- [sparcv9="no"]) |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
42 |
- AC_MSG_RESULT($sparcv9) |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
43 |
- if test "x$sparcv9" = "xyes"; then |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
44 |
- AC_DEFINE([SPARCV9],[1],[For sparc v9 with %time register]) |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
45 |
- else |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
46 |
- CFLAGS="$OLD_CFLAGS" |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
47 |
- fi |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
48 |
-fi |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
49 |
+# Check for the presence of the Solaris gethrtime routine. |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
50 |
+AC_CHECK_FUNCS(gethrtime) |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
51 |
|
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
52 |
# modified from gnulib/m4/visibility.m4 |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
53 |
AC_DEFUN([CC_VISIBILITY], |
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
54 |
@@ -1489,11 +1470,6 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
55 |
fi |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
56 |
fi |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
57 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
58 |
-# Question: Does ICC not support -Wall (VJR - Jan 14, 2015) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
59 |
-if test "$ICC" = "no"; then |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
60 |
- CFLAGS="$CFLAGS -Wall" |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
61 |
-fi |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
62 |
- |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
63 |
echo $CFLAGS > cflags.out |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
64 |
echo $CPPFLAGS > cppflags.out |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
65 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
66 |
diff -urN snort-2.9.9.0.orig/src/cpuclock.h snort-2.9.9.0/src/cpuclock.h |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
67 |
--- snort-2.9.9.0.orig/src/cpuclock.h 2016-06-07 00:47:47.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
68 |
+++ snort-2.9.9.0/src/cpuclock.h 2017-01-25 09:41:13.229685320 +0000 |
2198
168b8acace5f
PSARC 2014/346 Data Acquisition library (DAQ) 2.0.2
Rich Burridge <rich.burridge@oracle.com>
parents:
1345
diff
changeset
|
69 |
@@ -84,26 +84,15 @@ |
1345
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
70 |
val = ((uint64_t)tbl) | (((uint64_t)tbu0) << 32); \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
71 |
} |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
72 |
#else |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
73 |
-/* SPARC */ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
74 |
-#ifdef SPARCV9 |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
75 |
-#ifdef _LP64 |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
76 |
+/* SOLARIS */ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
77 |
+#ifdef HAVE_GETHRTIME |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
78 |
#define get_clockticks(val) \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
79 |
{ \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
80 |
- __asm__ __volatile__("rd %%tick, %0" : "=r"(val)); \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
81 |
+ val = gethrtime(); \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
82 |
} |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
83 |
#else |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
84 |
-#define get_clockticks(val) \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
85 |
-{ \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
86 |
- uint32_t a, b; \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
87 |
- __asm__ __volatile__("rd %%tick, %0\n" \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
88 |
- "srlx %0, 32, %1" \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
89 |
- : "=r"(a), "=r"(b)); \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
90 |
- val = ((uint64_t)a) | (((uint64_t)b) << 32); \ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
91 |
-} |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
92 |
-#endif /* _LP64 */ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
93 |
-#else |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
94 |
#define get_clockticks(val) |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
95 |
-#endif /* SPARC */ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
96 |
+#endif /* HAVE_GETTHRTIME */ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
97 |
#endif /* POWERPC || PPC */ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
98 |
#endif /* IA64 && HPUX */ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
99 |
#endif /* IA64 && GNUC */ |
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
100 |
diff -urN snort-2.9.9.0.orig/src/decode.c snort-2.9.9.0/src/decode.c |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
101 |
--- snort-2.9.9.0.orig/src/decode.c 2016-08-16 01:55:56.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
102 |
+++ snort-2.9.9.0/src/decode.c 2017-01-25 07:29:26.221313664 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
103 |
@@ -3152,7 +3152,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
104 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
105 |
IP6RawHdr* hdr6 = (IP6RawHdr*)p->iph; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
106 |
uint8_t multicast_scope; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
107 |
- struct in6_addr* ip_dst; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
108 |
+ struct snort_in6_addr* ip_dst; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
109 |
uint32_t h_ip_dst; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
110 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
111 |
if ( hdr6->ip6_src.s6_addr[0] == IP6_MULTICAST ) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
112 |
diff -urN snort-2.9.9.0.orig/src/decode.h snort-2.9.9.0/src/decode.h |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
113 |
--- snort-2.9.9.0.orig/src/decode.h 2016-06-07 00:47:47.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
114 |
+++ snort-2.9.9.0/src/decode.h 2017-01-25 07:29:41.049530830 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
115 |
@@ -1135,7 +1135,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
116 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
117 |
/* IPv6 address */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
118 |
#ifndef s6_addr |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
119 |
-struct in6_addr |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
120 |
+struct snort_in6_addr |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
121 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
122 |
union |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
123 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
124 |
@@ -1157,8 +1157,8 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
125 |
uint8_t ip6_next; /* next header */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
126 |
uint8_t ip6_hoplim; /* hop limit */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
127 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
128 |
- struct in6_addr ip6_src; /* source address */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
129 |
- struct in6_addr ip6_dst; /* destination address */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
130 |
+ struct snort_in6_addr ip6_src; /* source address */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
131 |
+ struct snort_in6_addr ip6_dst; /* destination address */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
132 |
} IP6RawHdr; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
133 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
134 |
#define ip6flow ip6_vtf |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
135 |
@@ -1241,7 +1241,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
136 |
uint8_t ip6rte0_seg_left; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
137 |
uint8_t ip6rte0_reserved; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
138 |
uint8_t ip6rte0_bitmap[3]; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
139 |
- struct in6_addr ip6rte0_addr[1]; /* Up to 23 IP6 addresses */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
140 |
+ struct snort_in6_addr ip6rte0_addr[1]; /* Up to 23 IP6 addresses */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
141 |
} IP6Route0; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
142 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
143 |
/* Fragment header */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
144 |
diff -urN snort-2.9.9.0.orig/src/dynamic-preprocessors/appid/fw_appid.c snort-2.9.9.0/src/dynamic-preprocessors/appid/fw_appid.c |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
145 |
--- snort-2.9.9.0.orig/src/dynamic-preprocessors/appid/fw_appid.c 2016-11-14 03:48:57.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
146 |
+++ snort-2.9.9.0/src/dynamic-preprocessors/appid/fw_appid.c 2017-01-25 07:40:47.816227342 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
147 |
@@ -569,8 +569,8 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
148 |
(!info->dip_flag || memcmp(&info->dip, key->ip_l, sizeof(info->dip)) == 0)))) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
149 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
150 |
int af; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
151 |
- const struct in6_addr* sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
152 |
- const struct in6_addr* dip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
153 |
+ const struct snort_in6_addr* sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
154 |
+ const struct snort_in6_addr* dip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
155 |
unsigned offset; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
156 |
uint16_t sport; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
157 |
uint16_t dport; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
158 |
@@ -582,38 +582,38 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
159 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
160 |
if (session->common.initiator_port == key->port_l) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
161 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
162 |
- sip = (const struct in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
163 |
- dip = (const struct in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
164 |
+ sip = (const struct snort_in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
165 |
+ dip = (const struct snort_in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
166 |
sport = key->port_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
167 |
dport = key->port_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
168 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
169 |
else |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
170 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
171 |
- sip = (const struct in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
172 |
- dip = (const struct in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
173 |
+ sip = (const struct snort_in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
174 |
+ dip = (const struct snort_in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
175 |
sport = key->port_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
176 |
dport = key->port_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
177 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
178 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
179 |
else if (memcmp(&session->common.initiator_ip, key->ip_l, sizeof(session->common.initiator_ip))==0) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
180 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
181 |
- sip = (const struct in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
182 |
- dip = (const struct in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
183 |
+ sip = (const struct snort_in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
184 |
+ dip = (const struct snort_in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
185 |
sport = key->port_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
186 |
dport = key->port_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
187 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
188 |
else |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
189 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
190 |
- sip = (const struct in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
191 |
- dip = (const struct in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
192 |
+ sip = (const struct snort_in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
193 |
+ dip = (const struct snort_in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
194 |
sport = key->port_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
195 |
dport = key->port_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
196 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
197 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
198 |
else |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
199 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
200 |
- sip = (const struct in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
201 |
- dip = (const struct in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
202 |
+ sip = (const struct snort_in6_addr*)key->ip_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
203 |
+ dip = (const struct snort_in6_addr*)key->ip_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
204 |
sport = key->port_l; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
205 |
dport = key->port_h; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
206 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
207 |
diff -urN snort-2.9.9.0.orig/src/dynamic-preprocessors/appid/util/ip_funcs.h snort-2.9.9.0/src/dynamic-preprocessors/appid/util/ip_funcs.h |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
208 |
--- snort-2.9.9.0.orig/src/dynamic-preprocessors/appid/util/ip_funcs.h 2016-06-07 00:47:48.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
209 |
+++ snort-2.9.9.0/src/dynamic-preprocessors/appid/util/ip_funcs.h 2017-01-25 07:44:56.916628622 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
210 |
@@ -55,7 +55,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
211 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
212 |
RNAIpv6AddrSet *ParseIpv6Cidr(char *); |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
213 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
214 |
-static inline void copyIpv4ToIpv6Network(struct in6_addr *keyIp, const uint32_t ip) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
215 |
+static inline void copyIpv4ToIpv6Network(struct snort_in6_addr *keyIp, const uint32_t ip) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
216 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
217 |
keyIp->s6_addr32[0] = keyIp->s6_addr32[1] = 0; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
218 |
keyIp->s6_addr16[4] = 0; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
219 |
diff -urN snort-2.9.9.0.orig/src/file-process/file_resume_block.c snort-2.9.9.0/src/file-process/file_resume_block.c |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
220 |
--- snort-2.9.9.0.orig/src/file-process/file_resume_block.c 2016-06-07 00:47:49.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
221 |
+++ snort-2.9.9.0/src/file-process/file_resume_block.c 2017-01-25 07:35:43.838234514 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
222 |
@@ -48,8 +48,8 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
223 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
224 |
typedef struct _FileHashKey |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
225 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
226 |
- struct in6_addr sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
227 |
- struct in6_addr dip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
228 |
+ struct snort_in6_addr sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
229 |
+ struct snort_in6_addr dip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
230 |
uint32_t file_sig; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
231 |
} FileHashKey; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
232 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
233 |
diff -urN snort-2.9.9.0.orig/src/file-process/file_segment_process.h snort-2.9.9.0/src/file-process/file_segment_process.h |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
234 |
--- snort-2.9.9.0.orig/src/file-process/file_segment_process.h 2016-06-07 00:47:49.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
235 |
+++ snort-2.9.9.0/src/file-process/file_segment_process.h 2017-01-25 07:35:48.265314566 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
236 |
@@ -61,8 +61,8 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
237 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
238 |
typedef struct _FileKey |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
239 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
240 |
- struct in6_addr sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
241 |
- struct in6_addr dip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
242 |
+ struct snort_in6_addr sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
243 |
+ struct snort_in6_addr dip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
244 |
uint64_t file_id; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
245 |
} FileKey; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
246 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
247 |
diff -urN snort-2.9.9.0.orig/src/preprocessors/portscan.c snort-2.9.9.0/src/preprocessors/portscan.c |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
248 |
--- snort-2.9.9.0.orig/src/preprocessors/portscan.c 2016-06-07 00:47:49.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
249 |
+++ snort-2.9.9.0/src/preprocessors/portscan.c 2017-01-25 07:36:50.781966468 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
250 |
@@ -129,8 +129,8 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
251 |
typedef struct s_PS_HASH_KEY |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
252 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
253 |
int protocol; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
254 |
- struct in6_addr scanner; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
255 |
- struct in6_addr scanned; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
256 |
+ struct snort_in6_addr scanner; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
257 |
+ struct snort_in6_addr scanned; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
258 |
tSfPolicyId policyId; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
259 |
} PS_HASH_KEY; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
260 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
261 |
diff -urN snort-2.9.9.0.orig/src/preprocessors/Session/session_expect.c snort-2.9.9.0/src/preprocessors/Session/session_expect.c |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
262 |
--- snort-2.9.9.0.orig/src/preprocessors/Session/session_expect.c 2016-08-16 01:55:56.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
263 |
+++ snort-2.9.9.0/src/preprocessors/Session/session_expect.c 2017-01-25 07:42:04.457716140 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
264 |
@@ -94,8 +94,8 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
265 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
266 |
typedef struct _ExpectHashKey |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
267 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
268 |
- struct in6_addr ip1; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
269 |
- struct in6_addr ip2; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
270 |
+ struct snort_in6_addr ip1; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
271 |
+ struct snort_in6_addr ip2; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
272 |
uint16_t port1; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
273 |
uint16_t port2; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
274 |
uint32_t protocol; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
275 |
diff -urN snort-2.9.9.0.orig/src/preprocessors/Session/stream5_ha.c snort-2.9.9.0/src/preprocessors/Session/stream5_ha.c |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
276 |
--- snort-2.9.9.0.orig/src/preprocessors/Session/stream5_ha.c 2016-06-07 00:47:49.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
277 |
+++ snort-2.9.9.0/src/preprocessors/Session/stream5_ha.c 2017-01-25 07:42:14.881222982 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
278 |
@@ -128,9 +128,9 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
279 |
typedef struct _HADebugSessionConstraints |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
280 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
281 |
int sip_flag; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
282 |
- struct in6_addr sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
283 |
+ struct snort_in6_addr sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
284 |
int dip_flag; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
285 |
- struct in6_addr dip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
286 |
+ struct snort_in6_addr dip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
287 |
uint16_t sport; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
288 |
uint16_t dport; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
289 |
uint8_t protocol; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
290 |
diff -urN snort-2.9.9.0.orig/src/sfutil/sf_ip.h snort-2.9.9.0/src/sfutil/sf_ip.h |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
291 |
--- snort-2.9.9.0.orig/src/sfutil/sf_ip.h 2016-11-14 03:48:57.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
292 |
+++ snort-2.9.9.0/src/sfutil/sf_ip.h 2017-01-25 09:41:42.567822087 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
293 |
@@ -43,6 +43,7 @@ |
1345
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
294 |
#endif |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
295 |
|
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
296 |
#include "snort_debug.h" /* for inline definition */ |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
297 |
+#include "sf_types.h" |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
298 |
|
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
299 |
/* define SFIP_ROBUST to check pointers passed into the sfip libs. |
ee87318d9935
PSARC 2013/113 snort 2.9.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
300 |
* Robustification should not be enabled if the client code is trustworthy. |
7650
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
301 |
@@ -87,9 +88,28 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
302 |
#pragma pack(push,1) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
303 |
#endif |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
304 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
305 |
+/* Workaround the struct in6_addr definition in /usr/include/netinet/in.h |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
306 |
+ * on Solaris not having a s6_addr16 definition. |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
307 |
+ */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
308 |
+ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
309 |
+#undef s6_addr |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
310 |
+#undef s6_addr16 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
311 |
+#undef s6_addr32 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
312 |
+ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
313 |
+struct snort_in6_addr { |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
314 |
+ union { |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
315 |
+ uint8_t _S6_u8[16]; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
316 |
+ uint16_t _S6_u16[8]; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
317 |
+ uint32_t _S6_u32[4]; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
318 |
+ } in6_u; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
319 |
+#define s6_addr in6_u._S6_u8 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
320 |
+#define s6_addr16 in6_u._S6_u16 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
321 |
+#define s6_addr32 in6_u._S6_u32 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
322 |
+}; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
323 |
+ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
324 |
struct _sfaddr |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
325 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
326 |
- struct in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
327 |
+ struct snort_in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
328 |
uint16_t family; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
329 |
# define ia8 ip.s6_addr |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
330 |
# define ia16 ip.s6_addr16 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
331 |
@@ -143,7 +163,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
332 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
333 |
#pragma pack(push,1) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
334 |
struct _sfaddr { |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
335 |
- struct in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
336 |
+ struct snort_in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
337 |
uint16_t family; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
338 |
# define ia8 ip.s6_addr |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
339 |
# define ia16 ip.s6_addr16 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
340 |
@@ -269,7 +289,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
341 |
/* Returns 1 if the IP is non-zero. 0 otherwise */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
342 |
/* XXX This is a performance critical function, \ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
343 |
* need to determine if it's safe to not check these pointers */\ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
344 |
-static inline int sfraw_is_set(const struct in6_addr *addr) { |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
345 |
+static inline int sfraw_is_set(const struct snort_in6_addr *addr) { |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
346 |
/* ARG_CHECK1(ip, -1); */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
347 |
return (addr->s6_addr32[3] || addr->s6_addr32[0] || addr->s6_addr32[1] || addr->s6_addr16[4] || |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
348 |
(addr->s6_addr16[5] && addr->s6_addr16[5] != 0xFFFF)) ? 1 : 0; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
349 |
@@ -558,7 +578,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
350 |
return 0; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
351 |
} |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
352 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
353 |
-static inline void sfaddr_copy_to_raw(struct in6_addr *dst, const sfaddr_t *src) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
354 |
+static inline void sfaddr_copy_to_raw(struct snort_in6_addr *dst, const sfaddr_t *src) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
355 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
356 |
dst->s6_addr32[0] = src->ia32[0]; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
357 |
dst->s6_addr32[1] = src->ia32[1]; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
358 |
diff -urN snort-2.9.9.0.orig/src/sfutil/sfrf.c snort-2.9.9.0/src/sfutil/sfrf.c |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
359 |
--- snort-2.9.9.0.orig/src/sfutil/sfrf.c 2016-06-07 00:47:49.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
360 |
+++ snort-2.9.9.0/src/sfutil/sfrf.c 2017-01-25 07:26:36.583837363 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
361 |
@@ -77,7 +77,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
362 |
* whether dos threshold is tracking by source or destination IP address. For tracking |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
363 |
* by rule, it is cleared out (all 0s). |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
364 |
*/ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
365 |
- struct in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
366 |
+ struct snort_in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
367 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
368 |
} tSFRFTrackingNodeKey ; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
369 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
370 |
diff -urN snort-2.9.9.0.orig/src/sfutil/sfthd.h snort-2.9.9.0/src/sfutil/sfthd.h |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
371 |
--- snort-2.9.9.0.orig/src/sfutil/sfthd.h 2016-11-14 03:48:57.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
372 |
+++ snort-2.9.9.0/src/sfutil/sfthd.h 2017-01-25 07:26:13.854480513 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
373 |
@@ -104,7 +104,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
374 |
typedef struct{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
375 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
376 |
int thd_id; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
377 |
- struct in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
378 |
+ struct snort_in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
379 |
tSfPolicyId policyId; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
380 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
381 |
} THD_IP_NODE_KEY ; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
382 |
@@ -113,7 +113,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
383 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
384 |
unsigned gen_id; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
385 |
unsigned sig_id; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
386 |
- struct in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
387 |
+ struct snort_in6_addr ip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
388 |
tSfPolicyId policyId; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
389 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
390 |
} THD_IP_GNODE_KEY ; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
391 |
diff -urN snort-2.9.9.0.orig/src/tag.c snort-2.9.9.0/src/tag.c |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
392 |
--- snort-2.9.9.0.orig/src/tag.c 2016-06-07 00:47:48.000000000 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
393 |
+++ snort-2.9.9.0/src/tag.c 2017-01-25 07:30:03.102551584 +0000 |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
394 |
@@ -63,8 +63,8 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
395 |
*/ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
396 |
typedef struct _tagSessionKey |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
397 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
398 |
- struct in6_addr sip; ///source IP address |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
399 |
- struct in6_addr dip; ///destination IP address |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
400 |
+ struct snort_in6_addr sip; ///source IP address |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
401 |
+ struct snort_in6_addr dip; ///destination IP address |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
402 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
403 |
/* ports */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
404 |
uint16_t sp; ///source port |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
405 |
@@ -317,7 +317,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
406 |
*/ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
407 |
static inline void SwapTag(TagNode *np) |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
408 |
{ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
409 |
- struct in6_addr tip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
410 |
+ struct snort_in6_addr tip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
411 |
uint16_t tport; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
412 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
413 |
tip = np->key.sip; |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
414 |
@@ -345,7 +345,7 @@ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
415 |
|
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
416 |
host_tag_cache_ptr = sfxhash_new( |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
417 |
hashTableSize, /* number of hash buckets */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
418 |
- sizeof(struct in6_addr), /* size of the key we're going to use */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
419 |
+ sizeof(struct snort_in6_addr), /* size of the key we're going to use */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
420 |
0, /* size of the storage node */ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
421 |
0, /* disable memcap*/ |
2e39c59b83f8
23210063 Upgrade Snort to 2.9.9.0
Rich Burridge <rich.burridge@oracle.com>
parents:
2198
diff
changeset
|
422 |
0, /* use auto node recovery */ |