diff options
author | deniel <deniel@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-07-31 11:21:06 +0000 |
---|---|---|
committer | deniel <deniel@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-07-31 11:21:06 +0000 |
commit | a8b7141e845243c535cbc4f667074624ca4c7334 (patch) | |
tree | 4e472236f8ec61437722e46ff6a8f84c69cdc499 /follow.c | |
parent | 7a41b0b52afedb6f45c11e0ada1fc53dc19f5cf7 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@408 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'follow.c')
-rw-r--r-- | follow.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 ); |