summaryrefslogtreecommitdiffstats
path: root/lib/libalias/alias_ftp.c
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1998-01-09 21:13:35 +0000
committereivind <eivind@FreeBSD.org>1998-01-09 21:13:35 +0000
commit781f5bff105e2b341e76efe04ea322b2c9497ca8 (patch)
tree8444286dbbb89a371acf65fe1468b1a998a99e8c /lib/libalias/alias_ftp.c
parent97367c5e32c06125a0fe56b5f85facbb1dd625ab (diff)
downloadFreeBSD-src-781f5bff105e2b341e76efe04ea322b2c9497ca8.zip
FreeBSD-src-781f5bff105e2b341e76efe04ea322b2c9497ca8.tar.gz
Teach libalias to work with IPFW firewalls (controlled by a flag).
Obtained from: Yes development tree (+ 10 lines of patches from Charles Mott, original libalias author)
Diffstat (limited to 'lib/libalias/alias_ftp.c')
-rw-r--r--lib/libalias/alias_ftp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libalias/alias_ftp.c b/lib/libalias/alias_ftp.c
index e03c04b..df6d02c 100644
--- a/lib/libalias/alias_ftp.c
+++ b/lib/libalias/alias_ftp.c
@@ -32,6 +32,8 @@
Very minor changes to conform with
local/global/function naming conventions
withing the packet alising module.
+
+ See HISTORY file for record of revisions.
*/
/* Includes */
@@ -150,6 +152,9 @@ NewFtpPortCommand(struct ip *pip,
int slen, hlen, tlen, dlen;
struct tcphdr *tc;
+/* Punch hole in firewall */
+ PunchFWHole(ftp_link);
+
/* Calculate data length of TCP packet */
tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
hlen = (pip->ip_hl + tc->th_off) << 2;
@@ -167,7 +172,7 @@ NewFtpPortCommand(struct ip *pip,
/* Decompose alias address into quad format */
alias_address = GetAliasAddress(link);
- ptr = (char *) &alias_address;
+ ptr = (u_char *) &alias_address.s_addr;
a1 = *ptr++; a2=*ptr++; a3=*ptr++; a4=*ptr;
/* Decompose alias port into pair format */
OpenPOWER on IntegriCloud