Wireshark-dev: Re: [Wireshark-dev] [Patch] bug fix in follow_dlg.c
From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Tue, 17 Oct 2006 22:54:18 +0200 (CEST)
Hi,

Checked in.

Thanx,
Jaap

On Tue, 17 Oct 2006, Stephen Fisher wrote:

> While researching another bug in follow_dlg.c, I spotted a different one
> that causes the from and to hostnames/ip addresses to be the same in the
> follow tcp stream dialog only with IPv6.  Please apply attached patch
> that corrects the code as shown below:
>
> 	if (stats.is_ipv6) {
> 	  struct e_in6_addr ipaddr;
> 	  memcpy(&ipaddr, stats.ip_address[0], 16);
> 	  hostname0 = get_hostname6(&ipaddr);
> 	  memcpy(&ipaddr, stats.ip_address[0], 16); <- should should be [1]
> 	  hostname1 = get_hostname6(&ipaddr);
> 	} else {
> 	  guint32 ipaddr;
> 	  memcpy(&ipaddr, stats.ip_address[0], 4);
> 	  hostname0 = get_hostname(ipaddr);
> 	  memcpy(&ipaddr, stats.ip_address[1], 4);
> 	  hostname1 = get_hostname(ipaddr);
>
> Thanks,
>   Steve
>
>