diff options
author | Brian Somers <brian@FreeBSD.org> | 2000-03-21 01:18:06 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2000-03-21 01:18:06 +0000 |
commit | 71ab0b0f58ecae26f7e013bea35692ebfdcaa852 (patch) | |
tree | b52235910cb54d7c08fef1e8ec01071f9061e80c /www/httptunnel/files/patch-aa | |
parent | Fix text in port's Makefile (diff) |
An implementation of TCP/IP over HTTP with local modifications to allow
binding the server to a single IP number.
Diffstat (limited to 'www/httptunnel/files/patch-aa')
-rw-r--r-- | www/httptunnel/files/patch-aa | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/www/httptunnel/files/patch-aa b/www/httptunnel/files/patch-aa new file mode 100644 index 000000000000..43c47a9a45b6 --- /dev/null +++ b/www/httptunnel/files/patch-aa @@ -0,0 +1,48 @@ +--- common.c.orig Wed Dec 15 06:39:03 1999 ++++ common.c Thu Mar 16 02:48:06 2000 +@@ -115,7 +115,7 @@ + #endif + + int +-server_socket (int port, int backlog) ++server_socket (struct in_addr addr, int port, int backlog) + { + struct sockaddr_in address; + int i, s; +@@ -131,10 +131,12 @@ + strerror (errno)); + } + ++ memset(&address, '\0', sizeof address); ++ address.sin_len = sizeof address; + address.sin_family = PF_INET; + address.sin_port = htons ((short)port); +- address.sin_addr.s_addr = INADDR_ANY; +- ++ address.sin_addr = addr; ++ + if (bind (s, (struct sockaddr *)&address, sizeof (address)) == -1) + { + close (s); +@@ -153,8 +155,10 @@ + int + set_address (struct sockaddr_in *address, const char *host, int port) + { +- address->sin_family = PF_INET; +- address->sin_port = htons ((short)port); ++ memset(address, '\0', sizeof *address); ++ address->sin_len = sizeof *address; ++ address->sin_family = AF_INET; ++ address->sin_port = htons((u_short)port); + address->sin_addr.s_addr = inet_addr (host); + + if (address->sin_addr.s_addr == INADDR_NONE) +@@ -334,7 +338,7 @@ + p = strchr (*name, ':'); + if (p != NULL) + { +- *port = atoi (p + 1); ++ *port = atoi(p + 1); + *p = '\0'; + } + } |