On Thu, 2008-08-28 at 23:01 -0400, Sebastien.Roy at Sun.COM wrote:
> Author: Sebastien Roy <Sebastien.Roy at Sun.COM>
> Changeset: 7428:404bf7c519c7
> Comments:
> fix snoop warnings due to max_sdu wraparound
This putback fixes the snoop spewage seen for every packet when snooping
a /dev/ipnet device. For example, one would see:
(warning) packet length greater than MTU in buffer offset 132: length=132 -1
The issue was that even though the ipnet device was passing up a max_sdu
of INT_MAX, snoop was doing the following in check_device():
/* for backward compatibility, allow known interface mtu_sizes */
if (interface->mtu_size > dlinfo.di_max_sdu)
dlinfo.di_max_sdu = interface->mtu_size;
The interface->mtu_size for DL_IPNET was accidentally still UINT_MAX in
snoop_ether.c, so it was taking precedence over the smaller INT_MAX.
I've fixed the interface table for DL_IPNET to have a mtu_size of
INT_MAX, and that fixes the problem. I've also removed Phil's debug
output.
-Seb