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:39:52 +01:00
parent 4fca628d36
commit 2c9b3b35d1
2 changed files with 5 additions and 1 deletions

View File

@ -76,6 +76,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)) {