Fixed PunchFWHole():

- ipfw always rejected rule with `neither in nor out' diagnostics.
- number of src/dst ports was not set properly.
This commit is contained in:
Ruslan Ermilov 2000-06-27 14:56:07 +00:00
parent 136a5ce64d
commit 36e6576b44
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62159
2 changed files with 6 additions and 4 deletions

View File

@ -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;

View File

@ -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;