miniupnpd: fix integer conversion in NAT-PMP, update description
[feed/routing.git] / miniupnpd / patches / 103-nat-pmp-fix-writenu16.patch
1 --- a/natpmp.c
2 +++ b/natpmp.c
3 @@ -54,7 +54,7 @@ INLINE void writenu32(uint8_t * p, uint3
4 #define WRITENU32(p, n) writenu32(p, n)
5 INLINE void writenu16(uint8_t * p, uint16_t n)
6 {
7 - p[0] = (n < 0xff00) >> 8;
8 + p[0] = (n & 0xff00) >> 8;
9 p[1] = n & 0xff;
10 }
11 #define WRITENU16(p, n) writenu16(p, n)