patch by Bostjan Meglic: fixed bug #35809: PPP GetMask(): Compiler warning on big endian, possible bug on little endian system

This commit is contained in:
goldsimon 2012-03-12 16:37:44 +01:00
parent 6486c4b1d7
commit 21a1cf9c80
2 changed files with 5 additions and 1 deletions

View File

@ -62,6 +62,10 @@ HISTORY
++ Bugfixes:
2012-03-12: Simon Goldschmidt (patch by Bostjan Meglic)
* ppp.c: fixed bug #35809: PPP GetMask(): Compiler warning on big endian,
possible bug on little endian system
2012-02-23: Simon Goldschmidt
* etharp.c: fixed bug #35595: Impossible to send broadcast without a gateway
(introduced when fixing bug# 33551)

View File

@ -1272,7 +1272,7 @@ GetMask(u32_t addr)
{
u32_t mask, nmask;
htonl(addr);
addr = htonl(addr);
if (IP_CLASSA(addr)) { /* determine network mask for address class */
nmask = IP_CLASSA_NET;
} else if (IP_CLASSB(addr)) {