mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-30 12:32:37 +00:00
fix compilation of ip_canforward on 8-/16-bit platforms (where constants are 16-bit and thus cannot be left-shifted by 24)
This commit is contained in:
parent
08b497faea
commit
d1fa13ed52
@ -169,7 +169,7 @@ ip_canforward(struct pbuf *p)
|
|||||||
}
|
}
|
||||||
if (IP_CLASSA(addr)) {
|
if (IP_CLASSA(addr)) {
|
||||||
u32_t net = addr & IP_CLASSA_NET;
|
u32_t net = addr & IP_CLASSA_NET;
|
||||||
if ((net == 0) || (net == (IP_LOOPBACKNET << IP_CLASSA_NSHIFT))) {
|
if ((net == 0) || (net == ((u32_t)IP_LOOPBACKNET << IP_CLASSA_NSHIFT))) {
|
||||||
/* don't route loopback packets */
|
/* don't route loopback packets */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user