diff options
author | ru <ru@FreeBSD.org> | 2000-06-27 14:56:07 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-06-27 14:56:07 +0000 |
commit | 268f00dee922fa5e6dbb3902bc1d4722d43c6a9d (patch) | |
tree | 370d83df883e12fa6b38c5195195a6ff1e6b0d9c /lib/libalias/alias_db.c | |
parent | 1a9ea82414ca7062e2e6d53d41a3b7e8dfac3185 (diff) | |
download | FreeBSD-src-268f00dee922fa5e6dbb3902bc1d4722d43c6a9d.zip FreeBSD-src-268f00dee922fa5e6dbb3902bc1d4722d43c6a9d.tar.gz |
Fixed PunchFWHole():
- ipfw always rejected rule with `neither in nor out' diagnostics.
- number of src/dst ports was not set properly.
Diffstat (limited to 'lib/libalias/alias_db.c')
-rw-r--r-- | lib/libalias/alias_db.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalias/alias_db.c b/lib/libalias/alias_db.c index 7fb3b28..f8baa71 100644 --- a/lib/libalias/alias_db.c +++ b/lib/libalias/alias_db.c @@ -2535,8 +2535,9 @@ PunchFWHole(struct alias_link *link) { /* Build generic part of the two rules */ rule.fw_number = fwhole; - rule.fw_nports = 1; /* Number of source ports; dest ports follow */ - rule.fw_flg = IP_FW_F_ACCEPT; + IP_FW_SETNSRCP(&rule, 1); /* Number of source ports. */ + IP_FW_SETNDSTP(&rule, 1); /* Number of destination ports. */ + rule.fw_flg = IP_FW_F_ACCEPT | IP_FW_F_IN | IP_FW_F_OUT; rule.fw_prot = IPPROTO_TCP; rule.fw_smsk.s_addr = INADDR_BROADCAST; rule.fw_dmsk.s_addr = INADDR_BROADCAST; |