summaryrefslogtreecommitdiff
path: root/package/snort/patches/patch-src_log_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/snort/patches/patch-src_log_c')
-rw-r--r--package/snort/patches/patch-src_log_c128
1 files changed, 2 insertions, 126 deletions
diff --git a/package/snort/patches/patch-src_log_c b/package/snort/patches/patch-src_log_c
index 456b6a033..5f59a4ed0 100644
--- a/package/snort/patches/patch-src_log_c
+++ b/package/snort/patches/patch-src_log_c
@@ -1,25 +1,5 @@
---- snort-2.8.5.1.orig/src/log.c 2009-10-19 17:48:42.000000000 +0200
-+++ snort-2.8.5.1/src/log.c 2009-12-27 17:19:26.000000000 +0100
-@@ -362,7 +362,7 @@ void PrintIPPkt(FILE * fp, int type, Pac
-
- DEBUG_WRAP(DebugMessage(DEBUG_LOG, "PrintIPPkt type = %d\n", type););
-
-- bzero((char *) timestamp, TIMEBUF_SIZE);
-+ memset((char *) timestamp, 0, TIMEBUF_SIZE);
- ts_print((struct timeval *) & p->pkth->ts, timestamp);
-
- /* dump the timestamp */
-@@ -863,8 +863,8 @@ void PrintArpHeader(FILE * fp, Packet *
- const uint8_t *mac_src = NULL;
- const uint8_t *mac_dst = NULL;
-
-- bzero((struct in_addr *) &ip_addr, sizeof(struct in_addr));
-- bzero((char *) timestamp, TIMEBUF_SIZE);
-+ memset((struct in_addr *) &ip_addr, 0, sizeof(struct in_addr));
-+ memset((char *) timestamp, 0, TIMEBUF_SIZE);
- ts_print((struct timeval *) & p->pkth->ts, timestamp);
-
- /* determine what to use as MAC src and dst */
+--- snort-2.8.5.2.orig/src/log.c 2009-10-19 17:48:42.000000000 +0200
++++ snort-2.8.5.2/src/log.c 2010-01-19 20:01:42.000000000 +0100
@@ -916,7 +916,7 @@ void PrintArpHeader(FILE * fp, Packet *
switch(ntohs(p->ah->ea_hdr.ar_op))
{
@@ -56,107 +36,3 @@
fprintf(fp, "RARP reply %X:%X:%X:%X:%X:%X at %s",
p->ah->arp_tha[0], p->ah->arp_tha[1], p->ah->arp_tha[2],
p->ah->arp_tha[3], p->ah->arp_tha[4], p->ah->arp_tha[5],
-@@ -1467,7 +1467,7 @@ void PrintICMPEmbeddedIP(FILE *fp, Packe
- if (fp == NULL || p == NULL)
- return;
-
-- bzero((char *) &op, sizeof(Packet));
-+ memset((char *) &op, 0, sizeof(Packet));
- orig_p = &op;
-
- orig_p->iph = p->orig_iph;
-@@ -1717,7 +1717,7 @@ void PrintTcpOptions(FILE * fp, Packet *
- switch(p->tcp_options[i].code)
- {
- case TCPOPT_MAXSEG:
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- fwrite("MSS: ", 5, 1, fp);
- if (p->tcp_options[i].data)
- memcpy(tmp, p->tcp_options[i].data, 2);
-@@ -1740,11 +1740,11 @@ void PrintTcpOptions(FILE * fp, Packet *
- break;
-
- case TCPOPT_SACK:
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data && (p->tcp_options[i].len >= 2))
- memcpy(tmp, p->tcp_options[i].data, 2);
- fprintf(fp, "Sack: %u@", EXTRACT_16BITS(tmp));
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data && (p->tcp_options[i].len >= 4))
- memcpy(tmp, (p->tcp_options[i].data) + 2, 2);
- fprintf(fp, "%u ", EXTRACT_16BITS(tmp));
-@@ -1755,46 +1755,46 @@ void PrintTcpOptions(FILE * fp, Packet *
- break;
-
- case TCPOPT_ECHO:
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data)
- memcpy(tmp, p->tcp_options[i].data, 4);
- fprintf(fp, "Echo: %u ", EXTRACT_32BITS(tmp));
- break;
-
- case TCPOPT_ECHOREPLY:
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data)
- memcpy(tmp, p->tcp_options[i].data, 4);
- fprintf(fp, "Echo Rep: %u ", EXTRACT_32BITS(tmp));
- break;
-
- case TCPOPT_TIMESTAMP:
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data)
- memcpy(tmp, p->tcp_options[i].data, 4);
- fprintf(fp, "TS: %u ", EXTRACT_32BITS(tmp));
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data)
- memcpy(tmp, (p->tcp_options[i].data) + 4, 4);
- fprintf(fp, "%u ", EXTRACT_32BITS(tmp));
- break;
-
- case TCPOPT_CC:
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data)
- memcpy(tmp, p->tcp_options[i].data, 4);
- fprintf(fp, "CC %u ", EXTRACT_32BITS(tmp));
- break;
-
- case TCPOPT_CCNEW:
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data)
- memcpy(tmp, p->tcp_options[i].data, 4);
- fprintf(fp, "CCNEW: %u ", EXTRACT_32BITS(tmp));
- break;
-
- case TCPOPT_CCECHO:
-- bzero((char *) tmp, 5);
-+ memset((char *) tmp, 0, 5);
- if (p->tcp_options[i].data)
- memcpy(tmp, p->tcp_options[i].data, 4);
- fprintf(fp, "CCECHO: %u ", EXTRACT_32BITS(tmp));
-@@ -1944,7 +1944,7 @@ void PrintEapolPkt(FILE * fp, Packet * p
- char timestamp[TIMEBUF_SIZE];
-
-
-- bzero((char *) timestamp, TIMEBUF_SIZE);
-+ memset((char *) timestamp, 0, TIMEBUF_SIZE);
- ts_print((struct timeval *) & p->pkth->ts, timestamp);
-
- /* dump the timestamp */
-@@ -2118,7 +2118,7 @@ void PrintWifiPkt(FILE * fp, Packet * p)
- char timestamp[TIMEBUF_SIZE];
-
-
-- bzero((char *) timestamp, TIMEBUF_SIZE);
-+ memset((char *) timestamp, 0, TIMEBUF_SIZE);
- ts_print((struct timeval *) & p->pkth->ts, timestamp);
-
- /* dump the timestamp */