summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/ipmon.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ipfilter/ipmon.c')
-rw-r--r--contrib/ipfilter/ipmon.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/ipfilter/ipmon.c b/contrib/ipfilter/ipmon.c
index ebc67a3..57edc7f 100644
--- a/contrib/ipfilter/ipmon.c
+++ b/contrib/ipfilter/ipmon.c
@@ -91,6 +91,8 @@ struct flags tcpfl[] = {
{ TH_FIN, 'F' },
{ TH_URG, 'U' },
{ TH_PUSH,'P' },
+ { TH_ECN, 'E' },
+ { TH_CWR, 'C' },
{ 0, '\0' }
};
@@ -144,6 +146,7 @@ static char **tcp_ports = NULL;
#define OPT_FILTER 0x200
#define OPT_PORTNUM 0x400
#define OPT_LOGALL (OPT_NAT|OPT_STATE|OPT_FILTER)
+#define OPT_LOGBODY 0x800
#define HOSTNAME_V4(a,b) hostname((a), 4, (u_32_t *)&(b))
@@ -401,6 +404,8 @@ int blen;
strcpy(t, "NAT:RDR ");
else if (nl->nl_type == NL_EXPIRE)
strcpy(t, "NAT:EXPIRE ");
+ else if (nl->nl_type == NL_FLUSH)
+ strcpy(t, "NAT:FLUSH ");
else if (nl->nl_type == NL_NEWBIMAP)
strcpy(t, "NAT:BIMAP ");
else if (nl->nl_type == NL_NEWBLOCK)
@@ -834,6 +839,8 @@ printipflog:
dumphex(log, (u_char *)buf, sizeof(iplog_t) + sizeof(*ipf));
if (opts & OPT_HEXBODY)
dumphex(log, (u_char *)ip, ipf->fl_plen + ipf->fl_hlen);
+ else if ((opts & OPT_LOGBODY) && (ipf->fl_flags & FR_LOGBODY))
+ dumphex(log, (u_char *)ip + ipf->fl_hlen, ipf->fl_plen);
}
@@ -945,7 +952,7 @@ char *argv[];
iplfile[1] = IPNAT_NAME;
iplfile[2] = IPSTATE_NAME;
- while ((c = getopt(argc, argv, "?aDf:FhnN:o:O:pP:sS:tvxX")) != -1)
+ while ((c = getopt(argc, argv, "?abDf:FhnN:o:O:pP:sS:tvxX")) != -1)
switch (c)
{
case 'a' :
@@ -954,6 +961,9 @@ char *argv[];
fdt[1] = IPL_LOGNAT;
fdt[2] = IPL_LOGSTATE;
break;
+ case 'b' :
+ opts |= OPT_LOGBODY;
+ break;
case 'D' :
make_daemon = 1;
break;
OpenPOWER on IntegriCloud