PERFORCE change 51635 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri Apr 23 20:29:56 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=51635
Change 51635 by marcel at marcel_nfs on 2004/04/23 20:29:12
IFC @51632
Affected files ...
.. //depot/projects/gdb/UPDATING#12 integrate
.. //depot/projects/gdb/etc/rc.d/ipfilter#6 integrate
.. //depot/projects/gdb/etc/rc.d/ipmon#5 integrate
.. //depot/projects/gdb/lib/libarchive/archive_entry.c#9 integrate
.. //depot/projects/gdb/lib/libarchive/archive_read_extract.c#7 integrate
.. //depot/projects/gdb/lib/libarchive/archive_write_set_format_shar.c#7 integrate
.. //depot/projects/gdb/sbin/ipfw/ipfw.8#5 integrate
.. //depot/projects/gdb/sbin/ipfw/ipfw2.c#4 integrate
.. //depot/projects/gdb/share/man/man4/man4.i386/Makefile#6 integrate
.. //depot/projects/gdb/sys/conf/NOTES#14 integrate
.. //depot/projects/gdb/sys/conf/files#18 integrate
.. //depot/projects/gdb/sys/conf/files.amd64#6 integrate
.. //depot/projects/gdb/sys/conf/kern.pre.mk#8 integrate
.. //depot/projects/gdb/sys/conf/options#14 integrate
.. //depot/projects/gdb/sys/dev/gem/if_gem.c#3 integrate
.. //depot/projects/gdb/sys/dev/if_ndis/if_ndis.c#12 integrate
.. //depot/projects/gdb/sys/dev/pccbb/pccbb.c#7 integrate
.. //depot/projects/gdb/sys/dev/pci/pci.c#8 integrate
.. //depot/projects/gdb/sys/i386/acpica/acpi_asus.c#2 integrate
.. //depot/projects/gdb/sys/modules/acpi/Makefile#3 integrate
.. //depot/projects/gdb/sys/modules/acpi/acpi_asus/Makefile#2 integrate
.. //depot/projects/gdb/sys/net/if_gre.c#4 integrate
.. //depot/projects/gdb/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#3 integrate
.. //depot/projects/gdb/sys/netinet/in_pcb.c#6 integrate
.. //depot/projects/gdb/sys/netinet/ip_fw.h#4 integrate
.. //depot/projects/gdb/sys/netinet/ip_fw2.c#4 integrate
.. //depot/projects/gdb/sys/netinet/tcp_hostcache.c#2 integrate
.. //depot/projects/gdb/sys/netinet/tcp_input.c#5 integrate
.. //depot/projects/gdb/sys/powerpc/powermac/ata_kauai.c#4 integrate
.. //depot/projects/gdb/sys/powerpc/powermac/ata_macio.c#3 integrate
.. //depot/projects/gdb/sys/vm/device_pager.c#3 integrate
.. //depot/projects/gdb/sys/vm/vnode_pager.c#3 integrate
.. //depot/projects/gdb/usr.bin/tar/write.c#6 integrate
.. //depot/projects/gdb/usr.bin/vmstat/vmstat.c#4 integrate
Differences ...
==== //depot/projects/gdb/UPDATING#12 (text+ko) ====
@@ -17,6 +17,12 @@
developers choose to disable these features on build machines
to maximize performance.
+20040423:
+ Due to a new option in ipfw (versrcreach) the ipfw(8) command
+ needs to be recompiled. Normal accept/reject rules without
+ options are not affected but those with options may break until
+ ipfw(8) is recompiled.
+
20040420:
Due to changes in the callout ABI, kernels compiled after this
date may be incompatible with kernel modules compiled prior to
@@ -1596,4 +1602,4 @@
Contact Warner Losh if you have any questions about your use of
this document.
-$FreeBSD: src/UPDATING,v 1.306 2004/04/20 15:49:30 cperciva Exp $
+$FreeBSD: src/UPDATING,v 1.307 2004/04/23 14:33:30 andre Exp $
==== //depot/projects/gdb/etc/rc.d/ipfilter#6 (text+ko) ====
@@ -1,7 +1,7 @@
#!/bin/sh
#
# $NetBSD: ipfilter,v 1.10 2001/02/28 17:03:50 lukem Exp $
-# $FreeBSD: src/etc/rc.d/ipfilter,v 1.20 2004/04/20 13:30:49 darrenr Exp $
+# $FreeBSD: src/etc/rc.d/ipfilter,v 1.21 2004/04/23 15:43:13 darrenr Exp $
#
# PROVIDE: ipfilter
==== //depot/projects/gdb/etc/rc.d/ipmon#5 (text+ko) ====
@@ -1,7 +1,7 @@
#!/bin/sh
#
# $NetBSD: ipmon,v 2002/04/18 05:02:01 lukem Exp $
-# $FreeBSD: src/etc/rc.d/ipmon,v 1.10 2004/04/20 13:30:49 darrenr Exp $
+# $FreeBSD: src/etc/rc.d/ipmon,v 1.11 2004/04/23 15:43:13 darrenr Exp $
#
# PROVIDE: ipmon
==== //depot/projects/gdb/lib/libarchive/archive_entry.c#9 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.8 2004/04/21 05:13:42 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.9 2004/04/23 17:15:48 kientzle Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -150,13 +150,13 @@
aes_copy(struct aes *dest, struct aes *src)
{
*dest = *src;
- if (src->aes_mbs_alloc != NULL) {
- dest->aes_mbs_alloc = strdup(src->aes_mbs_alloc);
+ if (src->aes_mbs != NULL) {
+ dest->aes_mbs_alloc = strdup(src->aes_mbs);
dest->aes_mbs = dest->aes_mbs_alloc;
}
- if (src->aes_wcs_alloc != NULL) {
- dest->aes_wcs_alloc = malloc((wcslen(src->aes_wcs_alloc) + 1)
+ if (src->aes_wcs != NULL) {
+ dest->aes_wcs_alloc = malloc((wcslen(src->aes_wcs) + 1)
* sizeof(wchar_t));
dest->aes_wcs = dest->aes_wcs_alloc;
wcscpy(dest->aes_wcs_alloc, src->aes_wcs);
@@ -292,12 +292,12 @@
memset(entry2, 0, sizeof(*entry2));
entry2->ae_stat = entry->ae_stat;
- aes_copy(&entry2->ae_fflags ,&entry->ae_fflags);
- aes_copy(&entry2->ae_gname ,&entry->ae_gname);
- aes_copy(&entry2->ae_hardlink ,&entry->ae_hardlink);
+ aes_copy(&entry2->ae_fflags, &entry->ae_fflags);
+ aes_copy(&entry2->ae_gname, &entry->ae_gname);
+ aes_copy(&entry2->ae_hardlink, &entry->ae_hardlink);
aes_copy(&entry2->ae_pathname, &entry->ae_pathname);
- aes_copy(&entry2->ae_symlink ,&entry->ae_symlink);
- aes_copy(&entry2->ae_uname ,&entry->ae_uname);
+ aes_copy(&entry2->ae_symlink, &entry->ae_symlink);
+ aes_copy(&entry2->ae_uname, &entry->ae_uname);
return (entry2);
}
==== //depot/projects/gdb/lib/libarchive/archive_read_extract.c#7 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_extract.c,v 1.7 2004/04/21 05:13:42 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_extract.c,v 1.8 2004/04/23 16:27:37 kientzle Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -803,7 +803,7 @@
#ifdef HAVE_CHFLAGS
fflags_p = fflags;
- if (strtofflags(&fflags_p, &set, &clear) != 0 &&
+ if (strtofflags(&fflags_p, &set, &clear) == 0 &&
stat(name, &st) == 0) {
st.st_flags &= ~clear;
st.st_flags |= set;
==== //depot/projects/gdb/lib/libarchive/archive_write_set_format_shar.c#7 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_shar.c,v 1.6 2004/04/20 20:21:36 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_shar.c,v 1.7 2004/04/23 17:13:40 kientzle Exp $");
#include <sys/stat.h>
#include <errno.h>
@@ -130,7 +130,11 @@
int
archive_write_set_format_shar_dump(struct archive *a)
{
+ struct shar *shar;
+
archive_write_set_format_shar(a);
+ shar = a->format_data;
+ shar->dump = 1;
a->format_write_data = archive_write_shar_data_uuencode;
a->archive_format = ARCHIVE_FORMAT_SHAR_DUMP;
a->archive_format_name = "shar dump";
==== //depot/projects/gdb/sbin/ipfw/ipfw.8#5 (text+ko) ====
@@ -1,5 +1,5 @@
.\"
-.\" $FreeBSD: src/sbin/ipfw/ipfw.8,v 1.142 2004/03/27 14:13:53 ceri Exp $
+.\" $FreeBSD: src/sbin/ipfw/ipfw.8,v 1.143 2004/04/23 14:28:38 andre Exp $
.\"
.Dd December 1, 2003
.Dt IPFW 8
@@ -1230,7 +1230,23 @@
.Pp
.Dl ip verify unicast reverse-path
.Pp
-This option can be used to make anti-spoofing rules.
+This option can be used to make anti-spoofing rules to reject all
+packets with source addresses not from this interface.
+.It Cm versrcreach
+For incoming packets,
+a routing table lookup is done on the packet's source address.
+If a route to the source address exists, but not the default route,
+the packet matches.
+Otherwise the packet does not match.
+All outgoing packets match.
+.Pp
+The name and functionality of the option is intentionally similar to
+the Cisco IOS command:
+.Pp
+.Dl ip verify unicast source reachable-via any
+.Pp
+This option can be used to make anti-spoofing rules to reject all
+packets whose source address is unreachable.
.El
.Sh SETS OF RULES
Each rule belongs to one of 32 different
==== //depot/projects/gdb/sbin/ipfw/ipfw2.c#4 (text+ko) ====
@@ -17,7 +17,7 @@
*
* NEW command line interface for IP firewall facility
*
- * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.46 2004/04/09 17:26:01 maxim Exp $
+ * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.47 2004/04/23 14:28:38 andre Exp $
*/
#include <sys/param.h>
@@ -226,6 +226,7 @@
TOK_MAC,
TOK_MACTYPE,
TOK_VERREVPATH,
+ TOK_VERSRCREACH,
TOK_IPSEC,
TOK_COMMENT,
@@ -338,6 +339,7 @@
{ "mac", TOK_MAC },
{ "mac-type", TOK_MACTYPE },
{ "verrevpath", TOK_VERREVPATH },
+ { "versrcreach", TOK_VERSRCREACH },
{ "ipsec", TOK_IPSEC },
{ "//", TOK_COMMENT },
@@ -1268,6 +1270,10 @@
printf(" verrevpath");
break;
+ case O_VERSRCREACH:
+ printf(" versrcreach");
+ break;
+
case O_IPSEC:
printf(" ipsec");
break;
@@ -1874,7 +1880,7 @@
" ipttl LIST | ipversion VER | keep-state | layer2 | limit ... |\n"
" mac ... | mac-type LIST | proto LIST | {recv|xmit|via} {IF|IPADDR} |\n"
" setup | {tcpack|tcpseq|tcpwin} NN | tcpflags SPEC | tcpoptions SPEC |\n"
-" verrevpath\n"
+" verrevpath | versrcreach\n"
);
exit(0);
}
@@ -3400,6 +3406,10 @@
fill_cmd(cmd, O_VERREVPATH, 0, 0);
break;
+ case TOK_VERSRCREACH:
+ fill_cmd(cmd, O_VERSRCREACH, 0, 0);
+ break;
+
case TOK_IPSEC:
fill_cmd(cmd, O_IPSEC, 0, 0);
break;
==== //depot/projects/gdb/share/man/man4/man4.i386/Makefile#6 (text+ko) ====
@@ -1,6 +1,7 @@
-# $FreeBSD: src/share/man/man4/man4.i386/Makefile,v 1.167 2004/03/26 06:26:45 non Exp $
+# $FreeBSD: src/share/man/man4/man4.i386/Makefile,v 1.168 2004/04/23 06:29:08 philip Exp $
-MAN= acpi_toshiba.4 \
+MAN= acpi_asus.4 \
+ acpi_toshiba.4 \
aic.4 \
alpm.4 \
amdpm.4 \
==== //depot/projects/gdb/sys/conf/NOTES#14 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1219 2004/04/21 20:18:06 scottl Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1220 2004/04/23 19:48:43 emax Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -441,6 +441,16 @@
options NETGRAPH_VJC
options NETGRAPH_ATM_ATMPIF
+# NgBluetooth - Netgraph Bluetooth
+options NETGRAPH_BLUETOOTH # Common parts
+options NETGRAPH_BLUETOOTH_BT3C # 3COM Bluetooth PCCARD
+options NETGRAPH_BLUETOOTH_H4 # H4 line discipline
+options NETGRAPH_BLUETOOTH_UBT # Bluetooth USB dongle
+options NETGRAPH_BLUETOOTH_UBTBCMFW # Firmware driver for BCM2033
+options NETGRAPH_BLUETOOTH_HCI # Bluetooth HCI layer
+options NETGRAPH_BLUETOOTH_L2CAP # Bluetooth L2CAP layer
+options NETGRAPH_BLUETOOTH_SOCKET # Bluetooth sockets layer
+
# NgATM - Netgraph ATM
options NGATM_ATM
options NGATM_ATMBASE
==== //depot/projects/gdb/sys/conf/files#18 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.888 2004/04/20 15:42:16 njl Exp $
+# $FreeBSD: src/sys/conf/files,v 1.889 2004/04/23 19:48:43 emax Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -1354,6 +1354,27 @@
contrib/ngatm/netnatm/sig/sig_uni.c optional ngatm_uni
contrib/ngatm/netnatm/sig/sig_unimsgcpy.c optional ngatm_uni
contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni
+netgraph/bluetooth/common/ng_bluetooth.c optional netgraph_bluetooth
+netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c optional netgraph_bluetooth_bt3c
+netgraph/bluetooth/drivers/h4/ng_h4.c optional netgraph_bluetooth_h4
+netgraph/bluetooth/drivers/ubt/ng_ubt.c optional netgraph_bluetooth_ubt
+netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c optional netgraph_bluetooth_ubtbcmfw
+netgraph/bluetooth/hci/ng_hci_cmds.c optional netgraph_bluetooth_hci
+netgraph/bluetooth/hci/ng_hci_evnt.c optional netgraph_bluetooth_hci
+netgraph/bluetooth/hci/ng_hci_main.c optional netgraph_bluetooth_hci
+netgraph/bluetooth/hci/ng_hci_misc.c optional netgraph_bluetooth_hci
+netgraph/bluetooth/hci/ng_hci_ulpi.c optional netgraph_bluetooth_hci
+netgraph/bluetooth/l2cap/ng_l2cap_cmds.c optional netgraph_bluetooth_l2cap
+netgraph/bluetooth/l2cap/ng_l2cap_evnt.c optional netgraph_bluetooth_l2cap
+netgraph/bluetooth/l2cap/ng_l2cap_llpi.c optional netgraph_bluetooth_l2cap
+netgraph/bluetooth/l2cap/ng_l2cap_main.c optional netgraph_bluetooth_l2cap
+netgraph/bluetooth/l2cap/ng_l2cap_misc.c optional netgraph_bluetooth_l2cap
+netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c optional netgraph_bluetooth_l2cap
+netgraph/bluetooth/socket/ng_btsocket.c optional netgraph_bluetooth_socket
+netgraph/bluetooth/socket/ng_btsocket_hci_raw.c optional netgraph_bluetooth_socket
+netgraph/bluetooth/socket/ng_btsocket_l2cap.c optional netgraph_bluetooth_socket
+netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c optional netgraph_bluetooth_socket
+netgraph/bluetooth/socket/ng_btsocket_rfcomm.c optional netgraph_bluetooth_socket
netgraph/ng_UI.c optional netgraph_UI
netgraph/ng_async.c optional netgraph_async
netgraph/ng_atmllc.c optional netgraph_atmllc
==== //depot/projects/gdb/sys/conf/files.amd64#6 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.amd64,v 1.30 2004/03/20 19:36:29 alc Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.31 2004/04/23 14:41:23 tjr Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -90,6 +90,9 @@
crypto/des/des_enc.c optional ipsec ipsec_esp
crypto/blowfish/bf_enc.c optional crypto
crypto/des/des_enc.c optional crypto
+crypto/des/des_ecb.c optional netsmbcrypto
+crypto/des/des_enc.c optional netsmbcrypto
+crypto/des/des_setkey.c optional netsmbcrypto
dev/fb/fb.c optional fb
dev/fb/fb.c optional vga
dev/fb/splash.c optional splash
==== //depot/projects/gdb/sys/conf/kern.pre.mk#8 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.50 2004/03/29 01:15:39 kensmith Exp $
+# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.51 2004/04/23 19:48:43 emax Exp $
# Part of a unified Makefile for building kernels. This part contains all
# of the definitions that need to be before %BEFORE_DEPEND.
@@ -63,6 +63,15 @@
# ... and the same for the NgATM stuff
INCLUDES+= -I$S/contrib/ngatm
+# ... and the same for the NgBluetooth stuff
+INCLUDES+= -I$S/netgraph/bluetooth/include
+INCLUDES+= -I$S/netgraph/bluetooth/drivers/bt3c
+INCLUDES+= -I$S/netgraph/bluetooth/drivers/h4
+INCLUDES+= -I$S/netgraph/bluetooth/drivers/ubt
+INCLUDES+= -I$S/netgraph/bluetooth/drivers/ubtbcmfw
+INCLUDES+= -I$S/netgraph/bluetooth/hci
+INCLUDES+= -I$S/netgraph/bluetooth/l2cap
+
COPTS= ${INCLUDES} -D_KERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
.if ${CC} != "icc"
==== //depot/projects/gdb/sys/conf/options#14 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.442 2004/04/21 20:18:06 scottl Exp $
+# $FreeBSD: src/sys/conf/options,v 1.443 2004/04/23 19:48:43 emax Exp $
#
# On the handling of kernel options
#
@@ -383,6 +383,16 @@
NETGRAPH_VJC opt_netgraph.h
NETGRAPH_ATM_ATMPIF opt_netgraph.h
+# NgBluetooth options
+NETGRAPH_BLUETOOTH opt_netgraph.h
+NETGRAPH_BLUETOOTH_BT3C opt_netgraph.h
+NETGRAPH_BLUETOOTH_H4 opt_netgraph.h
+NETGRAPH_BLUETOOTH_UBT opt_netgraph.h
+NETGRAPH_BLUETOOTH_UBTBCMFW opt_netgraph.h
+NETGRAPH_BLUETOOTH_HCI opt_netgraph.h
+NETGRAPH_BLUETOOTH_L2CAP opt_netgraph.h
+NETGRAPH_BLUETOOTH_SOCKET opt_netgraph.h
+
# NgATM options
NGATM_ATM opt_netgraph.h
NGATM_ATMBASE opt_netgraph.h
==== //depot/projects/gdb/sys/dev/gem/if_gem.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.21 2004/03/20 20:12:12 mdodd Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.22 2004/04/23 19:43:35 tmm Exp $");
/*
* Driver for Sun GEM ethernet controllers.
@@ -237,11 +237,11 @@
/* Get RX FIFO size */
sc->sc_rxfifosize = 64 *
bus_space_read_4(sc->sc_bustag, sc->sc_h, GEM_RX_FIFO_SIZE);
- printf(", %uKB RX fifo", sc->sc_rxfifosize / 1024);
/* Get TX FIFO size */
v = bus_space_read_4(sc->sc_bustag, sc->sc_h, GEM_TX_FIFO_SIZE);
- printf(", %uKB TX fifo\n", v / 16);
+ device_printf(sc->sc_dev, "%ukB RX FIFO, %ukB TX FIFO\n",
+ sc->sc_rxfifosize / 1024, v / 16);
/* Initialize ifnet structure. */
ifp->if_softc = sc;
==== //depot/projects/gdb/sys/dev/if_ndis/if_ndis.c#12 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.56 2004/04/22 21:49:18 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.57 2004/04/23 17:15:14 wpaul Exp $");
#include "opt_bdg.h"
@@ -687,9 +687,9 @@
struct ifnet *ifp;
sc = device_get_softc(dev);
- KASSERT(mtx_initialized(sc->ndis_mtx),
+ KASSERT(mtx_initialized(&sc->ndis_mtx),
("ndis mutex not initialized"));
- KASSERT(mtx_initialized(sc->ndis_intrmtx),
+ KASSERT(mtx_initialized(&sc->ndis_intrmtx),
("ndis interrupt mutex not initialized"));
NDIS_LOCK(sc);
ifp = &sc->arpcom.ac_if;
@@ -1032,6 +1032,8 @@
ndis_media_state linkstate;
int error, len;
+ mtx_unlock(&Giant);
+
sc = xsc;
hangfunc = sc->ndis_chars.nmc_checkhang_func;
@@ -1066,6 +1068,8 @@
NDIS_UNLOCK(sc);
+ mtx_lock(&Giant);
+
return;
}
==== //depot/projects/gdb/sys/dev/pccbb/pccbb.c#7 (text+ko) ====
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.108 2004/04/13 14:39:26 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.109 2004/04/23 05:25:13 imp Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -683,9 +683,12 @@
static int
cbb_attach(device_t brdev)
{
+ static int curr_bus_number = 1; /* XXX EVILE BAD (see below) */
struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev);
- int rid;
+ int rid, bus, pribus;
+ device_t parent;
+ parent = device_get_parent(brdev);
mtx_init(&sc->mtx, device_get_nameunit(brdev), "cbb", MTX_DEF);
cv_init(&sc->cv, "cbb cv");
sc->chipset = cbb_chipset(pci_get_devid(brdev), NULL);
@@ -759,6 +762,32 @@
sc->exca.chipset = EXCA_CARDBUS;
cbb_chipinit(sc);
+ /*
+ * This is a gross hack. We should be scanning the entire pci
+ * tree, assigning bus numbers in a way such that we (1) can
+ * reserve 1 extra bus just in case and (2) all sub busses
+ * are in an appropriate range.
+ */
+ bus = pci_read_config(brdev, PCIR_SECBUS_2, 1);
+ pribus = pcib_get_bus(parent);
+ DEVPRINTF((brdev, "Secondary bus is %d\n", bus));
+ if (bus == 0) {
+ if (curr_bus_number < pribus)
+ curr_bus_number = pribus + 1;
+ if (pci_read_config(brdev, PCIR_PRIBUS_2, 1) != pribus) {
+ DEVPRINTF((brdev, "Setting primary bus to %d\n", pribus));
+ pci_write_config(brdev, PCIR_PRIBUS_2, pribus, 1);
+ }
+ bus = curr_bus_number;
+ DEVPRINTF((brdev, "Secondary bus set to %d subbus %d\n", bus,
+ bus + 1));
+ sc->secbus = bus;
+ sc->subbus = bus + 1;
+ pci_write_config(brdev, PCIR_SECBUS_2, bus, 1);
+ pci_write_config(brdev, PCIR_SUBBUS_2, bus + 1, 1);
+ curr_bus_number += 2;
+ }
+
/* attach children */
sc->cbdev = device_add_child(brdev, "cardbus", -1);
if (sc->cbdev == NULL)
==== //depot/projects/gdb/sys/dev/pci/pci.c#8 (text+ko) ====
@@ -25,7 +25,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/dev/pci/pci.c,v 1.247 2004/04/21 20:19:56 imp Exp $
+ * $FreeBSD: src/sys/dev/pci/pci.c,v 1.248 2004/04/23 15:48:48 marius Exp $
*
*/
@@ -825,11 +825,13 @@
if (base == 0)
return 1;
+#ifdef __sparc64__
/* Sun EBus bridges contain the ranges for the devices beyond them */
if ((pci_get_class(dev) == PCIC_BRIDGE) &&
(pci_get_vendor(dev) == 0x108e) &&
(pci_get_device(dev) == 0x1000 || pci_get_device(dev) == 0x1100))
return 1;
+#endif
start = base;
end = base + (1 << ln2size) - 1;
==== //depot/projects/gdb/sys/i386/acpica/acpi_asus.c#2 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_asus.c,v 1.1 2004/04/22 21:29:01 philip Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_asus.c,v 1.2 2004/04/23 17:41:04 philip Exp $");
/*
* Driver for extra ACPI-controlled gadgets (hotkeys, leds, etc) found on
@@ -40,10 +40,6 @@
* Asus laptop which doesn't appear to be supported, or strange things happen
* when using this driver, please report to <acpi at FreeBSD.org>.
*
- * XXX:
- * Led support is disabled for the time being because it causes the kernel to
- * panic when unloading the module. This is being investigated.
- *
*/
#include "opt_acpi.h"
@@ -173,11 +169,9 @@
static int acpi_asus_attach(device_t dev);
static int acpi_asus_detach(device_t dev);
-#ifdef notyet
static void acpi_asus_mled(device_t dev, int state);
static void acpi_asus_tled(device_t dev, int state);
static void acpi_asus_wled(device_t dev, int state);
-#endif
static int acpi_asus_sysctl_brn(SYSCTL_HANDLER_ARGS);
static int acpi_asus_sysctl_lcd(SYSCTL_HANDLER_ARGS);
@@ -285,7 +279,6 @@
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
OID_AUTO, "asus", CTLFLAG_RD, 0, "");
-#ifdef notyet
/* Attach leds */
if (sc->model->mled_set)
sc->s_mled = led_create((led_t *)acpi_asus_mled, dev, "mled");
@@ -295,7 +288,6 @@
if (sc->model->wled_set)
sc->s_wled = led_create((led_t *)acpi_asus_wled, dev, "wled");
-#endif
/* Attach brightness for GPLV/SPLV models */
if (sc->model->brn_get &&
@@ -385,7 +377,6 @@
sc = device_get_softc(dev);
-#ifdef notyet
/* Turn the lights off */
if (sc->model->mled_set)
led_destroy(sc->s_mled);
@@ -395,7 +386,6 @@
if (sc->model->wled_set)
led_destroy(sc->s_wled);
-#endif
/* Remove notify handler */
AcpiRemoveNotifyHandler(sc->handle,
@@ -407,7 +397,6 @@
return (0);
}
-#ifdef notyet
static void
acpi_asus_mled(device_t dev, int state)
{
@@ -467,7 +456,6 @@
AcpiEvaluateObject(sc->handle, sc->model->wled_set, &Args, NULL);
}
-#endif
static int
acpi_asus_sysctl_brn(SYSCTL_HANDLER_ARGS)
==== //depot/projects/gdb/sys/modules/acpi/Makefile#3 (text+ko) ====
@@ -1,5 +1,5 @@
-# $FreeBSD: src/sys/modules/acpi/Makefile,v 1.38 2004/03/01 08:15:26 njl Exp $
+# $FreeBSD: src/sys/modules/acpi/Makefile,v 1.39 2004/04/23 06:29:08 philip Exp $
-SUBDIR= acpi acpi_toshiba acpi_video
+SUBDIR= acpi acpi_asus acpi_toshiba acpi_video
.include <bsd.subdir.mk>
==== //depot/projects/gdb/sys/modules/acpi/acpi_asus/Makefile#2 (text+ko) ====
@@ -1,10 +1,9 @@
-# $FreeBSD: src/sys/modules/acpi/acpi_asus/Makefile,v 1.1 2004/04/22 21:30:56 philip Exp $
+# $FreeBSD: src/sys/modules/acpi/acpi_asus/Makefile,v 1.2 2004/04/23 17:41:05 philip Exp $
-.PATH: ${.CURDIR}/../../../i386/acpica \
- ${.CURDIR}/../../../dev/led
+.PATH: ${.CURDIR}/../../../i386/acpica
KMOD= acpi_asus
CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica
-SRCS= acpi_asus.c led.c opt_acpi.h device_if.h bus_if.h
+SRCS= acpi_asus.c opt_acpi.h device_if.h bus_if.h
.include <bsd.kmod.mk>
==== //depot/projects/gdb/sys/net/if_gre.c#4 (text+ko) ====
@@ -359,7 +359,7 @@
goto end;
}
- if (m == NULL) { /* impossible */
+ if (m == NULL) { /* mbuf allocation failed */
_IF_DROP(&ifp->if_snd);
error = ENOBUFS;
goto end;
@@ -385,8 +385,12 @@
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
- /* send it off */
- error = ip_output(m, NULL, &sc->route, 0,
+ /*
+ * Send it off and with IP_FORWARD flag to prevent it from
+ * overwriting the ip_id again. ip_id is already set to the
+ * ip_id of the encapsulated packet.
+ */
+ error = ip_output(m, NULL, &sc->route, IP_FORWARDING,
(struct ip_moptions *)NULL, (struct inpcb *)NULL);
end:
sc->called = 0;
==== //depot/projects/gdb/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
* SUCH DAMAGE.
*
* $Id: ng_btsocket_rfcomm.c,v 1.28 2003/09/14 23:29:06 max Exp $
- * $FreeBSD: src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c,v 1.4 2004/03/01 03:14:22 rwatson Exp $
+ * $FreeBSD: src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c,v 1.5 2004/04/23 20:21:17 emax Exp $
*/
#include <sys/param.h>
@@ -2065,9 +2065,12 @@
if (dlci == 0) {
/* XXX FIXME assume that remote side will close the socket */
error = ng_btsocket_rfcomm_send_command(s, RFCOMM_FRAME_UA, 0);
- if (error == 0)
- s->state = NG_BTSOCKET_RFCOMM_SESSION_DISCONNECTING;
- else
+ if (error == 0) {
+ if (s->state == NG_BTSOCKET_RFCOMM_SESSION_DISCONNECTING)
+ s->state = NG_BTSOCKET_RFCOMM_SESSION_CLOSED; /* XXX */
+ else
+ s->state = NG_BTSOCKET_RFCOMM_SESSION_DISCONNECTING;
+ } else
s->state = NG_BTSOCKET_RFCOMM_SESSION_CLOSED; /* XXX */
ng_btsocket_rfcomm_session_clean(s);
==== //depot/projects/gdb/sys/netinet/in_pcb.c#6 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/in_pcb.c,v 1.145 2004/04/22 08:34:55 silby Exp $
+ * $FreeBSD: src/sys/netinet/in_pcb.c,v 1.146 2004/04/23 23:29:49 silby Exp $
*/
#include "opt_ipsec.h"
@@ -416,7 +416,8 @@
* counting down
*/
if (ipport_randomized)
- *lastport = first - (arc4random() % (first - last));
+ *lastport = first -
+ (arc4random() % (first - last));
count = first - last;
do {
@@ -433,7 +434,8 @@
* counting up
*/
if (ipport_randomized)
- *lastport = first + (arc4random() % (last - first));
+ *lastport = first +
+ (arc4random() % (last - first));
count = last - first;
do {
==== //depot/projects/gdb/sys/netinet/ip_fw.h#4 (text+ko) ====
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netinet/ip_fw.h,v 1.83 2004/02/25 19:55:28 mlaier Exp $
+ * $FreeBSD: src/sys/netinet/ip_fw.h,v 1.84 2004/04/23 14:27:27 andre Exp $
*/
#ifndef _IPFW2_H
@@ -95,6 +95,7 @@
O_TCPOPTS, /* arg1 = 2*u8 bitmap */
O_VERREVPATH, /* none */
+ O_VERSRCREACH, /* none */
O_PROBE_STATE, /* none */
O_KEEP_STATE, /* none */
==== //depot/projects/gdb/sys/netinet/ip_fw2.c#4 (text+ko) ====
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.56 2004/02/25 19:55:28 mlaier Exp $
+ * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.57 2004/04/23 14:27:27 andre Exp $
*/
#define DEB(x)
@@ -439,21 +439,27 @@
}
/*
+ * The verify_path function checks if a route to the src exists and
+ * if it is reachable via ifp (when provided).
+ *
* The 'verrevpath' option checks that the interface that an IP packet
* arrives on is the same interface that traffic destined for the
- * packet's source address would be routed out of. This is a measure
- * to block forged packets. This is also commonly known as "anti-spoofing"
- * or Unicast Reverse Path Forwarding (Unicast RFP) in Cisco-ese. The
- * name of the knob is purposely reminisent of the Cisco IOS command,
+ * packet's source address would be routed out of. The 'versrcreach'
+ * option just checks that the source address is reachable via any route
+ * (except default) in the routing table. These two are a measure to block
+ * forged packets. This is also commonly known as "anti-spoofing" or Unicast
+ * Reverse Path Forwarding (Unicast RFP) in Cisco-ese. The name of the knobs
+ * is purposely reminiscent of the Cisco IOS command,
*
* ip verify unicast reverse-path
+ * ip verify unicast source reachable-via any
*
* which implements the same functionality. But note that syntax is
* misleading. The check may be performed on all IP packets whether unicast,
* multicast, or broadcast.
*/
static int
-verify_rev_path(struct in_addr src, struct ifnet *ifp)
+verify_path(struct in_addr src, struct ifnet *ifp)
{
struct route ro;
struct sockaddr_in *dst;
@@ -468,10 +474,21 @@
if (ro.ro_rt == NULL)
return 0;
- if ((ifp == NULL) || (ro.ro_rt->rt_ifp->if_index != ifp->if_index)) {
+
+ /* if ifp is provided, check for equality with rtentry */
+ if (ifp != NULL && ro.ro_rt->rt_ifp != ifp) {
+ RTFREE(ro.ro_rt);
+ return 0;
+ }
+
+ /* if no ifp provided, check if rtentry is not default route */
+ if (ifp == NULL &&
+ satosin(rt_key(ro.ro_rt))->sin_addr.s_addr == INADDR_ANY) {
RTFREE(ro.ro_rt);
return 0;
}
+
+ /* found valid route */
RTFREE(ro.ro_rt);
return 1;
}
@@ -1911,7 +1928,13 @@
/* Outgoing packets automatically pass/match */
match = ((oif != NULL) ||
(m->m_pkthdr.rcvif == NULL) ||
- verify_rev_path(src_ip, m->m_pkthdr.rcvif));
+ verify_path(src_ip, m->m_pkthdr.rcvif));
+ break;
+
+ case O_VERSRCREACH:
+ /* Outgoing packets automatically pass/match */
+ match = ((oif != NULL) ||
+ verify_path(src_ip, NULL));
break;
case O_IPSEC:
@@ -2546,6 +2569,7 @@
case O_TCPOPTS:
case O_ESTAB:
case O_VERREVPATH:
+ case O_VERSRCREACH:
case O_IPSEC:
if (cmdlen != F_INSN_SIZE(ipfw_insn))
goto bad_size;
==== //depot/projects/gdb/sys/netinet/tcp_hostcache.c#2 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netinet/tcp_hostcache.c,v 1.3 2003/12/02 21:25:12 andre Exp $
+ * $FreeBSD: src/sys/netinet/tcp_hostcache.c,v 1.4 2004/04/23 13:54:28 andre Exp $
*/
/*
@@ -700,7 +700,7 @@
static void
tcp_hc_purge(void *arg)
{
- struct hc_metrics *hc_entry;
+ struct hc_metrics *hc_entry, *hc_next;
int all = (intptr_t)arg;
int i;
@@ -711,8 +711,8 @@
for (i = 0; i < tcp_hostcache.hashsize; i++) {
THC_LOCK(&tcp_hostcache.hashbase[i].hch_mtx);
- TAILQ_FOREACH(hc_entry, &tcp_hostcache.hashbase[i].hch_bucket,
- rmx_q) {
+ TAILQ_FOREACH_SAFE(hc_entry, &tcp_hostcache.hashbase[i].hch_bucket,
+ rmx_q, hc_next) {
if (all || hc_entry->rmx_expire <= 0) {
TAILQ_REMOVE(&tcp_hostcache.hashbase[i].hch_bucket,
hc_entry, rmx_q);
==== //depot/projects/gdb/sys/netinet/tcp_input.c#5 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.233 2004/04/07 20:46:13 imp Exp $
+ * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.234 2004/04/23 22:44:59 andre Exp $
*/
#include "opt_ipfw.h" /* for ipfw_fwd */
@@ -2793,7 +2793,7 @@
so = inp->inp_socket;
/*
- * no route to sender, take default mss and return
+ * no route to sender, stay with default mss and return
*/
if (maxmtu == 0)
return;
@@ -2851,7 +2851,7 @@
* else, use the link mtu.
*/
if (metrics.rmx_mtu)
- mss = metrics.rmx_mtu - min_protoh;
+ mss = min(metrics.rmx_mtu, maxmtu) - min_protoh;
else {
#ifdef INET6
if (isipv6) {
==== //depot/projects/gdb/sys/powerpc/powermac/ata_kauai.c#4 (text+ko) ====
@@ -26,7 +26,7 @@
*
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/powerpc/powermac/ata_kauai.c,v 1.3 2004/03/31 07:40:46 grehan Exp $");
+__FBSDID("$FreeBSD: src/sys/powerpc/powermac/ata_kauai.c,v 1.4 2004/04/23 23:39:53 grehan Exp $");
/*
* Mac 'Kauai' PCI ATA controller
@@ -169,6 +169,7 @@
}
ch = device_get_softc(dev);
+ bzero(ch, sizeof(struct ata_channel));
rid = PCIR_BARS;
mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
@@ -192,6 +193,7 @@
ch->locking = ata_kauai_locknoop;
ch->device[MASTER].setmode = ata_kauai_setmode;
ch->device[SLAVE].setmode = ata_kauai_setmode;
+ ata_generic_hw(ch);
return (ata_probe(dev));
}
==== //depot/projects/gdb/sys/powerpc/powermac/ata_macio.c#3 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/powerpc/powermac/ata_macio.c,v 1.9 2004/01/15 23:52:32 grehan Exp $
+ * $FreeBSD: src/sys/powerpc/powermac/ata_macio.c,v 1.10 2004/04/23 23:39:53 grehan Exp $
*/
/*
@@ -50,9 +50,9 @@
#include <dev/ofw/openfirm.h>
#include <powerpc/powermac/maciovar.h>
-/*
+/*
* Offset to control registers from base
-*/
+ */
#define ATA_MACIO_ALTOFFSET 0x160
/*
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list