Date: Fri, 09 Jan 1998 22:22:00 -0800 (PST) From: Simon Shapiro <shimon@simon-shapiro.org> To: "Jordan K. Hubbard" <jkh@time.cdrom.com> Cc: current@FreeBSD.ORG Subject: RE: Last night's tree breakage.. Message-ID: <XFMail.980109222200.shimon@simon-shapiro.org> In-Reply-To: <12437.884399561@time.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10-Jan-98 Jordan K. Hubbard wrote:
> ===> libexec/bootpd
> ...
> /src/tmp/usr/include -c /usr/src/libexec/bootpd/hwaddr.c
> In file included from /usr/src/libexec/bootpd/hwaddr.c:27:
> /usr/obj/usr/src/tmp/usr/include/net/if_arp.h:100: field `ac_if' has
> incomplete
> type
> /usr/obj/usr/src/tmp/usr/include/net/if_arp.h:101: `ETHER_ADDR_LEN'
> undeclared here (not in a function)
> *** Error code 1
Add to that also:
cc -O -pipe -Wall -I/usr/src/3.0/src/lib/libalias
-I/usr/obj/usr/src/3.0/src/tmp/usr/include -c
/usr/src/3.0/src/lib/libalias/alias_db.c -o alias_db.o
/usr/src/3.0/src/lib/libalias/alias_db.c: In function `PunchFWHole':
/usr/src/3.0/src/lib/libalias/alias_db.c:2172: structure has no member
named `fw_pts'
/usr/src/3.0/src/lib/libalias/alias_db.c:2173: structure has no member
named `fw_pts'
/usr/src/3.0/src/lib/libalias/alias_db.c:2179: structure has no member
named `fw_pts'
/usr/src/3.0/src/lib/libalias/alias_db.c:2179: structure has no member
named `fw_pts'
/usr/src/3.0/src/lib/libalias/alias_db.c:2185: structure has no member
named `fw_pts'
/usr/src/3.0/src/lib/libalias/alias_db.c:2186: structure has no member
named `fw_pts'
*** Error code 1
Which is solved by this patch:
Index: alias_db.c
===================================================================
RCS file: /Archives/FreeBSD/FreeBSD-CVS/src/lib/libalias/alias_db.c,v
retrieving revision 1.4
diff -c -r1.4 alias_db.c
*** alias_db.c 1998/01/09 21:13:34 1.4
--- alias_db.c 1998/01/10 06:19:17
***************
*** 2059,2064 ****
--- 2059,2065 ----
/* Firewall include files */
#include <sys/queue.h>
+ #include <net/if.h>
#include <netinet/ip_fw.h>
#include <string.h>
#include <err.h>
***************
*** 2168,2188 ****
/* 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));
/* 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) {
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));
r = setsockopt(fireWallFD, IPPROTO_IP, IP_FW_ADD, &rule, sizeof
rule);
if (r)
err(1, "alias punch inbound(2) setsockopt(IP_FW_ADD)");
--- 2169,2189 ----
/* Build and apply specific part of the rules */
rule.fw_src = GetOriginalAddress(link);
rule.fw_dst = GetDestAddress(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_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_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)");
The original but, I think I indicated a solution is a previous mailing.
----------
Sincerely Yours,
Simon Shapiro
Shimon@Simon-Shapiro.ORG Voice: 503.799.2313
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.980109222200.shimon>
