aboutsummaryrefslogtreecommitdiffstats
path: root/follow.c
diff options
context:
space:
mode:
authorLaurent Deniel <laurent.deniel@free.fr>1999-07-31 11:21:06 +0000
committerLaurent Deniel <laurent.deniel@free.fr>1999-07-31 11:21:06 +0000
commit98ebf4ee0af188f97a8f1e612df8f0eac8e17b91 (patch)
tree4e472236f8ec61437722e46ff6a8f84c69cdc499 /follow.c
parent60d150011afefaa5f7dcae85b3620a914de5b3d6 (diff)
Remove srcip and destip from packet_info since it is not safe to affect
string pointer from the result of ip_to_str (statically allocated string). Use the ip_src and the new field ip_dst in follow.c to build a correct string display filter. svn path=/trunk/; revision=408
Diffstat (limited to 'follow.c')
-rw-r--r--follow.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/follow.c b/follow.c
index 8cb7f5b05b..fd48457db3 100644
--- a/follow.c
+++ b/follow.c
@@ -1,6 +1,6 @@
/* follow.c
*
- * $Id: follow.c,v 1.12 1999/07/17 04:19:02 gram Exp $
+ * $Id: follow.c,v 1.13 1999/07/31 11:21:05 deniel Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
@@ -62,8 +62,11 @@ build_follow_filter( packet_info *pi ) {
char* buf = malloc(1024);
if( pi->ipproto == 6 ) {
/* TCP */
- sprintf( buf, "(ip.addr eq %s and ip.addr eq %s) and (tcp.port eq %d and tcp.port eq %d)",
- pi->srcip, pi->destip, pi->srcport, pi->destport );
+ sprintf( buf,
+ "(ip.addr eq %s and ip.addr eq %s) and (tcp.port eq %d and tcp.port eq %d)",
+ ip_to_str( (guint8 *) &pi->ip_src),
+ ip_to_str( (guint8 *) &pi->ip_dst),
+ pi->srcport, pi->destport );
}
else {
free( buf );