Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cf8fb56 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETFILTER]: SNMP NAT: fix byteorder confusion

parent 72b55823
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1255,9 +1255,9 @@ static int help(struct sk_buff **pskb,
	struct udphdr *udph = (struct udphdr *)((u_int32_t *)iph + iph->ihl);

	/* SNMP replies and originating SNMP traps get mangled */
	if (udph->source == ntohs(SNMP_PORT) && dir != IP_CT_DIR_REPLY)
	if (udph->source == htons(SNMP_PORT) && dir != IP_CT_DIR_REPLY)
		return NF_ACCEPT;
	if (udph->dest == ntohs(SNMP_TRAP_PORT) && dir != IP_CT_DIR_ORIGINAL)
	if (udph->dest == htons(SNMP_TRAP_PORT) && dir != IP_CT_DIR_ORIGINAL)
		return NF_ACCEPT;

	/* No NAT? */