Wireshark-dev: Re: [Wireshark-dev] Short ipv4 addresses in filter
From: Jakub Zawadzki <[email protected]>
Date: Fri, 3 Jun 2011 22:52:54 +0200
On Fri, Jun 03, 2011 at 01:15:06PM -0700, Guy Harris wrote:
> To quote his ethereal-dev message:
> 
> > Here is a fix to catch incomplete dotted-quad IP addresses that
> > may lead into more surprises than necessary.
> > 
> > In run into a problem when trying to use CIDR notation with shorthand
> > 130.230/16. Ethereal did not complain, but did not show any matches
> > either. After some debugging I found out that since inet_aton() was
> > involved, the address became 0x820000e6. This behavior seems to be a
> > leftover from the classful days when using an address like "18.5" was
> > treated as net.host and turned automagically into 18.0.0.5.
> > 
> > Here is a patch for epan/resolv.c:get_host_ipaddr() which catches
> > incomplete dotted IP addresses.

Thanks,

Rule of least surprise is good. It's better to use longer notation than to be surprised.

Regards.