From: Mark Vevers <mark@vevers.net>
To: netfilter@lists.netfilter.org
Subject: Typo's in ip_conntrack_rpc_tcp.c ....
Date: Fri, 18 Jun 2004 15:49:14 +0100 [thread overview]
Message-ID: <200406181549.19157.mark@vevers.net> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The following 'bug' is currently only a textual typo due to the structures
actually used - if the structures change it could cause a real bug ....
In the init for ip_conntrack_rpc_tcp the code sets the ports for
rpc_helpers[port].mask.dst.u.udp.port = htons(0x0);
with
rpc_helpers[port].tuple.dst.protonum = IPPROTO_TCP;
i.e. it's setting the udp port for a TCP packet. In this instance it doesn't
matter becase the tuple structure is a union and uses the same type -
from ip_conntrack_tuple.h:
struct {
u_int16_t port;
} tcp;
struct {
u_int16_t port;
} udp;
Here's the diff:
Index: ip_conntrack_rpc_tcp.c
===================================================================
RCS file:
/cvspublic/patch-o-matic-ng/rpc/linux/net/ipv4/netfilter/ip_conntrack_rpc_tcp.c,v
retrieving revision 1.2
diff -U2 -r1.2 ip_conntrack_rpc_tcp.c
- --- ip_conntrack_rpc_tcp.c 5 May 2004 16:39:37 -0000 1.2
+++ ip_conntrack_rpc_tcp.c 18 Jun 2004 14:34:18 -0000
@@ -451,7 +451,7 @@
/* RPC can come from ports 0:65535 to ports[port] (111) */
- - rpc_helpers[port].tuple.src.u.udp.port = htons(ports[port]);
- - rpc_helpers[port].mask.src.u.udp.port = htons(0xffff);
- - rpc_helpers[port].mask.dst.u.udp.port = htons(0x0);
+ rpc_helpers[port].tuple.src.u.tcp.port = htons(ports[port]);
+ rpc_helpers[port].mask.src.u.tcp.port = htons(0xffff);
+ rpc_helpers[port].mask.dst.u.tcp.port = htons(0x0);
rpc_helpers[port].help = help;
- --
Mark Vevers. mark@ifl.net / mark@vevers.net
Principal Internet Engineer, Internet for Learning,
Research Machines Plc. (AS5503)
- --
GPG Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xB08F3CA3
Fingerprint: 85BA 30C4 9EC8 1792 4C8C C31E 58B5 3D1C B08F 3CA3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFA0wDuWLU9HLCPPKMRAmxlAJ9qrku1Ykvjmv0QeUeyVoM8UFri8QCfXV8S
3whpD5fwsG/PpTWJHGVMqXg=
=sCOn
-----END PGP SIGNATURE-----
next reply other threads:[~2004-06-18 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-18 14:49 Mark Vevers [this message]
2004-06-18 15:13 ` Typo's in ip_conntrack_rpc_tcp.c Antony Stone
-- strict thread matches above, loose matches on Subject: below --
2004-06-18 15:06 Mark Vevers
2004-06-19 20:33 ` Patrick McHardy
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=200406181549.19157.mark@vevers.net \
--to=mark@vevers.net \
--cc=netfilter@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.