[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#295482: netcfg broadcast address crashes LAN



the owner <editor@postscript.port5.com> writes:
>
> I found this code in the netcfg/static.c file. The fprintf must be good. 
> I think the broadcast.s_addr is wrong when initializing interface:
>
> static.c:   struct in_addr broadcast = { 0 };
> static.c:      broadcast.s_addr = (network.s_addr | ~netmask.s_addr);
> static.c:      fprintf(fp, "\tbroadcast %s\n", inet_ntop (AF_INET, &broadcast, ptr1, sizeof (ptr1)));
>

Since the fprintf outputs the right string into
/etc/network/interfaces the broadcast variable must be correct. The
error is more likely where the broadcast address gets set for the
interface.

MfG
        Goswin



Reply to: