summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>1998-01-10 16:14:18 +0000
committeralex <alex@FreeBSD.org>1998-01-10 16:14:18 +0000
commitf4a6b5e087515428f5425970c88ac748698cc728 (patch)
treeb1874da348e069e06918fd0e213515ba3e20e593
parente8a5cb36a51baf2dfc84cd936b43b3ece46f47c5 (diff)
downloadFreeBSD-src-f4a6b5e087515428f5425970c88ac748698cc728.zip
FreeBSD-src-f4a6b5e087515428f5425970c88ac748698cc728.tar.gz
Sync with ipfw interface change: fw_pts is now part of a union (a
necessary evil due to the 108 byte setsockopt() limit).
-rw-r--r--lib/libalias/alias_db.c10
-rw-r--r--sys/netinet/libalias/alias_db.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/libalias/alias_db.c b/lib/libalias/alias_db.c
index ebcc3d9..b07688f 100644
--- a/lib/libalias/alias_db.c
+++ b/lib/libalias/alias_db.c
@@ -2169,21 +2169,21 @@ PunchFWHole(struct alias_link *link) {
/* Build and apply specific part of the rules */
rule.fw_src = GetOriginalAddress(link);
rule.fw_dst = GetDestAddress(link);
- rule.fw_pts[0] = ntohs(GetOriginalPort(link));
- rule.fw_pts[1] = ntohs(GetDestPort(link));
+ rule.fw_uar.fw_pts[0] = ntohs(GetOriginalPort(link));
+ rule.fw_uar.fw_pts[1] = ntohs(GetDestPort(link));
/* Skip non-bound links - XXX should not be strictly necessary,
but seems to leave hole if not done. Leak of non-bound links?
(Code should be left even if the problem is fixed - it is a
clear optimization) */
- if (rule.fw_pts[0] != 0 && rule.fw_pts[1] != 0) {
+ if (rule.fw_uar.fw_pts[0] != 0 && rule.fw_uar.fw_pts[1] != 0) {
r = setsockopt(fireWallFD, IPPROTO_IP, IP_FW_ADD, &rule, sizeof rule);
if (r)
err(1, "alias punch inbound(1) setsockopt(IP_FW_ADD)");
rule.fw_src = GetDestAddress(link);
rule.fw_dst = GetOriginalAddress(link);
- rule.fw_pts[0] = ntohs(GetDestPort(link));
- rule.fw_pts[1] = ntohs(GetOriginalPort(link));
+ rule.fw_uar.fw_pts[0] = ntohs(GetDestPort(link));
+ rule.fw_uar.fw_pts[1] = ntohs(GetOriginalPort(link));
r = setsockopt(fireWallFD, IPPROTO_IP, IP_FW_ADD, &rule, sizeof rule);
if (r)
err(1, "alias punch inbound(2) setsockopt(IP_FW_ADD)");
diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c
index ebcc3d9..b07688f 100644
--- a/sys/netinet/libalias/alias_db.c
+++ b/sys/netinet/libalias/alias_db.c
@@ -2169,21 +2169,21 @@ PunchFWHole(struct alias_link *link) {
/* Build and apply specific part of the rules */
rule.fw_src = GetOriginalAddress(link);
rule.fw_dst = GetDestAddress(link);
- rule.fw_pts[0] = ntohs(GetOriginalPort(link));
- rule.fw_pts[1] = ntohs(GetDestPort(link));
+ rule.fw_uar.fw_pts[0] = ntohs(GetOriginalPort(link));
+ rule.fw_uar.fw_pts[1] = ntohs(GetDestPort(link));
/* Skip non-bound links - XXX should not be strictly necessary,
but seems to leave hole if not done. Leak of non-bound links?
(Code should be left even if the problem is fixed - it is a
clear optimization) */
- if (rule.fw_pts[0] != 0 && rule.fw_pts[1] != 0) {
+ if (rule.fw_uar.fw_pts[0] != 0 && rule.fw_uar.fw_pts[1] != 0) {
r = setsockopt(fireWallFD, IPPROTO_IP, IP_FW_ADD, &rule, sizeof rule);
if (r)
err(1, "alias punch inbound(1) setsockopt(IP_FW_ADD)");
rule.fw_src = GetDestAddress(link);
rule.fw_dst = GetOriginalAddress(link);
- rule.fw_pts[0] = ntohs(GetDestPort(link));
- rule.fw_pts[1] = ntohs(GetOriginalPort(link));
+ rule.fw_uar.fw_pts[0] = ntohs(GetDestPort(link));
+ rule.fw_uar.fw_pts[1] = ntohs(GetOriginalPort(link));
r = setsockopt(fireWallFD, IPPROTO_IP, IP_FW_ADD, &rule, sizeof rule);
if (r)
err(1, "alias punch inbound(2) setsockopt(IP_FW_ADD)");
OpenPOWER on IntegriCloud