PERFORCE change 114338 for review
Matt Jacob
mjacob at FreeBSD.org
Sat Feb 10 03:57:46 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=114338
Change 114338 by mjacob at mjexp on 2007/02/10 03:56:54
IFC
Affected files ...
.. //depot/projects/mjexp/UPDATING#5 integrate
.. //depot/projects/mjexp/etc/defaults/rc.conf#5 integrate
.. //depot/projects/mjexp/etc/network.subr#4 integrate
.. //depot/projects/mjexp/etc/periodic/security/800.loginfail#2 integrate
.. //depot/projects/mjexp/etc/rc.d/netif#3 integrate
.. //depot/projects/mjexp/lib/libarchive/archive_read.c#7 integrate
.. //depot/projects/mjexp/lib/libarchive/archive_read_support_compression_none.c#6 integrate
.. //depot/projects/mjexp/lib/libkvm/kvm_getswapinfo.c#2 integrate
.. //depot/projects/mjexp/libexec/ftpd/ftpd.c#2 integrate
.. //depot/projects/mjexp/release/doc/de_DE.ISO8859-1/installation/common/install.sgml#2 integrate
.. //depot/projects/mjexp/release/doc/en_US.ISO8859-1/installation/common/install.sgml#2 integrate
.. //depot/projects/mjexp/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml#2 integrate
.. //depot/projects/mjexp/release/doc/ru_RU.KOI8-R/installation/common/install.sgml#2 integrate
.. //depot/projects/mjexp/release/doc/zh_CN.GB2312/installation/common/install.sgml#3 integrate
.. //depot/projects/mjexp/sbin/dhclient/clparse.c#2 integrate
.. //depot/projects/mjexp/sbin/dhclient/dhclient-script#2 integrate
.. //depot/projects/mjexp/sbin/dhclient/dhclient.c#3 integrate
.. //depot/projects/mjexp/sbin/dhclient/dhclient.conf#2 integrate
.. //depot/projects/mjexp/sbin/dhclient/dhcp.h#2 integrate
.. //depot/projects/mjexp/sbin/dhclient/tables.c#2 integrate
.. //depot/projects/mjexp/sbin/ifconfig/ifconfig.8#7 integrate
.. //depot/projects/mjexp/sbin/mount/mount.c#5 integrate
.. //depot/projects/mjexp/share/man/man4/ata.4#4 integrate
.. //depot/projects/mjexp/share/man/man4/bce.4#5 integrate
.. //depot/projects/mjexp/share/man/man4/enc.4#2 integrate
.. //depot/projects/mjexp/share/man/man4/icmp.4#2 integrate
.. //depot/projects/mjexp/share/man/man4/joy.4#3 integrate
.. //depot/projects/mjexp/share/man/man4/man4.i386/fe.4#2 integrate
.. //depot/projects/mjexp/share/man/man4/ng_bt3c.4#2 integrate
.. //depot/projects/mjexp/share/man/man4/tun.4#4 integrate
.. //depot/projects/mjexp/share/man/man4/uark.4#2 integrate
.. //depot/projects/mjexp/share/man/man4/ubsa.4#3 integrate
.. //depot/projects/mjexp/share/man/man5/linsysfs.5#4 integrate
.. //depot/projects/mjexp/share/man/man5/rc.conf.5#7 integrate
.. //depot/projects/mjexp/share/man/man9/device_set_driver.9#2 integrate
.. //depot/projects/mjexp/share/man/man9/firmware.9#2 integrate
.. //depot/projects/mjexp/share/man/man9/ieee80211_ioctl.9#2 integrate
.. //depot/projects/mjexp/share/syscons/keymaps/hr.iso.kbd#2 integrate
.. //depot/projects/mjexp/sys/amd64/amd64/mp_machdep.c#5 integrate
.. //depot/projects/mjexp/sys/amd64/conf/GENERIC#7 integrate
.. //depot/projects/mjexp/sys/amd64/include/gdb_machdep.h#2 integrate
.. //depot/projects/mjexp/sys/amd64/include/pcpu.h#2 integrate
.. //depot/projects/mjexp/sys/arm/arm/pmap.c#4 integrate
.. //depot/projects/mjexp/sys/arm/at91/at91_twi.c#5 integrate
.. //depot/projects/mjexp/sys/arm/at91/if_ate.c#6 integrate
.. //depot/projects/mjexp/sys/arm/conf/EP80219#3 integrate
.. //depot/projects/mjexp/sys/conf/NOTES#11 integrate
.. //depot/projects/mjexp/sys/conf/files#11 integrate
.. //depot/projects/mjexp/sys/conf/files.powerpc#4 integrate
.. //depot/projects/mjexp/sys/conf/options#10 integrate
.. //depot/projects/mjexp/sys/dev/isp/isp_pci.c#10 integrate
.. //depot/projects/mjexp/sys/dev/mii/rlphy.c#6 integrate
.. //depot/projects/mjexp/sys/dev/pci/pci.c#9 integrate
.. //depot/projects/mjexp/sys/dev/usb/ubsa.c#4 integrate
.. //depot/projects/mjexp/sys/dev/usb/usbdevs#6 integrate
.. //depot/projects/mjexp/sys/fs/cd9660/TODO#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/TODO.hibler#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_bmap.c#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_iconv.c#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_lookup.c#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_mount.h#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_node.c#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_node.h#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_rrip.c#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_rrip.h#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_util.c#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_vfsops.c#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/cd9660_vnops.c#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/iso.h#1 branch
.. //depot/projects/mjexp/sys/fs/cd9660/iso_rrip.h#1 branch
.. //depot/projects/mjexp/sys/fs/msdosfs/msdosfs_vfsops.c#6 integrate
.. //depot/projects/mjexp/sys/fs/procfs/procfs.c#2 integrate
.. //depot/projects/mjexp/sys/geom/geom_apple.c#2 delete
.. //depot/projects/mjexp/sys/geom/geom_gpt.c#3 delete
.. //depot/projects/mjexp/sys/geom/part/g_part.c#1 branch
.. //depot/projects/mjexp/sys/geom/part/g_part.h#1 branch
.. //depot/projects/mjexp/sys/geom/part/g_part_apm.c#1 branch
.. //depot/projects/mjexp/sys/geom/part/g_part_gpt.c#1 branch
.. //depot/projects/mjexp/sys/geom/part/g_part_if.m#1 branch
.. //depot/projects/mjexp/sys/i386/conf/GENERIC#5 integrate
.. //depot/projects/mjexp/sys/i386/i386/mp_machdep.c#5 integrate
.. //depot/projects/mjexp/sys/i386/include/pcpu.h#2 integrate
.. //depot/projects/mjexp/sys/ia64/conf/DEFAULTS#4 integrate
.. //depot/projects/mjexp/sys/ia64/conf/GENERIC#4 integrate
.. //depot/projects/mjexp/sys/kern/kern_sig.c#8 integrate
.. //depot/projects/mjexp/sys/kern/kern_switch.c#6 integrate
.. //depot/projects/mjexp/sys/kern/sched_ule.c#10 integrate
.. //depot/projects/mjexp/sys/kern/subr_witness.c#5 integrate
.. //depot/projects/mjexp/sys/kern/uipc_usrreq.c#5 integrate
.. //depot/projects/mjexp/sys/modules/geom/Makefile#5 integrate
.. //depot/projects/mjexp/sys/modules/ip_mroute_mod/Makefile#2 integrate
.. //depot/projects/mjexp/sys/net/if_loop.c#2 integrate
.. //depot/projects/mjexp/sys/net/if_tap.c#4 integrate
.. //depot/projects/mjexp/sys/net/if_tun.c#5 integrate
.. //depot/projects/mjexp/sys/netgraph/ng_ksocket.c#2 integrate
.. //depot/projects/mjexp/sys/netinet/ip_mroute.c#4 integrate
.. //depot/projects/mjexp/sys/netinet/ip_mroute.h#2 integrate
.. //depot/projects/mjexp/sys/netinet6/ah_core.c#2 integrate
.. //depot/projects/mjexp/sys/netsmb/smb_dev.c#2 integrate
.. //depot/projects/mjexp/sys/pc98/conf/GENERIC#4 integrate
.. //depot/projects/mjexp/sys/powerpc/conf/DEFAULTS#4 integrate
.. //depot/projects/mjexp/sys/powerpc/conf/GENERIC#4 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_framework.h#5 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_inet.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_internal.h#4 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_label.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_pipe.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_policy.h#2 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_posix_sem.c#5 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_system.c#5 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_sysv_msg.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_sysv_sem.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_sysv_shm.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac/mac_vfs.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac_biba/mac_biba.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac_bsdextended/mac_bsdextended.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac_ifoff/mac_ifoff.c#3 integrate
.. //depot/projects/mjexp/sys/security/mac_lomac/mac_lomac.c#5 integrate
.. //depot/projects/mjexp/sys/security/mac_mls/mac_mls.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac_none/mac_none.c#3 integrate
.. //depot/projects/mjexp/sys/security/mac_partition/mac_partition.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac_portacl/mac_portacl.c#5 integrate
.. //depot/projects/mjexp/sys/security/mac_seeotheruids/mac_seeotheruids.c#4 integrate
.. //depot/projects/mjexp/sys/security/mac_stub/mac_stub.c#5 integrate
.. //depot/projects/mjexp/sys/security/mac_test/mac_test.c#4 integrate
.. //depot/projects/mjexp/sys/sparc64/conf/GENERIC#4 integrate
.. //depot/projects/mjexp/sys/sun4v/conf/GENERIC#4 integrate
.. //depot/projects/mjexp/sys/sys/_label.h#2 delete
.. //depot/projects/mjexp/sys/sys/apm.h#1 branch
.. //depot/projects/mjexp/sys/sys/mac.h#3 integrate
.. //depot/projects/mjexp/sys/sys/param.h#8 integrate
.. //depot/projects/mjexp/sys/sys/runq.h#4 integrate
.. //depot/projects/mjexp/sys/ufs/ufs/ufs_vnops.c#6 integrate
.. //depot/projects/mjexp/sys/vm/swap_pager.c#5 integrate
.. //depot/projects/mjexp/sys/vm/swap_pager.h#2 integrate
.. //depot/projects/mjexp/sys/vm/vm_contig.c#5 integrate
.. //depot/projects/mjexp/sys/vm/vm_page.c#5 integrate
.. //depot/projects/mjexp/sys/vm/vm_pageout.c#4 integrate
.. //depot/projects/mjexp/sys/vm/vm_pageq.c#2 integrate
.. //depot/projects/mjexp/sys/vm/vm_zeroidle.c#5 integrate
.. //depot/projects/mjexp/tools/tools/netrate/netsend/netsend.c#2 integrate
.. //depot/projects/mjexp/tools/tools/umastat/umastat.c#2 integrate
.. //depot/projects/mjexp/usr.bin/ctags/C.c#2 integrate
.. //depot/projects/mjexp/usr.bin/ctags/fortran.c#2 integrate
.. //depot/projects/mjexp/usr.bin/ctags/tree.c#2 integrate
.. //depot/projects/mjexp/usr.bin/getent/getent.c#2 integrate
.. //depot/projects/mjexp/usr.bin/mklocale/yacc.y#2 integrate
.. //depot/projects/mjexp/usr.bin/ncplist/ncplist.c#2 integrate
.. //depot/projects/mjexp/usr.bin/ncplogin/ncplogin.c#2 integrate
.. //depot/projects/mjexp/usr.bin/tar/write.c#4 integrate
.. //depot/projects/mjexp/usr.sbin/apmd/apmd.c#2 integrate
.. //depot/projects/mjexp/usr.sbin/apmd/contrib/pccardq.c#2 integrate
.. //depot/projects/mjexp/usr.sbin/iostat/iostat.c#2 integrate
.. //depot/projects/mjexp/usr.sbin/ngctl/dot.c#2 integrate
.. //depot/projects/mjexp/usr.sbin/ngctl/list.c#2 integrate
.. //depot/projects/mjexp/usr.sbin/ngctl/main.c#2 integrate
.. //depot/projects/mjexp/usr.sbin/ngctl/show.c#2 integrate
.. //depot/projects/mjexp/usr.sbin/pciconf/pciconf.8#3 integrate
.. //depot/projects/mjexp/usr.sbin/pkg_install/info/show.c#2 integrate
.. //depot/projects/mjexp/usr.sbin/setfmac/setfmac.c#2 integrate
Differences ...
==== //depot/projects/mjexp/UPDATING#5 (text+ko) ====
@@ -21,6 +21,15 @@
developers choose to disable these features on build machines
to maximize performance.
+20070207:
+ Support for IPIP tunnels (VIFF_TUNNEL) in IPv4 multicast routing
+ has been removed. Its functionality may be achieved by explicitly
+ configuring gif(4) interfaces and using the 'phyint' keyword in
+ mrouted.conf.
+ XORP does not support source-routed IPv4 multicast tunnels nor the
+ integrated IPIP tunneling, therefore it is not affected by this
+ change. The __FreeBSD_version macro has been bumped to 700030.
+
20061221:
Support for PCI Message Signalled Interrupts has been
re-enabled in the bge driver, only for those chips which are
@@ -703,4 +712,4 @@
Contact Warner Losh if you have any questions about your use of
this document.
-$FreeBSD: src/UPDATING,v 1.470 2006/12/22 03:03:31 jdp Exp $
+$FreeBSD: src/UPDATING,v 1.471 2007/02/07 16:04:11 bms Exp $
==== //depot/projects/mjexp/etc/defaults/rc.conf#5 (text+ko) ====
@@ -15,7 +15,7 @@
# For a more detailed explanation of all the rc.conf variables, please
# refer to the rc.conf(5) manual page.
#
-# $FreeBSD: src/etc/defaults/rc.conf,v 1.303 2007/01/20 04:24:19 mpp Exp $
+# $FreeBSD: src/etc/defaults/rc.conf,v 1.304 2007/02/09 12:11:27 flz Exp $
##############################################################
### Important initial Boot-time options ####################
@@ -178,11 +178,15 @@
sppp_interfaces="" # List of sppp interfaces.
#sppp_interfaces="isp0" # example: sppp over ISDN
#spppconfig_isp0="authproto=chap myauthname=foo myauthsecret='top secret' hisauthname=some-gw hisauthsecret='another secret'"
-gif_interfaces="NO" # List of GIF tunnels (or "NO").
+gif_interfaces="" # List of GIF tunnels.
#gif_interfaces="gif0 gif1" # Examples typically for a router.
# Choose correct tunnel addrs.
#gifconfig_gif0="10.1.1.1 10.1.2.1" # Examples typically for a router.
#gifconfig_gif1="10.1.1.2 10.1.2.2" # Examples typically for a router.
+fec_interfaces="" # List of Fast EtherChannels.
+#fec_interfaces="fec0 fec1"
+#fecconfig_fec0="fxp0 dc0" # Examples typically for two NICs
+#fecconfig_fec1="em0 em1 bge0 bge1" # Examples typically for four NICs
# User ppp configuration.
ppp_enable="NO" # Start user-ppp (or NO).
==== //depot/projects/mjexp/etc/network.subr#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/etc/network.subr,v 1.176 2006/10/29 13:29:49 mlaier Exp $
+# $FreeBSD: src/etc/network.subr,v 1.177 2007/02/09 12:11:26 flz Exp $
#
#
@@ -455,26 +455,89 @@
debug "Destroyed clones: ${_list}"
}
+# Create netgraph nodes.
+#
+ng_mkpeer() {
+ ngctl -f - 2> /dev/null <<EOF
+mkpeer $*
+msg dummy nodeinfo
+EOF
+}
+
+ng_create_one() {
+ ng_mkpeer $* | while read line; do
+ t=`expr "${line}" : '.* name="\([a-z]*[0-9]*\)" .*'`
+ if [ -n "${t}" ]; then
+ echo ${t}
+ return
+ fi
+ done
+}
+
gif_up() {
+ # The following must be removed once RELENG_7 is branched.
case ${gif_interfaces} in
- [Nn][Oo] | '')
+ [Nn][Oo])
+ warn "gif_interfaces=\"NO\" is deprecated, use gif_interfaces=\"\" instead."
+ gif_interfaces=""
;;
- *)
- for i in ${gif_interfaces}; do
- peers=`get_if_var $i gifconfig_IF`
- case ${peers} in
+ esac
+
+ for i in ${gif_interfaces}; do
+ peers=`get_if_var $i gifconfig_IF`
+ case ${peers} in
+ '')
+ continue
+ ;;
+ *)
+ ifconfig $i create >/dev/null 2>&1
+ ifconfig $i tunnel ${peers}
+ ifconfig $i up
+ ;;
+ esac
+ done
+}
+
+# ng_fec_create ifn
+# Configure Fast EtherChannel for interface $ifn. Returns 0 if FEC
+# arguments were found and configured; returns !0 otherwise.
+ng_fec_create() {
+ local req_iface iface bogus
+ req_iface="$1"
+
+ ngctl shutdown ${req_iface}: > /dev/null 2>&1
+
+ bogus=""
+ while true; do
+ iface=`ng_create_one fec dummy fec`
+ if [ -z "${iface}" ]; then
+ exit 2
+ fi
+ if [ "${iface}" = "${req_iface}" ]; then
+ break
+ fi
+ bogus="${bogus} ${iface}"
+ done
+
+ for iface in ${bogus}; do
+ ngctl shutdown ${iface}:
+ done
+}
+
+fec_up() {
+ for i in ${fec_interfaces}; do
+ ng_fec_create $i
+ for j in `get_if_var $i fecconfig_IF`; do
+ case ${j} in
'')
continue
;;
*)
- ifconfig $i create >/dev/null 2>&1
- ifconfig $i tunnel ${peers}
- ifconfig $i up
+ ngctl msg ${i}: add_iface "\"${j}\""
;;
esac
done
- ;;
- esac
+ done
}
#
==== //depot/projects/mjexp/etc/periodic/security/800.loginfail#2 (text+ko) ====
@@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD: src/etc/periodic/security/800.loginfail,v 1.6 2006/03/05 15:45:38 matteo Exp $
+# $FreeBSD: src/etc/periodic/security/800.loginfail,v 1.7 2007/02/05 16:36:25 jdp Exp $
#
# Show login failures
@@ -59,7 +59,7 @@
[Yy][Ee][Ss])
echo ""
echo "${host} login failures:"
- n=$(catmsgs | grep -ia "^$yesterday.*(fail|invalid|bad|illegal)" |
+ n=$(catmsgs | egrep -ia "^$yesterday.*(fail|invalid|bad|illegal)" |
tee /dev/stderr | wc -l)
[ $n -gt 0 ] && rc=1 || rc=0;;
*) rc=0;;
==== //depot/projects/mjexp/etc/rc.d/netif#3 (text+ko) ====
@@ -22,7 +22,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/etc/rc.d/netif,v 1.21 2006/12/30 22:53:20 yar Exp $
+# $FreeBSD: src/etc/rc.d/netif,v 1.22 2007/02/09 12:11:26 flz Exp $
#
# PROVIDE: netif
@@ -57,6 +57,9 @@
# Create cloned interfaces
clone_up
+ # Create Fast EtherChannel interfaces
+ fec_up
+
# Create IPv6<-->IPv4 tunnels
gif_up
==== //depot/projects/mjexp/lib/libarchive/archive_read.c#7 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.28 2007/02/01 06:18:16 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.29 2007/02/05 16:30:40 cperciva Exp $");
#ifdef HAVE_ERRNO_H
#include <errno.h>
@@ -65,10 +65,8 @@
unsigned char *nulls;
a = (struct archive *)malloc(sizeof(*a));
- if (a == NULL) {
- archive_set_error(a, ENOMEM, "Can't allocate archive object");
+ if (a == NULL)
return (NULL);
- }
memset(a, 0, sizeof(*a));
a->user_uid = geteuid();
==== //depot/projects/mjexp/lib/libarchive/archive_read_support_compression_none.c#6 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_none.c,v 1.13 2007/01/09 08:05:55 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_none.c,v 1.14 2007/02/05 16:30:40 cperciva Exp $");
#include <assert.h>
#ifdef HAVE_ERRNO_H
@@ -301,7 +301,11 @@
/*
* If a client_skipper was provided, try that first.
*/
+#if ARCHIVE_API_VERSION < 2
if ((a->client_skipper != NULL) && (request < SSIZE_MAX)) {
+#else
+ if (a->client_skipper != NULL) {
+#endif
bytes_skipped = (a->client_skipper)(a, a->client_data,
request);
if (bytes_skipped < 0) { /* error */
@@ -333,7 +337,8 @@
if (bytes_read == 0) {
/* We hit EOF before we satisfied the skip request. */
archive_set_error(a, ARCHIVE_ERRNO_MISC,
- "Truncated input file (need to skip %d bytes)", (int)request);
+ "Truncated input file (need to skip %jd bytes)",
+ (intmax_t)request);
return (ARCHIVE_FATAL);
}
assert(bytes_read >= 0); /* precondition for cast below */
==== //depot/projects/mjexp/lib/libkvm/kvm_getswapinfo.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libkvm/kvm_getswapinfo.c,v 1.26 2004/07/31 18:49:53 imp Exp $");
+__FBSDID("$FreeBSD: src/lib/libkvm/kvm_getswapinfo.c,v 1.27 2007/02/07 17:43:10 jhb Exp $");
#include <sys/param.h>
#include <sys/time.h>
@@ -33,6 +33,7 @@
#include <sys/blist.h>
#include <sys/sysctl.h>
+#include <vm/swap_pager.h>
#include <vm/vm_param.h>
#include <err.h>
@@ -49,18 +50,34 @@
#include "kvm_private.h"
-#define NL_SWAPBLIST 0
-#define NL_SWDEVT 1
-#define NL_NSWDEV 2
-#define NL_DMMAX 3
+static struct nlist kvm_swap_nl[] = {
+ { "_swtailq" }, /* list of swap devices and sizes */
+ { "_dmmax" }, /* maximum size of a swap block */
+ { NULL }
+};
+
+#define NL_SWTAILQ 0
+#define NL_DMMAX 1
static int kvm_swap_nl_cached = 0;
static int unswdev; /* number of found swap dev's */
static int dmmax;
+static int kvm_getswapinfo_kvm(kvm_t *, struct kvm_swap *, int, int);
static int kvm_getswapinfo_sysctl(kvm_t *, struct kvm_swap *, int, int);
+static int nlist_init(kvm_t *);
static int getsysctl(kvm_t *, char *, void *, size_t);
+#define KREAD(kd, addr, obj) \
+ (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj))
+#define KGET(idx, var) \
+ KGET2(kvm_swap_nl[(idx)].n_value, var, kvm_swap_nl[(idx)].n_name)
+#define KGET2(addr, var, msg) \
+ if (KREAD(kd, (u_long)(addr), (var))) { \
+ _kvm_err(kd, kd->program, "cannot read %s", msg); \
+ return (-1); \
+ }
+
#define GETSWDEVNAME(dev, str, flags) \
if (dev == NODEV) { \
strlcpy(str, "[NFS swap]", sizeof(str)); \
@@ -91,8 +108,50 @@
if (ISALIVE(kd)) {
return kvm_getswapinfo_sysctl(kd, swap_ary, swap_max, flags);
} else {
- return -1;
+ return kvm_getswapinfo_kvm(kd, swap_ary, swap_max, flags);
+ }
+}
+
+int
+kvm_getswapinfo_kvm(
+ kvm_t *kd,
+ struct kvm_swap *swap_ary,
+ int swap_max,
+ int flags
+) {
+ int i, ttl;
+ TAILQ_HEAD(, swdevt) swtailq;
+ struct swdevt *sp, swinfo;
+ struct kvm_swap tot;
+
+ if (!nlist_init(kd))
+ return (-1);
+
+ bzero(&tot, sizeof(tot));
+ KGET(NL_SWTAILQ, &swtailq);
+ sp = TAILQ_FIRST(&swtailq);
+ for (i = 0; sp != NULL; i++) {
+ KGET2(sp, &swinfo, "swinfo");
+ ttl = swinfo.sw_nblks - dmmax;
+ if (i < swap_max - 1) {
+ bzero(&swap_ary[i], sizeof(swap_ary[i]));
+ swap_ary[i].ksw_total = ttl;
+ swap_ary[i].ksw_used = swinfo.sw_used;
+ swap_ary[i].ksw_flags = swinfo.sw_flags;
+ GETSWDEVNAME(swinfo.sw_dev, swap_ary[i].ksw_devname,
+ flags);
+ }
+ tot.ksw_total += ttl;
+ tot.ksw_used += swinfo.sw_used;
+ sp = TAILQ_NEXT(&swinfo, sw_list);
}
+
+ if (i >= swap_max)
+ i = swap_max - 1;
+ if (i >= 0)
+ swap_ary[i] = tot;
+
+ return(i);
}
#define GETSYSCTL(kd, name, var) \
@@ -168,6 +227,36 @@
}
static int
+nlist_init(kvm_t *kd)
+{
+ TAILQ_HEAD(, swdevt) swtailq;
+ struct swdevt *sp, swinfo;
+
+ if (kvm_swap_nl_cached)
+ return (1);
+
+ if (kvm_nlist(kd, kvm_swap_nl) < 0)
+ return (0);
+
+ /* Required entries */
+ if (kvm_swap_nl[NL_SWTAILQ].n_value == 0) {
+ _kvm_err(kd, kd->program, "unable to find swtailq");
+ return (0);
+ }
+
+ if (kvm_swap_nl[NL_DMMAX].n_value == 0) {
+ _kvm_err(kd, kd->program, "unable to find dmmax");
+ return (0);
+ }
+
+ /* Get globals, type of swap */
+ KGET(NL_DMMAX, &dmmax);
+
+ kvm_swap_nl_cached = 1;
+ return (1);
+}
+
+static int
getsysctl (
kvm_t *kd,
char *name,
==== //depot/projects/mjexp/libexec/ftpd/ftpd.c#2 (text+ko) ====
@@ -46,7 +46,7 @@
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.210 2006/03/01 16:13:17 ume Exp $");
+__FBSDID("$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.211 2007/02/09 17:18:39 yar Exp $");
/*
* FTP server.
@@ -1871,20 +1871,12 @@
#ifdef TCP_NOPUSH
/*
* Turn off push flag to keep sender TCP from sending short packets
- * at the boundaries of each write(). Should probably do a SO_SNDBUF
- * to set the send buffer size as well, but that may not be desirable
- * in heavy-load situations.
+ * at the boundaries of each write().
*/
on = 1;
if (setsockopt(s, IPPROTO_TCP, TCP_NOPUSH, &on, sizeof on) < 0)
syslog(LOG_WARNING, "data setsockopt (TCP_NOPUSH): %m");
#endif
-#ifdef SO_SNDBUF
- on = 65536;
- if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &on, sizeof on) < 0)
- syslog(LOG_WARNING, "data setsockopt (SO_SNDBUF): %m");
-#endif
-
return (fdopen(s, mode));
bad:
/* Return the real value of errno (close may change it) */
==== //depot/projects/mjexp/release/doc/de_DE.ISO8859-1/installation/common/install.sgml#2 (text+ko) ====
@@ -1,6 +1,6 @@
<!--
-$FreeBSD: src/release/doc/de_DE.ISO8859-1/installation/common/install.sgml,v 1.11 2003/05/27 16:11:09 alex Exp $
+$FreeBSD: src/release/doc/de_DE.ISO8859-1/installation/common/install.sgml,v 1.12 2007/02/08 05:04:17 rodrigc Exp $
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/installation/common/install.sgml,v 1.18 2003/05/24 19:11:45 ue Exp $
basiert auf: 1.20
@@ -1104,7 +1104,7 @@
Sie auf logische Laufwerke genauso wie auf jedes andere
DOS-Laufwerk zugreifen:</para>
- <screen>&prompt.root; <userinput>mount -t msdos /dev/da0s5 /dos_d</userinput></screen>
+ <screen>&prompt.root; <userinput>mount -t msdosfs /dev/da0s5 /dos_d</userinput></screen>
</answer>
</qandaentry>
==== //depot/projects/mjexp/release/doc/en_US.ISO8859-1/installation/common/install.sgml#2 (text+ko) ====
@@ -1,6 +1,6 @@
<!--
-$FreeBSD: src/release/doc/en_US.ISO8859-1/installation/common/install.sgml,v 1.33 2006/05/20 22:48:54 simon Exp $
+$FreeBSD: src/release/doc/en_US.ISO8859-1/installation/common/install.sgml,v 1.34 2007/02/08 05:04:18 rodrigc Exp $
install.sgml
@@ -941,7 +941,7 @@
partitions exactly like you would mount any other DOS drive,
e.g.:</para>
- <screen>&prompt.root; <userinput>mount -t msdos /dev/da0s5 /dos_d</userinput></screen>
+ <screen>&prompt.root; <userinput>mount -t msdosfs /dev/da0s5 /dos_d</userinput></screen>
</answer>
</qandaentry>
==== //depot/projects/mjexp/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml#2 (text+ko) ====
@@ -3,7 +3,7 @@
The FreeBSD French Documentation Project
$Id$
- $FreeBSD: src/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml,v 1.8 2002/11/01 20:12:25 gioria Exp $
+ $FreeBSD: src/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml,v 1.9 2007/02/08 05:04:18 rodrigc Exp $
Original revision: 1.14
This file has architecture-dependent installation instructions, culled
@@ -880,7 +880,7 @@
<literal>ad</literal>. Montez ensuite la partition comme une
partition DOS standard, e.g.:</para>
- <screen>&prompt.root; <userinput>mount -t msdos /dev/da0s5 /dos_d</userinput></screen>
+ <screen>&prompt.root; <userinput>mount -t msdosfs /dev/da0s5 /dos_d</userinput></screen>
</answer>
</qandaentry>
==== //depot/projects/mjexp/release/doc/ru_RU.KOI8-R/installation/common/install.sgml#2 (text+ko) ====
@@ -1,7 +1,7 @@
<!--
The FreeBSD Russian Documentation Project
-$FreeBSD: src/release/doc/ru_RU.KOI8-R/installation/common/install.sgml,v 1.8 2005/06/30 11:35:03 den Exp $
+$FreeBSD: src/release/doc/ru_RU.KOI8-R/installation/common/install.sgml,v 1.9 2007/02/08 05:04:18 rodrigc Exp $
$FreeBSDru: frdp/release/doc/ru_RU.KOI8-R/installation/common/install.sgml,v 1.8 2005/06/30 11:12:32 den Exp $
Original revision: 1.32
@@ -943,7 +943,7 @@
éÎÙÍÉ ÓÌÏ×ÁÍÉ, ÒÁÓÛÉÒÅÎÎÙÅ ÒÁÚÄÅÌÙ ÍÏÎÔÉÒÕÀÔÓÑ ÔÁË ÖÅ, ËÁË É
ÌÀÂÙÅ ÄÒÕÇÉÅ DOS ÄÉÓËÉ, Ô.Å.:</para>
- <screen>&prompt.root; <userinput>mount -t msdos /dev/da0s5 /dos_d</userinput></screen>
+ <screen>&prompt.root; <userinput>mount -t msdosfs /dev/da0s5 /dos_d</userinput></screen>
</answer>
</qandaentry>
==== //depot/projects/mjexp/release/doc/zh_CN.GB2312/installation/common/install.sgml#3 (text+ko) ====
@@ -3,7 +3,7 @@
The FreeBSD Simplified Chinese Project
Original Revision: 1.33
-$FreeBSD: src/release/doc/zh_CN.GB2312/installation/common/install.sgml,v 1.5 2006/10/11 07:49:06 delphij Exp $
+$FreeBSD: src/release/doc/zh_CN.GB2312/installation/common/install.sgml,v 1.6 2007/02/08 05:04:18 rodrigc Exp $
install.sgml
@@ -802,7 +802,7 @@
SCSI Çý¶¯Æ÷ 0 ÉÏ¡£ ¶ÔÓÚ IDE Çý¶¯Æ÷£¬ ÏàÓ¦µØÓà <literal>ad</literal> »»µô
<literal>da</literal>¡£ Äú¿ÉÒÔ°´ÏÂÃæµÄ·½·¨À´¹Ò½ÓÆäËü DOS Çý¶¯Æ÷£º</para>
- <screen>&prompt.root; <userinput>mount -t msdos /dev/da0s5 /dos_d</userinput></screen>
+ <screen>&prompt.root; <userinput>mount -t msdosfs /dev/da0s5 /dos_d</userinput></screen>
</answer>
</qandaentry>
==== //depot/projects/mjexp/sbin/dhclient/clparse.c#2 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/dhclient/clparse.c,v 1.2 2005/08/23 23:59:55 brooks Exp $");
+__FBSDID("$FreeBSD: src/sbin/dhclient/clparse.c,v 1.3 2007/02/09 17:50:26 emaste Exp $");
#include "dhcpd.h"
#include "dhctoken.h"
@@ -90,6 +90,8 @@
top_level_config.requested_options
[top_level_config.requested_option_count++] = DHO_TIME_OFFSET;
top_level_config.requested_options
+ [top_level_config.requested_option_count++] = DHO_CLASSLESS_ROUTES;
+ top_level_config.requested_options
[top_level_config.requested_option_count++] = DHO_ROUTERS;
top_level_config.requested_options
[top_level_config.requested_option_count++] = DHO_DOMAIN_NAME;
==== //depot/projects/mjexp/sbin/dhclient/dhclient-script#2 (text+ko) ====
@@ -1,7 +1,7 @@
#!/bin/sh
#
# $OpenBSD: dhclient-script,v 1.6 2004/05/06 18:22:41 claudio Exp $
-# $FreeBSD: src/sbin/dhclient/dhclient-script,v 1.14 2006/01/26 21:05:39 brooks Exp $
+# $FreeBSD: src/sbin/dhclient/dhclient-script,v 1.15 2007/02/09 17:50:26 emaste Exp $
#
# Copyright (c) 2003 Kenneth R Westerback <krw at openbsd.org>
#
@@ -86,8 +86,43 @@
fi
}
+fill_classless_routes() {
+ set $1
+ while [ $# -gt 5 ]; do
+ if [ $1 -eq 0 ]; then
+ route="default"
+ elif [ $1 -le 8 ]; then
+ route="$2.0.0.0/$1"
+ shift
+ elif [ $1 -le 16 ]; then
+ route="$2.$3.0.0/$1"
+ shift; shift
+ elif [ $1 -le 24 ]; then
+ route="$2.$3.$4.0/$1"
+ shift; shift; shift
+ else
+ route="$2.$3.$4.$5/$1"
+ shift; shift; shift; shift
+ fi
+ shift
+ router="$1.$2.$3.$4"
+ classless_routes="$classless_routes $route $router"
+ shift; shift; shift; shift
+ done
+}
+
delete_old_routes() {
#route delete "$old_ip_address" $LOCALHOST >/dev/null 2>&1
+ if [ -n "$old_classless_routes" ]; then
+ fill_classless_routes "$old_classless_routes"
+ set $classless_routes
+ while [ $# -gt 1 ]; do
+ route delete "$1" "$2"
+ shift; shift
+ done
+ return 0;
+ fi
+
for router in $old_routers; do
if [ $if_defaultroute = x -o $if_defaultroute = $interface ]; then
route delete default $route >/dev/null 2>&1
@@ -107,6 +142,31 @@
add_new_routes() {
#route add $new_ip_address $LOCALHOST >/dev/null 2>&1
+
+ # RFC 3442: If the DHCP server returns both a Classless Static
+ # Routes option and a Router option, the DHCP client MUST ignore
+ # the Router option.
+ #
+ # DHCP clients that support this option (Classless Static Routes)
+ # MUST NOT install the routes specified in the Static Routes
+ # option (option code 33) if both a Static Routes option and the
+ # Classless Static Routes option are provided.
+
+ if [ -n "$new_classless_routes" ]; then
+ fill_classless_routes "$new_classless_routes"
+ $LOGGER "New Classless Static Routes ($interface): $classless_routes"
+ set $classless_routes
+ while [ $# -gt 1 ]; do
+ if [ "0.0.0.0" = "$2" ]; then
+ route add "$1" -iface "$interface"
+ else
+ route add "$1" "$2"
+ fi
+ shift; shift
+ done
+ return
+ fi
+
for router in $new_routers; do
if [ "$new_ip_address" = "$router" ]; then
route add default -iface $router >/dev/null 2>&1
==== //depot/projects/mjexp/sbin/dhclient/dhclient.c#3 (text+ko) ====
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/dhclient/dhclient.c,v 1.20 2007/01/29 15:55:13 brooks Exp $");
+__FBSDID("$FreeBSD: src/sbin/dhclient/dhclient.c,v 1.21 2007/02/09 17:50:26 emaste Exp $");
#include "dhcpd.h"
#include "privsep.h"
@@ -115,6 +115,7 @@
void routehandler(struct protocol *);
void usage(void);
int check_option(struct client_lease *l, int option);
+int check_classless_option(unsigned char *data, int len);
int ipv4addrs(char * buf);
int res_hnok(const char *dn);
int check_search(const char *srch);
@@ -2374,12 +2375,79 @@
case DHO_DHCP_USER_CLASS_ID:
case DHO_END:
return (1);
+ case DHO_CLASSLESS_ROUTES:
+ return (check_classless_option(l->options[option].data,
+ l->options[option].len));
default:
warning("unknown dhcp option value 0x%x", option);
return (unknown_ok);
}
}
+/* RFC 3442 The Classless Static Routes option checks */
+int
+check_classless_option(unsigned char *data, int len)
+{
+ int i = 0;
+ unsigned char width;
+ in_addr_t addr, mask;
+
+ if (len < 5) {
+ warning("Too small length: %d", len);
+ return (0);
+ }
+ while(i < len) {
+ width = data[i++];
+ if (width == 0) {
+ i += 4;
+ continue;
+ } else if (width < 9) {
+ addr = (in_addr_t)(data[i] << 24);
+ i += 1;
+ } else if (width < 17) {
+ addr = (in_addr_t)(data[i] << 24) +
+ (in_addr_t)(data[i + 1] << 16);
+ i += 2;
+ } else if (width < 25) {
+ addr = (in_addr_t)(data[i] << 24) +
+ (in_addr_t)(data[i + 1] << 16) +
+ (in_addr_t)(data[i + 2] << 8);
+ i += 3;
+ } else if (width < 33) {
+ addr = (in_addr_t)(data[i] << 24) +
+ (in_addr_t)(data[i + 1] << 16) +
+ (in_addr_t)(data[i + 2] << 8) +
+ data[i + 3];
+ i += 4;
+ } else {
+ warning("Incorrect subnet width: %d", width);
+ return (0);
+ }
+ mask = (in_addr_t)(~0) << (32 - width);
+ addr = ntohl(addr);
+ mask = ntohl(mask);
+
+ /*
+ * From RFC 3442:
+ * ... After deriving a subnet number and subnet mask
+ * from each destination descriptor, the DHCP client
+ * MUST zero any bits in the subnet number where the
+ * corresponding bit in the mask is zero...
+ */
+ if ((addr & mask) != addr) {
+ addr &= mask;
+ data[i - 1] = (unsigned char)(
+ (addr >> (((32 - width)/8)*8)) & 0xFF);
+ }
+ i += 4;
+ }
+ if (i > len) {
+ warning("Incorrect data length: %d (must be %d)", len, i);
+ return (0);
+ }
+ return (1);
+}
+
int
res_hnok(const char *dn)
{
==== //depot/projects/mjexp/sbin/dhclient/dhclient.conf#2 (text+ko) ====
@@ -1,10 +1,13 @@
+# $FreeBSD: src/sbin/dhclient/dhclient.conf,v 1.3 2007/02/09 17:50:26 emaste Exp $
+
send host-name "andare.fugue.com";
send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
send dhcp-lease-time 3600;
supersede domain-name "fugue.com home.vix.com";
prepend domain-name-servers 127.0.0.1;
-request subnet-mask, broadcast-address, time-offset, routers,
- domain-name, domain-name-servers, host-name;
+request subnet-mask, broadcast-address, time-offset,
+ classless-routes, routers, domain-name,
+ domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
timeout 60;
retry 60;
==== //depot/projects/mjexp/sbin/dhclient/dhcp.h#2 (text+ko) ====
@@ -1,5 +1,5 @@
/* $OpenBSD: dhcp.h,v 1.5 2004/05/04 15:49:49 deraadt Exp $ */
-/* $FreeBSD: src/sbin/dhclient/dhcp.h,v 1.2 2005/06/30 05:50:52 brooks Exp $ */
+/* $FreeBSD: src/sbin/dhclient/dhcp.h,v 1.3 2007/02/09 17:50:26 emaste Exp $ */
/* Protocol structures... */
@@ -162,6 +162,7 @@
#define DHO_FINGER_SERVER 73
#define DHO_IRC_SERVER 74
#define DHO_DHCP_USER_CLASS_ID 77
+#define DHO_CLASSLESS_ROUTES 121
#define DHO_END 255
/* DHCP message types. */
==== //depot/projects/mjexp/sbin/dhclient/tables.c#2 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/dhclient/tables.c,v 1.3 2005/08/23 23:59:55 brooks Exp $");
+__FBSDID("$FreeBSD: src/sbin/dhclient/tables.c,v 1.4 2007/02/09 17:50:26 emaste Exp $");
#include "dhcpd.h"
@@ -186,7 +186,7 @@
{ "option-118", "X", &dhcp_universe, 118 },
{ "option-119", "X", &dhcp_universe, 119 },
{ "option-120", "X", &dhcp_universe, 120 },
- { "option-121", "X", &dhcp_universe, 121 },
+ { "classless-routes", "BA", &dhcp_universe, 121 },
{ "option-122", "X", &dhcp_universe, 122 },
{ "option-123", "X", &dhcp_universe, 123 },
{ "option-124", "X", &dhcp_universe, 124 },
@@ -337,6 +337,7 @@
DHO_DHCP_CLIENT_IDENTIFIER,
DHO_SUBNET_MASK,
DHO_TIME_OFFSET,
+ DHO_CLASSLESS_ROUTES,
DHO_ROUTERS,
DHO_TIME_SERVERS,
DHO_NAME_SERVERS,
@@ -392,7 +393,7 @@
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list