Message ID | 20230605221044.140855-3-jeremy@azazel.net |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | xt_ipp2p: support for non-linear packets | expand |
diff --git a/extensions/xt_ipp2p.c b/extensions/xt_ipp2p.c index 5bdb7eec40d2..d2e29706998a 100644 --- a/extensions/xt_ipp2p.c +++ b/extensions/xt_ipp2p.c @@ -210,8 +210,8 @@ udp_search_bit(const unsigned char *haystack, const unsigned int packet_len) switch (packet_len) { case 16: /* ^ 00 00 04 17 27 10 19 80 */ - if (ntohl(get_u32(haystack, 0)) == 0x00000417 && - ntohl(get_u32(haystack, 4)) == 0x27101980) + if (get_u32(haystack, 0) == __constant_htonl(0x00000417) && + get_u32(haystack, 4) == __constant_htonl(0x27101980)) return IPP2P_BIT * 100 + 50; break; case 36:
Instead of converting the packet bytes before comparing it to a constant, convert the constant. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> --- extensions/xt_ipp2p.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)