fix upstream port, introduced in r2513
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c
index 7ccf664..497d84a 100644
--- a/src/core/ngx_inet.c
+++ b/src/core/ngx_inet.c
@@ -704,8 +704,7 @@
 
     /* AF_INET only */
 
-    sin = (struct sockaddr_in *) &u->sockaddr;
-    port = sin->sin_port;
+    port = htons(u->port);
 
     in_addr = inet_addr((char *) host);