[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] Bug in ip_addr.c concerning Broadcast.
From: |
Rodney Brown |
Subject: |
RE: [lwip-users] Bug in ip_addr.c concerning Broadcast. |
Date: |
Mon, 22 Nov 2004 08:18:09 -0600 |
Sorry - I wasn't clear. The 123.123.123.63 address is not on the subnet and
must be handled by a router. The device address is something like
111.111.111.27 or whatever. The first 3 bytes don't match.
Help from anyone else?
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of jack W
Sent: Friday, November 19, 2004 7:04 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Bug in ip_addr.c concerning Broadcast.
hi Rodney Brown
i think that the ip addr 123.123.123.63 is not invalid ip addr to the
netmask 255.255.255.192.
>I believe I've found a bug in ipp_addr.c and wanted some confirmation
before
>fixing it.
>
>Snippet from ip_addr_isbroadcast(struct ip_addr *addr, struct netif *netif)
>.
>.
> /* host identifier bits are all ones? => network broadcast address */
> else if ((addr->addr & ~netif->netmask.addr) ==
> (ip_addr_broadcast.addr & ~netif->netmask.addr))
> return 1;
>
>
>addr is the destination. netif is the device's information. If the
>destination IP is 123.123.123.63, and the local subnet is 255.255.255.192,
>the routine will return true, no matter what subnet the address is on.
>
>Should the code read: ??
>
> else if (((addr->addr & ~netif->netmask.addr) ==
> (ip_addr_broadcast.addr & ~netif->netmask.addr)) &&
> ((addr->addr & netif->netmask.addr) ==
> (netif->ip_addr.addr & netif->netmask.addr)))
>
> return 1;
>
>This checks to be sure the device and destination are on the same subnet,
>and that the last address on that subnet is the destination.
>
>Thanks,
>Rodney
>
>
>
>_______________________________________________
>lwip-users mailing list
>address@hidden
>http://lists.nongnu.org/mailman/listinfo/lwip-users
= = = = = = = = = = = = = = = = = = = =
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users