diff options
author | Patrick McHardy <kaber@trash.net> | 2006-07-25 01:53:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-25 01:53:35 -0400 |
commit | 8cf8fb5687bb37737ea419a0b2143aab49295779 (patch) | |
tree | c53fa2cc488f1924cfebe86589ccf8a46227181d /net | |
parent | 72b558235950538da8bf5a8de746a194831c6fe6 (diff) |
[NETFILTER]: SNMP NAT: fix byteorder confusion
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ip_nat_snmp_basic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_nat_snmp_basic.c b/net/ipv4/netfilter/ip_nat_snmp_basic.c index 0b1b416759cc..18b7fbdccb61 100644 --- a/net/ipv4/netfilter/ip_nat_snmp_basic.c +++ b/net/ipv4/netfilter/ip_nat_snmp_basic.c | |||
@@ -1255,9 +1255,9 @@ static int help(struct sk_buff **pskb, | |||
1255 | struct udphdr *udph = (struct udphdr *)((u_int32_t *)iph + iph->ihl); | 1255 | struct udphdr *udph = (struct udphdr *)((u_int32_t *)iph + iph->ihl); |
1256 | 1256 | ||
1257 | /* SNMP replies and originating SNMP traps get mangled */ | 1257 | /* SNMP replies and originating SNMP traps get mangled */ |
1258 | if (udph->source == ntohs(SNMP_PORT) && dir != IP_CT_DIR_REPLY) | 1258 | if (udph->source == htons(SNMP_PORT) && dir != IP_CT_DIR_REPLY) |
1259 | return NF_ACCEPT; | 1259 | return NF_ACCEPT; |
1260 | if (udph->dest == ntohs(SNMP_TRAP_PORT) && dir != IP_CT_DIR_ORIGINAL) | 1260 | if (udph->dest == htons(SNMP_TRAP_PORT) && dir != IP_CT_DIR_ORIGINAL) |
1261 | return NF_ACCEPT; | 1261 | return NF_ACCEPT; |
1262 | 1262 | ||
1263 | /* No NAT? */ | 1263 | /* No NAT? */ |