Subject: Re: 070812 -current routed broken ?
To: David Young <dyoung@pobox.com>
From: Frank Kardel <kardel@netbsd.org>
List: current-users
Date: 08/13/2007 10:09:06
David Young wrote:

>On Mon, Aug 13, 2007 at 02:11:20AM +0200, Frank Kardel wrote:
>  
>
>>Hi !
>>
>>I found the the current state of kernel<->routed is in bad shape.
>>A routed on 070812 -current will enter an endless loop because a msglen
>>parameter from sysctl data is 0. Something seems to have changed there 
>>where routed
>>wasn't expecting it. Anyone seeing the same thing ?
>>    
>>
>
>It looks to me like sbin/routed/if.c:ifinit() will sometimes overwrite
>the ifam_len member of the next message while it processes the first:
>
>                        sdl = (struct sockaddr_dl *)(ifm + 1);
>                        sdl->sdl_data[sdl->sdl_nlen] = 0;
>                        strncpy(ifs0.int_name, sdl->sdl_data,
>                                MIN(sizeof(ifs0.int_name), sdl->sdl_nlen));
>                        continue;
>
>I have attached a patch for you to try.
>
>I don't know why you did not see this before.  Perhaps a sockaddr_dl
>copied from the kernel fits its contents tighter than before?  There could
>be a new bug in the kernel, of course.
>
>Dave
>  
>
This patch makes routed work again.
Up to the update two weeks ago my setup worked fine - with yesterdays update
things broke.

Thanks for the quick patch.

Frank