-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargus.patch
More file actions
92 lines (81 loc) · 2.92 KB
/
Copy pathargus.patch
File metadata and controls
92 lines (81 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
diff --git argus/ArgusModeler.c argus/ArgusModeler.c
index 73c03f3..1b9bd6d 100644
--- argus/ArgusModeler.c
+++ argus/ArgusModeler.c
@@ -3996,9 +3996,12 @@ ArgusCreateIPv6Flow (struct ArgusModelerStruct *model, struct ip6_hdr *ip)
unsigned int *dp = (unsigned int*) &ip->ip6_dst;
unsigned short alen, sport = 0, dport = 0;
unsigned int *rsp, *rdp;
+
+ unsigned plen;
#ifdef _LITTLE_ENDIAN
-// unsigned plen;
-// plen = ntohs(ip->ip6_plen);
+ plen = ntohs(ip->ip6_plen);
+#else
+ plen = ip->ip6_plen
#endif
tflow = model->ArgusThisFlow;
@@ -4039,6 +4042,11 @@ ArgusCreateIPv6Flow (struct ArgusModelerStruct *model, struct ip6_hdr *ip)
model->ArgusThisIpv6Frag = NULL;
model->ArgusThisLength -= sizeof(*ip);
+
+ // JWR: BEGIN: Use IP header length for bytes
+ model->ArgusThisBytes = plen + /* Ethernet Frame Octets */ 18;
+ // JWR: END: Use IP header length for bytes
+
model->ArgusSnapLength -= sizeof(*ip);
model->ArgusThisUpHdr = (unsigned char *)(ip + 1);
@@ -4211,6 +4219,11 @@ ArgusCreateIPv4Flow (struct ArgusModelerStruct *model, struct ip *ip)
model->ArgusOptionIndicator = 0;
model->ArgusThisLength = len;
+
+ // JWR: BEGIN: Use IP header length for bytes
+ model->ArgusThisBytes = tip->ip_len + /* Ethernet Frame Octets */ 18;
+ // JWR: END: Use IP header length for bytes
+
model->ArgusSnapLength -= hlen;
if (model->ArgusFlowKey & ARGUS_FLOW_KEY_CLASSIC5TUPLE) {
diff --git argus/ArgusOutput.c argus/ArgusOutput.c
index f7b0743..4fa4b83 100644
--- argus/ArgusOutput.c
+++ argus/ArgusOutput.c
@@ -1779,7 +1779,7 @@ setArgusMarReportInterval(struct ArgusOutputStruct *output, char *value)
#define MAXPATHNAMELEN BUFSIZ
#endif
-#define PARANOID 1
+// #define PARANOID 1
#define KILL_IP_OPTIONS 1
#define HOSTS_ACCESS 1
@@ -1812,14 +1812,14 @@ ArgusTcpWrapper (int fd, struct sockaddr *from)
* that pretend to have someone elses host name.
*/
-#ifdef PARANOID
- if (STR_EQ(eval_hostname(request.client), paranoid)) {
- ArgusLog (deny_severity, "refused connect from %s", eval_client(&request));
- if (request.sink)
- request.sink(request.fd);
- return -1;
- }
-#endif
+// #ifdef PARANOID
+// if (STR_EQ(eval_hostname(request.client), paranoid)) {
+// ArgusLog (deny_severity, "refused connect from %s", eval_client(&request));
+// if (request.sink)
+// request.sink(request.fd);
+// return -1;
+// }
+// #endif
/*
* The BSD rlogin and rsh daemons that came out after 4.3 BSD disallow
diff --git argus/ArgusUdt.c argus/ArgusUdt.c
index efb933b..4c966af 100644
--- argus/ArgusUdt.c
+++ argus/ArgusUdt.c
@@ -41,7 +41,7 @@
#include <ArgusModeler.h>
#include <argus/bootp.h>
-struct bootp *bp;
+// struct bootp *bp;
struct ArgusSystemFlow *
ArgusCreateUDTFlow (struct ArgusModelerStruct *model, struct udt_header *udt)