From 21a1cf9c807aa000ca86f454630e4d714f8b75bc Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 12 Mar 2012 16:37:44 +0100 Subject: [PATCH] patch by Bostjan Meglic: fixed bug #35809: PPP GetMask(): Compiler warning on big endian, possible bug on little endian system --- CHANGELOG | 4 ++++ src/netif/ppp/ppp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 824ce8c3..933c2c8d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 06d9699f..8e8fae9f 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -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)) {