Typo's in ip_conntrack_rpc_tcp.c ....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----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@xxxxxxx / mark@xxxxxxxxxx
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-----




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux