From owner-p4-projects Fri Jun 7 7:42:12 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B7F637B403; Fri, 7 Jun 2002 07:39:56 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EE99E37B413 for ; Fri, 7 Jun 2002 07:38:49 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g57EcnZ17666 for perforce@freebsd.org; Fri, 7 Jun 2002 07:38:49 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Fri, 7 Jun 2002 07:38:49 -0700 (PDT) Message-Id: <200206071438.g57EcnZ17666@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 12495 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12495 Change 12495 by jhb@jhb_laptop on 2002/06/07 07:38:02 IFC ktrace breakage. Affected files ... ... //depot/projects/smpng/sys/alpha/alpha/trap.c#33 integrate ... //depot/projects/smpng/sys/boot/ofw/libofw/ofw_net.c#5 integrate ... //depot/projects/smpng/sys/boot/powerpc/loader/Makefile#5 integrate ... //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#7 integrate ... //depot/projects/smpng/sys/conf/NOTES#16 integrate ... //depot/projects/smpng/sys/conf/files#43 integrate ... //depot/projects/smpng/sys/conf/options#29 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/fil.c#7 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_auth.c#7 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_compat.h#5 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.c#8 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.h#6 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c#5 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_nat.c#8 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_proxy.c#7 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_state.c#6 integrate ... //depot/projects/smpng/sys/contrib/ipfilter/netinet/ipl.h#5 integrate ... //depot/projects/smpng/sys/dev/hea/eni.h#3 integrate ... //depot/projects/smpng/sys/dev/hea/hea_freebsd.c#2 integrate ... //depot/projects/smpng/sys/dev/hea/hea_pci.c#2 integrate ... //depot/projects/smpng/sys/dev/hfa/hfa_freebsd.c#2 integrate ... //depot/projects/smpng/sys/dev/hfa/hfa_pci.c#2 integrate ... //depot/projects/smpng/sys/i386/i386/trap.c#38 integrate ... //depot/projects/smpng/sys/ia64/ia64/ski.c#3 integrate ... //depot/projects/smpng/sys/ia64/ia64/trap.c#33 integrate ... //depot/projects/smpng/sys/kern/kern_condvar.c#14 integrate ... //depot/projects/smpng/sys/kern/kern_exec.c#37 integrate ... //depot/projects/smpng/sys/kern/kern_exit.c#42 integrate ... //depot/projects/smpng/sys/kern/kern_fork.c#40 integrate ... //depot/projects/smpng/sys/kern/kern_ktrace.c#24 integrate ... //depot/projects/smpng/sys/kern/kern_proc.c#31 integrate ... //depot/projects/smpng/sys/kern/kern_sig.c#40 integrate ... //depot/projects/smpng/sys/kern/kern_synch.c#25 integrate ... //depot/projects/smpng/sys/kern/subr_trap.c#34 integrate ... //depot/projects/smpng/sys/kern/subr_witness.c#55 integrate ... //depot/projects/smpng/sys/kern/sys_generic.c#14 integrate ... //depot/projects/smpng/sys/kern/uipc_syscalls.c#20 integrate ... //depot/projects/smpng/sys/kern/vfs_lookup.c#11 integrate ... //depot/projects/smpng/sys/netatm/atm_if.h#4 integrate ... //depot/projects/smpng/sys/netatm/atm_ioctl.h#3 integrate ... //depot/projects/smpng/sys/powerpc/powerpc/trap.c#22 integrate ... //depot/projects/smpng/sys/sparc64/sparc64/trap.c#35 integrate ... //depot/projects/smpng/sys/sys/_lock.h#9 integrate ... //depot/projects/smpng/sys/sys/kernel.h#16 integrate ... //depot/projects/smpng/sys/sys/ktrace.h#6 integrate ... //depot/projects/smpng/sys/sys/proc.h#51 integrate ... //depot/projects/smpng/sys/ufs/ffs/ffs_vfsops.c#26 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/trap.c#33 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.93 2002/05/16 00:03:32 gallatin Exp $ */ +/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.94 2002/06/07 05:47:34 jhb Exp $ */ /* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */ /* @@ -715,18 +715,17 @@ break; } +#ifdef KTRACE + if (KTRPOINT(td, KTR_SYSCALL)) + ktrsyscall(code, (callp->sy_narg & SYF_ARGMASK), args + hidden); +#endif /* * Try to run the syscall without the MP lock if the syscall * is MP safe */ - if ((callp->sy_narg & SYF_MPSAFE) == 0) { + if ((callp->sy_narg & SYF_MPSAFE) == 0) mtx_lock(&Giant); - } -#ifdef KTRACE - if (KTRPOINT(p, KTR_SYSCALL)) { - ktrsyscall(p->p_tracep, code, (callp->sy_narg & SYF_ARGMASK), args + hidden); - } -#endif + if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = 0; @@ -761,20 +760,17 @@ } userret(td, framep, sticks); -#ifdef KTRACE - if (KTRPOINT(p, KTR_SYSRET)) { - ktrsysret(p->p_tracep, code, error, td->td_retval[0]); - } -#endif /* - * Release Giant if we had to get it. Don't use mtx_owned(), - * we want to catch broken syscalls. + * Release Giant if we had to get it. */ - if ((callp->sy_narg & SYF_MPSAFE) == 0) { + if ((callp->sy_narg & SYF_MPSAFE) == 0) mtx_unlock(&Giant); - } +#ifdef KTRACE + if (KTRPOINT(td, KTR_SYSRET)) + ktrsysret(code, error, td->td_retval[0]); +#endif /* * This works because errno is findable through the * register set. If we ever support an emulation where this ==== //depot/projects/smpng/sys/boot/ofw/libofw/ofw_net.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/ofw/libofw/ofw_net.c,v 1.5 2002/02/23 04:31:30 jake Exp $ + * $FreeBSD: src/sys/boot/ofw/libofw/ofw_net.c,v 1.6 2002/06/07 11:49:33 benno Exp $ */ #include @@ -210,7 +210,8 @@ #endif #ifndef __sparc64__ - if (OF_call_method("dma-alloc", netinstance, 1, 1, NULL, &dmabuf) + dmabuf = NULL; + if (OF_call_method("dma-alloc", netinstance, 1, 1, (64 * 1024), &dmabuf) < 0) { printf("Failed to allocate DMA buffer (got %08x).\n", dmabuf); goto punt; ==== //depot/projects/smpng/sys/boot/powerpc/loader/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/powerpc/loader/Makefile,v 1.8 2002/05/10 09:26:34 obrien Exp $ +# $FreeBSD: src/sys/boot/powerpc/loader/Makefile,v 1.9 2002/06/07 11:49:56 benno Exp $ BASE= loader PROG= ${BASE} @@ -58,12 +58,12 @@ # where to get libstand from #XXX need a better way to do this LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a -#.if !exists(${LIBSTAND}) -#LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a -#.if !exists(${LIBSTAND}) -#LIBSTAND= -lstand -#.endif -#.endif +.if !exists(${LIBSTAND}) +LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a +.if !exists(${LIBSTAND}) +LIBSTAND= -lstand +.endif +.endif CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ # OpenFirmware is expecting ELF components ==== //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.28 2002/03/20 05:41:38 alfred Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.29 2002/06/07 05:36:16 jhb Exp $ */ /* @@ -227,7 +227,7 @@ if (error == 0) { ktruio.uio_iov = ktriov; ktruio.uio_resid = td->td_retval[0]; - ktrgenio(td->td_proc->p_tracep, s, UIO_WRITE, &ktruio, error); + ktrgenio(s, UIO_WRITE, &ktruio, error); } FREE(ktriov, M_TEMP); } @@ -299,7 +299,7 @@ if (error == 0) { ktruio.uio_iov = ktriov; ktruio.uio_resid = len - auio.uio_resid; - ktrgenio(td->td_proc->p_tracep, s, UIO_READ, &ktruio, error); + ktrgenio(s, UIO_READ, &ktruio, error); } FREE(ktriov, M_TEMP); } ==== //depot/projects/smpng/sys/conf/NOTES#16 (text+ko) ==== @@ -14,7 +14,7 @@ # This file contains machine independent kernel configuration notes. For # machine dependent notes, look in /sys//conf/NOTES. # -# $FreeBSD: src/sys/conf/NOTES,v 1.1036 2002/06/06 16:35:55 gibbs Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1038 2002/06/07 05:32:58 jhb Exp $ # # @@ -216,9 +216,16 @@ options GDB_REMOTE_CHAT # -# KTRACE enables the system-call tracing facility ktrace(2). +# KTRACE enables the system-call tracing facility ktrace(2). To be more +# SMP-friendly, KTRACE uses a worker thread to process most trace events +# asynchronously to the thread generating the event. This requires a +# pre-allocated store of objects representing trace events. The +# KTRACE_REQUEST_POOL option specifies the initial size of this store. +# The size of the pool can be adjusted both at boottime and runtime via +# the kern.ktrace_request_pool tunable and sysctl. # options KTRACE #kernel tracing +options KTRACE_REQUEST_POOL=101 # # KTR is a kernel tracing mechanism imported from BSD/OS. Currently it @@ -554,8 +561,8 @@ options ATM_SIGPVC #SIGPVC signalling manager options ATM_SPANS #SPANS signalling manager options ATM_UNI #UNI signalling manager -# Broken: -##device hea #Efficient ENI-155p ATM PCI + +device hea #Efficient ENI-155p ATM PCI device hfa #FORE PCA-200E ATM PCI ==== //depot/projects/smpng/sys/conf/files#43 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.644 2002/06/06 16:35:55 gibbs Exp $ +# $FreeBSD: src/sys/conf/files,v 1.645 2002/06/07 02:04:09 mdodd Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -358,14 +358,14 @@ dev/gem/if_gem_pci.c optional gem pci dev/gx/if_gx.c optional gx dev/hea/eni.c optional hea nowerror -dev/hea/eni_buffer.c optional hea +dev/hea/eni_buffer.c optional hea nowerror dev/hea/eni_globals.c optional hea dev/hea/eni_if.c optional hea dev/hea/eni_init.c optional hea dev/hea/eni_intr.c optional hea dev/hea/eni_receive.c optional hea dev/hea/eni_transmit.c optional hea -dev/hea/eni_vcm.c optional hea +dev/hea/eni_vcm.c optional hea nowerror dev/hea/hea_pci.c optional hea pci dev/hea/hea_freebsd.c optional hea dev/hfa/fore_buffer.c optional hfa ==== //depot/projects/smpng/sys/conf/options#29 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.321 2002/06/06 16:35:55 gibbs Exp $ +# $FreeBSD: src/sys/conf/options,v 1.322 2002/06/07 05:32:59 jhb Exp $ # # On the handling of kernel options # @@ -77,6 +77,7 @@ NODEVFS opt_devfs.h HW_WDOG KTRACE +KTRACE_REQUEST_POOL opt_ktrace.h # Size of ktrace request pool LIBICONV MD_ROOT opt_md.h MD_ROOT_SIZE opt_md.h ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/fil.c#7 (text+ko) ==== @@ -99,7 +99,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed"; -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.30 2002/04/27 16:56:25 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.31 2002/06/07 08:56:30 darrenr Exp $"; #endif #ifndef _KERNEL @@ -1517,7 +1517,7 @@ * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 - * $Id: fil.c,v 2.35.2.60 2002/04/26 10:20:34 darrenr Exp $ + * $Id: fil.c,v 2.35.2.61 2002/06/05 08:18:09 darrenr Exp $ */ /* * Copy data from an mbuf chain starting "off" bytes from the beginning, @@ -1632,7 +1632,6 @@ fgp = &ipfgroups[0][set]; else return NULL; - num &= 0xffff; while ((fg = *fgp)) if (fg->fg_num == num) ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_auth.c#7 (text+ko) ==== @@ -105,7 +105,7 @@ #if !defined(lint) /* static const char rcsid[] = "@(#)$Id: ip_auth.c,v 2.11.2.12 2001/07/18 14:57:08 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_auth.c,v 1.28 2002/04/25 03:31:39 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_auth.c,v 1.29 2002/06/07 08:56:30 darrenr Exp $"; #endif @@ -613,7 +613,10 @@ } else faep = &fae->fae_next; } - ipauth = &fae_list->fae_fr; + if (fae_list != NULL) + ipauth = &fae_list->fae_fr; + else + ipauth = NULL; for (frp = &fr_authlist; (fr = *frp); ) { if (fr->fr_ref == 1) { ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_compat.h#5 (text+ko) ==== @@ -5,7 +5,7 @@ * * @(#)ip_compat.h 1.8 1/14/96 * $Id: ip_compat.h,v 2.26.2.9 2001/01/14 14:58:01 darrenr Exp $ - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.17 2002/04/27 16:56:25 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.18 2002/06/07 08:56:30 darrenr Exp $ */ #ifndef __IP_COMPAT_H__ @@ -214,7 +214,11 @@ #if defined(__FreeBSD__) && (defined(KERNEL) || defined(_KERNEL)) # include # ifndef __FreeBSD_version -# include +# ifdef IPFILTER_LKM +# include +# else +# include +# endif # endif # ifdef IPFILTER_LKM # define ACTUALLY_LKM_NOT_KERNEL ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.c#8 (text+ko) ==== @@ -124,7 +124,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; /* static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.42.2.34 2001/07/23 13:49:57 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.32 2002/04/25 03:31:39 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.33 2002/06/07 08:56:30 darrenr Exp $"; #endif extern struct protosw inetsw[]; @@ -649,6 +649,9 @@ unit = dev; #endif + if (fr_running == 0 && (cmd != SIOCFRENB || unit != IPL_LOGIPF)) + return ENODEV; + SPL_NET(s); if (unit == IPL_LOGNAT) { @@ -893,7 +896,8 @@ * Check that the group number does exist and that if a head group * has been specified, doesn't exist. */ - if ((req != SIOCZRLST) && fp->fr_grhead && + if ((req != SIOCZRLST) && ((req == SIOCINAFR) || (req == SIOCINIFR) || + (req == SIOCADAFR) || (req == SIOCADIFR)) && fp->fr_grhead && fr_findgroup((u_int)fp->fr_grhead, fp->fr_flags, unit, set, NULL)) return EEXIST; if ((req != SIOCZRLST) && fp->fr_group && @@ -1227,13 +1231,18 @@ struct mbuf **mp; { struct mbuf *m = *mp; - char *dpsave; - int error; + int error, hlen; + fr_info_t frn; ip_t *ip; - dpsave = fin->fin_dp; + bzero((char *)&frn, sizeof(frn)); + frn.fin_ifp = fin->fin_ifp; + frn.fin_v = fin->fin_v; + frn.fin_out = fin->fin_out; + frn.fin_mp = fin->fin_mp; ip = mtod(m, ip_t *); + hlen = sizeof(*ip); ip->ip_v = fin->fin_v; if (ip->ip_v == 4) { @@ -1248,21 +1257,24 @@ ip->ip_ttl = ip_defttl; # endif ip->ip_sum = 0; - fin->fin_dp = (char *)(ip + 1); + frn.fin_dp = (char *)(ip + 1); } # ifdef USE_INET6 else if (ip->ip_v == 6) { ip6_t *ip6 = (ip6_t *)ip; + hlen = sizeof(*ip6); ip6->ip6_hlim = 127; - fin->fin_dp = (char *)(ip6 + 1); + frn.fin_dp = (char *)(ip6 + 1); } # endif # ifdef IPSEC m->m_pkthdr.rcvif = NULL; # endif - error = ipfr_fastroute(m, mp, fin, NULL); - fin->fin_dp = dpsave; + + fr_makefrip(hlen, ip, &frn); + + error = ipfr_fastroute(m, mp, &frn, NULL); return error; } @@ -1569,6 +1581,9 @@ /* * Route packet. */ +#ifdef __sgi + ROUTE_RDLOCK(); +#endif bzero((caddr_t)ro, sizeof (*ro)); dst = (struct sockaddr_in *)&ro->ro_dst; dst->sin_family = AF_INET; @@ -1605,6 +1620,11 @@ # else rtalloc(ro); # endif + +#ifdef __sgi + ROUTE_UNLOCK(); +#endif + if (!ifp) { if (!fr || !(fr->fr_flags & FR_FASTROUTE)) { error = -2; @@ -2104,7 +2124,7 @@ fr_info_t *fin; int dst; { - verbose("- ICMP UNREACHABLE RST sent\n"); + verbose("- ICMP UNREACHABLE sent\n"); return 0; } ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.h#6 (text+ko) ==== @@ -5,7 +5,7 @@ * * @(#)ip_fil.h 1.35 6/5/96 * $Id: ip_fil.h,v 2.29.2.4 2000/11/12 11:54:53 darrenr Exp $ - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.22 2002/04/25 03:31:39 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.23 2002/06/07 08:56:30 darrenr Exp $ */ #ifndef __IP_FIL_H__ @@ -510,6 +510,7 @@ extern int send_icmp_err __P((ip_t *, int, fr_info_t *, int)); extern int ipf_log __P((void)); extern struct ifnet *get_unit __P((char *, int)); +extern int mbuflen __P((mb_t *)); # if defined(__NetBSD__) || defined(__OpenBSD__) || \ (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) extern int iplioctl __P((dev_t, u_long, caddr_t, int)); ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c#5 (text+ko) ==== @@ -2,7 +2,7 @@ * Simple FTP transparent proxy for in-kernel use. For use with the NAT * code. * - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c,v 1.20 2002/04/27 16:56:25 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c,v 1.21 2002/06/07 08:56:30 darrenr Exp $ */ #if SOLARIS && defined(_KERNEL) extern kmutex_t ipf_rw; @@ -766,10 +766,10 @@ i = 0; sel = nat->nat_aps->aps_sel[1 - rv]; if (rv) { - if (nat->nat_aps->aps_ackmin[sel] > ntohl(tcp->th_seq)) + if (nat->nat_aps->aps_ackmin[sel] < ntohl(tcp->th_seq)) i = nat->nat_aps->aps_ackoff[sel]; } else { - if (nat->nat_aps->aps_seqmin[sel] > ntohl(tcp->th_seq)) + if (nat->nat_aps->aps_seqmin[sel] < ntohl(tcp->th_seq)) i = nat->nat_aps->aps_seqoff[sel]; } /* @@ -781,6 +781,10 @@ f->ftps_seq = ntohl(tcp->th_seq); else { inc = ntohl(tcp->th_seq) - f->ftps_seq; + if (inc < 0) + inc = -inc; + if (i < 0) + i = -i; if (inc > i) { return APR_ERR(1); } ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_nat.c#8 (text+ko) ==== @@ -111,7 +111,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed"; /* static const char rcsid[] = "@(#)$Id: ip_nat.c,v 2.37.2.44 2001/07/21 07:17:22 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_nat.c,v 1.30 2002/04/27 16:56:25 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_nat.c,v 1.31 2002/06/07 08:56:30 darrenr Exp $"; #endif nat_t **nat_table[2] = { NULL, NULL }, @@ -471,8 +471,12 @@ } for (np = &nat_list; (n = *np); np = &n->in_next) if (!bcmp((char *)&nat->in_flags, (char *)&n->in_flags, - IPN_CMPSIZ)) + IPN_CMPSIZ)) { + if (n->in_redir == NAT_REDIRECT && + n->in_pnext != nat->in_pnext) + continue; break; + } } switch (cmd) ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_proxy.c#7 (text+ko) ==== @@ -77,7 +77,7 @@ #if !defined(lint) /* static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.9.2.6 2001/07/15 22:06:15 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_proxy.c,v 1.18 2002/04/27 16:56:25 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_proxy.c,v 1.19 2002/06/07 08:56:30 darrenr Exp $"; #endif #if defined(_KERNEL) && (SOLARIS || defined(__sgi)) @@ -123,7 +123,7 @@ ippr_ipsec_match }, #endif #ifdef IPF_NETBIOS_PROXY - { NULL, "netbios", (char)IPPROTO_TCP, 0, 0, ippr_netbios_init, NULL, + { NULL, "netbios", (char)IPPROTO_UDP, 0, 0, ippr_netbios_init, NULL, NULL, NULL, NULL, ippr_netbios_out, NULL }, #endif #ifdef IPF_H323_PROXY @@ -422,11 +422,14 @@ int sel, ch = 0, out, nlen; u_32_t seq1, seq2; tcphdr_t *tcp; + short inc2; tcp = (tcphdr_t *)fin->fin_dp; out = fin->fin_out; nlen = ip->ip_len; nlen -= (ip->ip_hl << 2) + (tcp->th_off << 2); + inc2 = inc; + inc = (int)inc2; if (out != 0) { seq1 = (u_32_t)ntohl(tcp->th_seq); ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_state.c#6 (text+ko) ==== @@ -95,7 +95,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-2000 Darren Reed"; /* static const char rcsid[] = "@(#)$Id: ip_state.c,v 2.30.2.38 2001/07/23 13:49:46 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_state.c,v 1.27 2002/04/27 16:56:25 darrenr Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_state.c,v 1.28 2002/06/07 08:56:30 darrenr Exp $"; #endif #ifndef MIN @@ -577,9 +577,9 @@ register u_int hv; struct icmp *ic; ipstate_t ips; + int out, ws; u_int pass; void *ifp; - int out; if (fr_state_lock || (fin->fin_off != 0) || (fin->fin_fl & FI_SHORT) || (fin->fin_misc & FM_BADSTATE)) @@ -693,8 +693,11 @@ is->is_maxsend = is->is_send; if ((tcp->th_flags & TH_SYN) && - ((tcp->th_off << 2) >= (sizeof(*tcp) + 4))) - is->is_swscale = fr_tcpoptions(tcp); + ((tcp->th_off << 2) >= (sizeof(*tcp) + 4))) { + ws = fr_tcpoptions(tcp); + if (ws >= 0) + is->is_swscale = ws; + } } is->is_maxdwin = 1; @@ -902,6 +905,7 @@ fdata->td_wscale = wscale; else if (wscale == -2) fdata->td_wscale = tdata->td_wscale = 0; + win <<= fdata->td_wscale; if ((fdata->td_end == 0) && (!is->is_fsm || ((tcp->th_flags & TH_OPENING) == TH_OPENING))) { @@ -910,7 +914,9 @@ */ fdata->td_end = end; fdata->td_maxwin = 1; - fdata->td_maxend = end + 1; + fdata->td_maxend = end + win; + if (win == 0) + fdata->td_maxend++; } if (!(tcp->th_flags & TH_ACK)) { /* Pretend an ack was sent */ @@ -924,7 +930,6 @@ if (seq == end) seq = end = fdata->td_end; - win <<= fdata->td_wscale; maxwin = tdata->td_maxwin; ackskew = tdata->td_end - ack; @@ -1459,7 +1464,7 @@ rev = fin->fin_rev; if (is->is_frage[rev] != 0) is->is_age = is->is_frage[rev]; - else if (fin->fin_rev) + else if (rev != 0) is->is_age = fr_icmpacktimeout; else is->is_age = fr_icmptimeout; ==== //depot/projects/smpng/sys/contrib/ipfilter/netinet/ipl.h#5 (text+ko) ==== @@ -4,12 +4,12 @@ * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ipl.h 1.21 6/5/96 - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ipl.h,v 1.18 2002/04/27 16:56:25 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ipl.h,v 1.19 2002/06/07 08:56:30 darrenr Exp $ */ #ifndef __IPL_H__ #define __IPL_H__ -#define IPL_VERSION "IP Filter: v3.4.27" +#define IPL_VERSION "IP Filter: v3.4.28" #endif ==== //depot/projects/smpng/sys/dev/hea/eni.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $FreeBSD: src/sys/dev/hea/eni.h,v 1.4 2002/06/03 09:16:51 mdodd Exp $ + * @(#) $FreeBSD: src/sys/dev/hea/eni.h,v 1.5 2002/06/07 05:23:01 mdodd Exp $ * */ @@ -478,6 +478,10 @@ Eni_stats eu_stats; /* Statistics */ + int eu_type; +#define TYPE_UNKNOWN 0 +#define TYPE_ENI 1 +#define TYPE_ADP 2 }; typedef struct eni_unit Eni_unit; ==== //depot/projects/smpng/sys/dev/hea/hea_freebsd.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/hea/hea_freebsd.c,v 1.1 2002/06/03 09:16:52 mdodd Exp $ + * $FreeBSD: src/sys/dev/hea/hea_freebsd.c,v 1.3 2002/06/07 05:23:01 mdodd Exp $ */ /* @@ -163,14 +163,15 @@ */ eup->eu_unit = device_get_unit(dev); eup->eu_mtu = ENI_IFF_MTU; - eup->eu_pcitag = dev; + eup->eu_vcc_pool = &eni_vcc_pool; + eup->eu_nif_pool = &eni_nif_pool; eup->eu_ioctl = eni_atm_ioctl; eup->eu_instvcc = eni_instvcc; eup->eu_openvcc = eni_openvcc; eup->eu_closevcc = eni_closevcc; eup->eu_output = eni_output; - eup->eu_vcc_pool = &eni_vcc_pool; - eup->eu_nif_pool = &eni_nif_pool; + + eup->eu_pcitag = dev; /* * Map memory structures into adapter space @@ -202,25 +203,44 @@ goto fail; } - /* - * Read the contents of the SEEPROM - */ - eni_read_seeprom(eup); - /* - * Copy MAC address to PIF and config structures - */ - bcopy((caddr_t)&eup->eu_seeprom[SEPROM_MAC_OFF], - (caddr_t)&eup->eu_pif.pif_macaddr, - sizeof(struct mac_addr)); + if (eup->eu_type == TYPE_ADP) { + int i; +#define MID_ADPMACOFF 0xffc0 /* mac address offset (adaptec only) */ + + for (i = 0; i < sizeof(struct mac_addr); i++) { + eup->eu_pif.pif_macaddr.ma_data[i] = + bus_space_read_1(rman_get_bustag(sc->mem), + rman_get_bushandle(sc->mem), + MID_ADPMACOFF + i); + } + + } else + if (eup->eu_type == TYPE_ENI) { + /* + * Read the contents of the SEEPROM + */ + eni_read_seeprom(eup); + + /* + * Copy MAC address to PIF and config structures + */ + bcopy((caddr_t)&eup->eu_seeprom[SEPROM_MAC_OFF], + (caddr_t)&eup->eu_pif.pif_macaddr, + sizeof(struct mac_addr)); + /* + * Copy serial number into config space + */ + eup->eu_config.ac_serial = + ntohl(*(u_long *)&eup->eu_seeprom[SEPROM_SN_OFF]); + } else { + device_printf(dev, "Unknown adapter type!\n"); + error = ENXIO; + goto fail; + } + eup->eu_config.ac_macaddr = eup->eu_pif.pif_macaddr; /* - * Copy serial number into config space - */ - eup->eu_config.ac_serial = - ntohl(*(u_long *)&eup->eu_seeprom[SEPROM_SN_OFF]); - - /* * Setup some of the adapter configuration */ /* ==== //depot/projects/smpng/sys/dev/hea/hea_pci.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/hea/hea_pci.c,v 1.1 2002/06/03 09:16:52 mdodd Exp $ + * $FreeBSD: src/sys/dev/hea/hea_pci.c,v 1.3 2002/06/07 05:23:01 mdodd Exp $ */ /* @@ -97,15 +97,27 @@ static int hea_pci_probe(device_t); static int hea_pci_attach(device_t); -#define ENI_VENDORID 0x111A -#define ENI_DEVICEID 0x0002 +#define ENI_VENDORID 0x111A +#define ENI_DEVICEID_ENI155PF 0x0000 +#define ENI_DEVICEID_ENI155PA 0x0002 + +#define ADP_VENDORID 0x9004 +#define ADP_DEVICEID_AIC5900 0x5900 +#define ADP_DEVICEID_AIC5905 0x5905 struct hea_pci_type { u_int16_t vid; u_int16_t did; char * name; } hea_pci_devs[] = { - { ENI_VENDORID, ENI_DEVICEID, "Efficent Networks ENI ATM Adapter" }, + { ENI_VENDORID, ENI_DEVICEID_ENI155PF, + "Efficient Networks 155P-MF1 (FPGA) ATM Adapter" }, + { ENI_VENDORID, ENI_DEVICEID_ENI155PA, + "Efficient Networks 155P-MF1 (ASIC) ATM Adapter" }, + { ADP_VENDORID, ADP_DEVICEID_AIC5900, + "ANA-5910/5930/5940 ATM155 & 25 LAN Adapter" }, + { ADP_VENDORID, ADP_DEVICEID_AIC5905, + "ANA-5910A/5930A/5940A ATM Adapter" }, { 0, 0, NULL }, }; @@ -191,6 +203,18 @@ eup->eu_config.ac_bustype = BUS_PCI; eup->eu_config.ac_busslot = (pci_get_bus(dev) << 8)| pci_get_slot(dev); + switch (pci_get_vendor(dev)) { + case ENI_VENDORID: + eup->eu_type = TYPE_ENI; + break; + case ADP_VENDORID: + eup->eu_type = TYPE_ADP; + break; + default: + eup->eu_type = TYPE_UNKNOWN; + break; + } + error = hea_attach(dev); if (error) { device_printf(dev, "hea_attach() failed.\n"); @@ -198,8 +222,8 @@ } return (0); + fail: - hea_detach(dev); return (error); ==== //depot/projects/smpng/sys/dev/hfa/hfa_freebsd.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/hfa/hfa_freebsd.c,v 1.1 2002/04/17 00:24:48 mdodd Exp $ + * $FreeBSD: src/sys/dev/hfa/hfa_freebsd.c,v 1.2 2002/06/07 01:55:42 mdodd Exp $ */ /* @@ -176,6 +176,7 @@ fup->fu_openvcc = fore_openvcc; fup->fu_closevcc = fore_closevcc; fup->fu_output = fore_output; + callout_handle_init(&fup->fu_thandle); /* ==== //depot/projects/smpng/sys/dev/hfa/hfa_pci.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/hfa/hfa_pci.c,v 1.1 2002/04/17 00:24:48 mdodd Exp $ + * $FreeBSD: src/sys/dev/hfa/hfa_pci.c,v 1.2 2002/06/07 01:55:42 mdodd Exp $ */ /* @@ -128,25 +128,15 @@ fup = &sc->fup; error = 0; - switch (pci_get_device(dev)) { - case FORE_PCA200EPC_ID: - fup->fu_config.ac_device = DEV_FORE_PCA200E; - break; - default: - fup->fu_config.ac_device = DEV_UNKNOWN; - break; - } + pci_enable_busmaster(dev); + pci_enable_io(dev, SYS_RES_MEMORY); - pci_enable_busmaster(dev); command = pci_read_config(dev, PCIR_COMMAND, 2); if ((command & PCIM_CMD_BUSMASTEREN) == 0) { device_printf(dev, "Unable to enable PCI busmastering.\n"); error = ENXIO; goto fail; } - - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 2); if ((command & PCIM_CMD_MEMEN) == 0) { device_printf(dev, "Unable to enable PCI memory resources.\n"); error = ENXIO; @@ -192,6 +182,15 @@ fup->fu_config.ac_bustype = BUS_PCI; fup->fu_config.ac_busslot = (pci_get_bus(dev) << 8)| pci_get_slot(dev); + switch (pci_get_device(dev)) { + case FORE_PCA200EPC_ID: + fup->fu_config.ac_device = DEV_FORE_PCA200E; + break; + default: + fup->fu_config.ac_device = DEV_UNKNOWN; + break; + } + error = hfa_attach(dev); if (error) { device_printf(dev, "hfa_attach() failed.\n"); ==== //depot/projects/smpng/sys/i386/i386/trap.c#38 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/i386/i386/trap.c,v 1.223 2002/04/27 17:07:15 alc Exp $ + * $FreeBSD: src/sys/i386/i386/trap.c,v 1.224 2002/06/07 05:47:34 jhb Exp $ */ /* @@ -912,7 +912,6 @@ struct trapframe frame; { caddr_t params; - int i; struct sysent *callp; struct thread *td = curthread; struct proc *p = td->td_proc; @@ -985,38 +984,32 @@ /* * copyin and the ktrsyscall()/ktrsysret() code is MP-aware */ - if (params && (i = narg * sizeof(int)) && - (error = copyin(params, (caddr_t)args, (u_int)i))) { + if (params != NULL && narg != 0) + error = copyin(params, (caddr_t)args, + (u_int)(narg * sizeof(int))); + else + error = 0; + #ifdef KTRACE - if (KTRPOINT(p, KTR_SYSCALL)) - ktrsyscall(p->p_tracep, code, narg, args); + if (KTRPOINT(td, KTR_SYSCALL)) + ktrsyscall(code, narg, args); #endif - goto bad; - } /* * Try to run the syscall without Giant if the syscall * is MP safe. */ - if ((callp->sy_narg & SYF_MPSAFE) == 0) { + if ((callp->sy_narg & SYF_MPSAFE) == 0) mtx_lock(&Giant); - } -#ifdef KTRACE - /* - * We have to obtain Giant no matter what if - * we are ktracing - */ - if (KTRPOINT(p, KTR_SYSCALL)) { >>> TRUNCATED FOR MAIL (1000 lines) <<< To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message