summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2009-03-16 21:01:41 +0000
committerDenis Vlasenko2009-03-16 21:01:41 +0000
commit074c9036b2e656eda086e71800552e1054a4d648 (patch)
treeb3a341655c94045bbea230c1ef8da180fc6a0192
parentfbf5846ce1e6c34caa1853d9c1fa9ccac16a52c9 (diff)
downloadbusybox-074c9036b2e656eda086e71800552e1054a4d648.zip
busybox-074c9036b2e656eda086e71800552e1054a4d648.tar.gz
ftpd: fix thinko: set_nport takes port in network order
-rw-r--r--networking/ftpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c
index 3b98bac..9a1ea65 100644
--- a/networking/ftpd.c
+++ b/networking/ftpd.c
@@ -522,7 +522,7 @@ handle_port(void)
G.port_addr = xdotted2sockaddr(raw, port);
#else
G.port_addr = get_peer_lsa(STDIN_FILENO);
- set_nport(G.port_addr, port);
+ set_nport(G.port_addr, htons(port));
#endif
WRITE_OK(FTP_PORTOK);
}