All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netfilter-devel@lists.netfilter.org, Patrick McHardy <kaber@trash.net>
Subject: [NETFILTER 03/06]: SNMP NAT: fix byteorder confusion
Date: Tue, 25 Jul 2006 05:26:57 +0200 (MEST)	[thread overview]
Message-ID: <20060725032657.25063.16874.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20060725032653.25063.8139.sendpatchset@localhost.localdomain>

[NETFILTER]: SNMP NAT: fix byteorder confusion

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 91ce3a69f0154c527da6e4a47c8784383981a222
tree c72655288441f9148a03ed2a3a42ed0c6706fa51
parent 4aed24265c0b6270d328362ff66b51fed56a9d1a
author Patrick McHardy <kaber@trash.net> Tue, 25 Jul 2006 00:05:13 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 25 Jul 2006 00:05:13 +0200

 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 0b1b416..18b7fbd 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,
 	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? */

  parent reply	other threads:[~2006-07-25  3:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-25  3:26 [NETFILTER 00/06]: Netfilter fixes Patrick McHardy
2006-07-25  3:26 ` [NETFILTER 01/06]: nf_queue: handle NF_STOP and unknown verdicts in nf_reinject Patrick McHardy
2006-07-25  3:26 ` [NETFILTER 02/06]: conntrack: fix SYSCTL=n compile Patrick McHardy
2006-07-25  3:26 ` Patrick McHardy [this message]
2006-07-25  3:26 ` [NETFILTER 04/06]: xt_pkttype: fix mismatches on locally generated packets Patrick McHardy
2006-07-25  3:27 ` [NETFILTER 05/06]: bridge netfilter: add deferred output hooks to feature-removal-schedule Patrick McHardy
2006-07-25  3:27 ` [NETFILTER 06/06]: Demote xt_sctp to EXPERIMENTAL Patrick McHardy
2006-07-25  5:55 ` [NETFILTER 00/06]: Netfilter fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060725032657.25063.16874.sendpatchset@localhost.localdomain \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.