[prev in list] [next in list] [prev in thread] [next in thread]
List: snort-users
Subject: [snort] a snortdb patch
From: Jed Pickel <jed () pickel ! net>
Date: 2000-04-25 22:07:57
[Download RAW message or body]
I noticed today that I missed a couple ntohs calls in
spo_log_database.c. The patch is appended.
* Jed
Index: spo_log_database.c
===================================================================
RCS file: /home/cvs/snort/spo_log_database.c,v
retrieving revision 1.2
diff -r1.2 spo_log_database.c
391c391
< p->tcph->th_flags, p->tcph->th_win, p->tcph->th_urp);
---
> p->tcph->th_flags, ntohs(p->tcph->th_win), p->tcph->th_urp);
398c398
< p->udph->uh_len);
---
> ntohs(p->udph->uh_len));
407c407
< snprintf(i1, MAX_QUERY_LENGTH, "INSERT INTO iphdr \
(sid,cid,ip_proto,ip_src0,ip_src1,ip_src2,ip_src3,ip_dst0,ip_dst1,ip_dst2,ip_dst3,ip_tos,ip_ttl,ip_id,ip_off,ip_len) \
VALUES ('%i','%i','%i','%s','%s','%s','%s','%s','%s','%s','%s','%i','%i','%i','%i','%i \
');",sid,cid,p->iph->ip_proto,s0,s1,s2,s3,d0,d1,d2,d3,p->iph->ip_tos,p->iph->ip_ttl,p->iph->ip_id,p->frag_offset,p->iph->ip_len);
---
> snprintf(i1, MAX_QUERY_LENGTH, "INSERT INTO iphdr \
> (sid,cid,ip_proto,ip_src0,ip_src1,ip_src2,ip_src3,ip_dst0,ip_dst1,ip_dst2,ip_dst3,ip_tos,ip_ttl,ip_id,ip_off,ip_len) \
> VALUES ('%i','%i','%i','%s','%s','%s','%s','%s','%s','%s','%s','%i','%i','%i','%i',' \
> %i');",sid,cid,p->iph->ip_proto,s0,s1,s2,s3,d0,d1,d2,d3,p->iph->ip_tos,p->iph->ip_ttl,ntohs(p->iph->ip_id),ntohs(p->frag_offset),ntohs(p->iph->ip_len)); \
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic