diff --git a/networking/ftpd.c b/networking/ftpd.c index 3b98bacf4..9a1ea65cc 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); }