[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: netkit-ftp-0.17
- To: ariel(at-nospam)fireball.tau.ac.il (Ariel Biener)
- Subject: Re: netkit-ftp-0.17
- From: Dan Kenigsberg <danken(at-nospam)cs.Technion.AC.IL>
- Date: Tue, 24 Jul 2001 17:46:44 +0300 (IDT)
- Cc: netbug(at-nospam)ftp.uk.linux.org, alan(at-nospam)redhat.com (Alan Cox), linux-il(at-nospam)linux.org.il (Israeli Linux Mailing List)
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <Pine.LNX.4.21_heb2.09.0107241713460.1379-100000@fireball.tau.ac.il> from "Ariel Biener" at Jul 24, 2001 05:19:05 PM
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
Odd. I'm pretty sure unsigned int goes up to 65535 (16bit).
This is the correct span of port numbers. The question whether it
was smart to allocate so few is left open.
test this:
#include <stdio.h>
int main(void)
{
unsigned short i;
i = -1;
printf("%d\n", i);
}
> Hi guys,
>
> Someone decided to use "unsigned short" for the ftp peer port number,
> so you cannot ftp hosts with port larger than 32767. I don't know who
> deals with it among you guys, but I am sure you can bounce it to the right
> person:
>
> [root@fireball netkit-ftp-0.17]# diff -u ftp/cmds.c.orig ftp/cmds.c
> --- ftp/cmds.c.orig Tue Jul 24 17:15:13 2001
> +++ ftp/cmds.c Tue Jul 24 17:12:28 2001
> @@ -190,7 +190,7 @@
> setpeer(int argc, char *argv[])
> {
> char *host;
> - unsigned short port;
> + unsigned int port;
>
> if (connected) {
> printf("Already connected to %s, use close first.\n",
>
>
> thanks,
>
> --Ariel
>
> --
> Ariel Biener
> e-mail: ariel@post.tau.ac.il
> PGP(6.5.8) public key http://www.tau.ac.il/~ariel/pgp.html
>
>
> =================================================================
> To unsubscribe, send mail to linux-il-request@linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request@linux.org.il
>
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il