Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jul 2003 16:36:16 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 35189 for review
Message-ID:  <200307292336.h6TNaGqm071383@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=35189

Change 35189 by marcel@marcel_nfs on 2003/07/29 16:35:46

	IFC @35188

Affected files ...

.. //depot/projects/ia64/UPDATING#46 integrate
.. //depot/projects/ia64/contrib/isc-dhcp/FREEBSD-upgrade#5 integrate
.. //depot/projects/ia64/contrib/isc-dhcp/client/dhclient.8#5 integrate
.. //depot/projects/ia64/contrib/isc-dhcp/client/dhclient.c#8 integrate
.. //depot/projects/ia64/contrib/isc-dhcp/client/scripts/freebsd#4 integrate
.. //depot/projects/ia64/contrib/isc-dhcp/common/dispatch.c#4 integrate
.. //depot/projects/ia64/contrib/isc-dhcp/includes/dhcpd.h#6 integrate
.. //depot/projects/ia64/contrib/smbfs/lib/smb/ctx.c#7 integrate
.. //depot/projects/ia64/etc/auth.conf#3 integrate
.. //depot/projects/ia64/etc/defaults/rc.conf#36 integrate
.. //depot/projects/ia64/etc/mtree/BSD.local.dist#15 integrate
.. //depot/projects/ia64/etc/mtree/BSD.usr.dist#23 integrate
.. //depot/projects/ia64/etc/rc.d/Makefile#18 integrate
.. //depot/projects/ia64/etc/rc.d/atm1#5 integrate
.. //depot/projects/ia64/etc/rc.d/atm2#1 branch
.. //depot/projects/ia64/etc/rc.d/atm2.sh#6 delete
.. //depot/projects/ia64/etc/rc.d/atm3#1 branch
.. //depot/projects/ia64/etc/rc.d/atm3.sh#3 delete
.. //depot/projects/ia64/etc/rc.d/dhclient#8 integrate
.. //depot/projects/ia64/etc/rc.d/ipfw#5 integrate
.. //depot/projects/ia64/gnu/usr.bin/patch/backupfile.c#3 integrate
.. //depot/projects/ia64/kerberos5/lib/libasn1/Makefile#9 integrate
.. //depot/projects/ia64/kerberos5/lib/libhdb/Makefile#10 integrate
.. //depot/projects/ia64/lib/libatm/atm_addr.c#5 integrate
.. //depot/projects/ia64/lib/libatm/cache_key.c#4 integrate
.. //depot/projects/ia64/lib/libatm/ioctl_subr.c#5 integrate
.. //depot/projects/ia64/lib/libatm/ip_addr.c#5 integrate
.. //depot/projects/ia64/lib/libatm/ip_checksum.c#4 integrate
.. //depot/projects/ia64/lib/libatm/libatm.h#4 integrate
.. //depot/projects/ia64/lib/libc/locale/Makefile.inc#14 integrate
.. //depot/projects/ia64/lib/libc/locale/gb18030.c#1 branch
.. //depot/projects/ia64/lib/libc/locale/setrunelocale.c#8 integrate
.. //depot/projects/ia64/lib/libc/stdlib/malloc.c#18 integrate
.. //depot/projects/ia64/lib/libc/string/Makefile.inc#8 integrate
.. //depot/projects/ia64/lib/libc/string/index.3#4 integrate
.. //depot/projects/ia64/lib/libc/string/rindex.3#4 delete
.. //depot/projects/ia64/lib/libc/string/strchr.3#3 integrate
.. //depot/projects/ia64/lib/libc/string/strrchr.3#2 delete
.. //depot/projects/ia64/lib/libpthread/thread/thr_private.h#18 integrate
.. //depot/projects/ia64/lib/libpthread/thread/thr_sig.c#19 integrate
.. //depot/projects/ia64/lib/libpthread/thread/thr_sigwait.c#11 integrate
.. //depot/projects/ia64/release/Makefile#61 integrate
.. //depot/projects/ia64/release/alpha/dokern.sh#10 integrate
.. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/i386/proc-i386.sgml#8 integrate
.. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#110 integrate
.. //depot/projects/ia64/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml#3 integrate
.. //depot/projects/ia64/release/ia64/dokern.sh#2 delete
.. //depot/projects/ia64/release/ia64/mkisoimages.sh#2 integrate
.. //depot/projects/ia64/release/pc98/dokern.sh#13 integrate
.. //depot/projects/ia64/sbin/atm/atm/Makefile#3 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm.8#3 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm.c#3 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm.h#3 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm_eni.c#3 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm_fore200.c#3 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm_inet.c#3 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm_print.c#4 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm_set.c#3 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm_show.c#4 integrate
.. //depot/projects/ia64/sbin/atm/atm/atm_subr.c#4 integrate
.. //depot/projects/ia64/sbin/dhclient/Makefile.inc#4 integrate
.. //depot/projects/ia64/share/colldef/Makefile#14 integrate
.. //depot/projects/ia64/share/man/man5/rc.conf.5#43 integrate
.. //depot/projects/ia64/share/man/man7/Makefile#10 integrate
.. //depot/projects/ia64/share/man/man7/rescue.7#2 delete
.. //depot/projects/ia64/share/man/man8/Makefile#9 integrate
.. //depot/projects/ia64/share/man/man8/rescue.8#1 branch
.. //depot/projects/ia64/share/man/man9/bus_dma.9#6 integrate
.. //depot/projects/ia64/share/mklocale/Makefile#12 integrate
.. //depot/projects/ia64/share/mklocale/zh_CN.GB18030.src#1 branch
.. //depot/projects/ia64/share/monetdef/Makefile#11 integrate
.. //depot/projects/ia64/share/monetdef/zh_CN.GB18030.src#1 branch
.. //depot/projects/ia64/share/msgdef/Makefile#11 integrate
.. //depot/projects/ia64/share/msgdef/zh_CN.GB18030.src#1 branch
.. //depot/projects/ia64/share/numericdef/Makefile#11 integrate
.. //depot/projects/ia64/share/numericdef/zh_TW.Big5.src#2 delete
.. //depot/projects/ia64/share/timedef/Makefile#11 integrate
.. //depot/projects/ia64/share/timedef/zh_CN.GB18030.src#1 branch
.. //depot/projects/ia64/sys/alpha/alpha/busdma_machdep.c#19 integrate
.. //depot/projects/ia64/sys/alpha/alpha/machdep.c#33 integrate
.. //depot/projects/ia64/sys/alpha/alpha/mp_machdep.c#12 integrate
.. //depot/projects/ia64/sys/alpha/alpha/vm_machdep.c#22 integrate
.. //depot/projects/ia64/sys/alpha/include/bus.h#13 integrate
.. //depot/projects/ia64/sys/amd64/amd64/busdma_machdep.c#6 integrate
.. //depot/projects/ia64/sys/amd64/amd64/vm_machdep.c#8 integrate
.. //depot/projects/ia64/sys/amd64/include/bus_dma.h#7 integrate
.. //depot/projects/ia64/sys/cam/cam_ccb.h#5 integrate
.. //depot/projects/ia64/sys/cam/scsi/scsi_cd.c#18 integrate
.. //depot/projects/ia64/sys/cam/scsi/scsi_da.c#47 integrate
.. //depot/projects/ia64/sys/compat/linux/linux_misc.c#27 integrate
.. //depot/projects/ia64/sys/conf/NOTES#59 integrate
.. //depot/projects/ia64/sys/conf/options#59 integrate
.. //depot/projects/ia64/sys/contrib/dev/acpica/dbcmds.c#12 integrate
.. //depot/projects/ia64/sys/dev/ata/atapi-cam.c#13 integrate
.. //depot/projects/ia64/sys/dev/ed/if_ed_pccard.c#16 integrate
.. //depot/projects/ia64/sys/dev/fatm/if_fatm.c#4 integrate
.. //depot/projects/ia64/sys/dev/firewire/sbp.c#39 integrate
.. //depot/projects/ia64/sys/dev/fxp/if_fxp.c#40 integrate
.. //depot/projects/ia64/sys/dev/hatm/if_hatm.c#5 integrate
.. //depot/projects/ia64/sys/dev/hatm/if_hatm_ioctl.c#3 integrate
.. //depot/projects/ia64/sys/dev/hatm/if_hatm_tx.c#3 integrate
.. //depot/projects/ia64/sys/dev/hatm/if_hatmvar.h#2 integrate
.. //depot/projects/ia64/sys/dev/hea/eni_if.c#3 integrate
.. //depot/projects/ia64/sys/dev/hfa/fore_if.c#3 integrate
.. //depot/projects/ia64/sys/dev/md/md.c#31 integrate
.. //depot/projects/ia64/sys/dev/patm/if_patm.c#2 integrate
.. //depot/projects/ia64/sys/dev/patm/if_patm_ioctl.c#2 integrate
.. //depot/projects/ia64/sys/dev/patm/if_patm_tx.c#3 integrate
.. //depot/projects/ia64/sys/dev/raidframe/rf_freebsdkintf.c#14 integrate
.. //depot/projects/ia64/sys/dev/usb/umass.c#30 integrate
.. //depot/projects/ia64/sys/dev/usb/usb_mem.c#4 integrate
.. //depot/projects/ia64/sys/dev/wi/if_wi_pci.c#14 integrate
.. //depot/projects/ia64/sys/geom/geom_ccd.c#4 integrate
.. //depot/projects/ia64/sys/geom/geom_mbr.c#31 integrate
.. //depot/projects/ia64/sys/i386/i386/busdma_machdep.c#23 integrate
.. //depot/projects/ia64/sys/i386/i386/locore.s#13 integrate
.. //depot/projects/ia64/sys/i386/include/bus_dma.h#9 integrate
.. //depot/projects/ia64/sys/i386/isa/pcvt/pcvt_hdr.h#3 integrate
.. //depot/projects/ia64/sys/ia64/ia64/busdma_machdep.c#16 integrate
.. //depot/projects/ia64/sys/ia64/include/bus.h#14 integrate
.. //depot/projects/ia64/sys/kern/kern_acct.c#22 integrate
.. //depot/projects/ia64/sys/kern/kern_alq.c#8 integrate
.. //depot/projects/ia64/sys/kern/kern_descrip.c#62 integrate
.. //depot/projects/ia64/sys/kern/kern_ktrace.c#20 integrate
.. //depot/projects/ia64/sys/kern/kern_linker.c#27 integrate
.. //depot/projects/ia64/sys/kern/kern_sig.c#63 integrate
.. //depot/projects/ia64/sys/kern/link_elf.c#20 integrate
.. //depot/projects/ia64/sys/kern/subr_mbuf.c#31 integrate
.. //depot/projects/ia64/sys/kern/tty_cons.c#15 integrate
.. //depot/projects/ia64/sys/kern/vfs_syscalls.c#50 integrate
.. //depot/projects/ia64/sys/kern/vfs_vnops.c#34 integrate
.. //depot/projects/ia64/sys/kern/vnode_if.src#15 integrate
.. //depot/projects/ia64/sys/modules/cam/Makefile#6 integrate
.. //depot/projects/ia64/sys/net/if_atm.h#9 integrate
.. //depot/projects/ia64/sys/net/if_atmsubr.c#14 integrate
.. //depot/projects/ia64/sys/net/if_spppsubr.c#12 integrate
.. //depot/projects/ia64/sys/netatm/atm_if.c#14 integrate
.. //depot/projects/ia64/sys/netatm/atm_ioctl.h#5 integrate
.. //depot/projects/ia64/sys/netatm/atm_usrreq.c#7 integrate
.. //depot/projects/ia64/sys/netatm/atm_vc.h#2 integrate
.. //depot/projects/ia64/sys/netatm/ipatm/ipatm_usrreq.c#6 integrate
.. //depot/projects/ia64/sys/netatm/sigpvc/sigpvc_if.c#7 integrate
.. //depot/projects/ia64/sys/netatm/spans/spans_arp.c#9 integrate
.. //depot/projects/ia64/sys/netatm/spans/spans_if.c#7 integrate
.. //depot/projects/ia64/sys/netatm/uni/uniarp.c#10 integrate
.. //depot/projects/ia64/sys/netatm/uni/uniarp_cache.c#8 integrate
.. //depot/projects/ia64/sys/netatm/uni/uniip_var.h#5 integrate
.. //depot/projects/ia64/sys/netatm/uni/unisig_if.c#7 integrate
.. //depot/projects/ia64/sys/netgraph/atm/ng_atm.c#4 integrate
.. //depot/projects/ia64/sys/netgraph/atm/ng_atm.h#2 integrate
.. //depot/projects/ia64/sys/netinet6/ip6_fw.c#11 integrate
.. //depot/projects/ia64/sys/netsmb/smb_conn.h#6 integrate
.. //depot/projects/ia64/sys/nfsclient/nfs_lock.c#17 integrate
.. //depot/projects/ia64/sys/nfsclient/nfs_vnops.c#24 integrate
.. //depot/projects/ia64/sys/pci/if_dc.c#43 integrate
.. //depot/projects/ia64/sys/pci/if_rl.c#38 integrate
.. //depot/projects/ia64/sys/pci/if_sis.c#26 integrate
.. //depot/projects/ia64/sys/pci/if_xl.c#37 integrate
.. //depot/projects/ia64/sys/pci/ncr.c#11 integrate
.. //depot/projects/ia64/sys/powerpc/include/bus.h#12 integrate
.. //depot/projects/ia64/sys/powerpc/powerpc/busdma_machdep.c#16 integrate
.. //depot/projects/ia64/sys/powerpc/powerpc/pmap.c#27 integrate
.. //depot/projects/ia64/sys/sparc64/include/bus.h#20 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/bus_machdep.c#21 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/iommu.c#22 integrate
.. //depot/projects/ia64/sys/sys/vnode.h#32 integrate
.. //depot/projects/ia64/sys/ufs/ffs/ffs_vnops.c#30 integrate
.. //depot/projects/ia64/sys/ufs/ufs/extattr.h#4 integrate
.. //depot/projects/ia64/sys/ufs/ufs/ufs_extattr.c#20 integrate
.. //depot/projects/ia64/sys/ufs/ufs/ufs_quota.c#16 integrate
.. //depot/projects/ia64/sys/ufs/ufs/ufs_vnops.c#31 integrate
.. //depot/projects/ia64/sys/vm/uma_core.c#45 integrate
.. //depot/projects/ia64/sys/vm/vm_contig.c#17 integrate
.. //depot/projects/ia64/sys/vm/vm_kern.c#25 integrate
.. //depot/projects/ia64/sys/vm/vm_object.c#63 integrate
.. //depot/projects/ia64/tools/tools/release/chk_dokern.sh_and_drivers.conf#1 branch
.. //depot/projects/ia64/tools/tools/tinderbox/Makefile#6 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/experimental.rc#1 branch
.. //depot/projects/ia64/tools/tools/tinderbox/stanley.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/tbmaster.1#4 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/tbmaster.pl#17 integrate
.. //depot/projects/ia64/usr.bin/last/last.1#5 integrate
.. //depot/projects/ia64/usr.bin/last/last.c#8 integrate
.. //depot/projects/ia64/usr.bin/mklocale/yacc.y#10 integrate
.. //depot/projects/ia64/usr.sbin/acpi/acpiconf/acpiconf.8#5 integrate
.. //depot/projects/ia64/usr.sbin/acpi/acpiconf/acpiconf.c#5 integrate
.. //depot/projects/ia64/usr.sbin/atm/atmarpd/atmarp_log.c#2 integrate
.. //depot/projects/ia64/usr.sbin/atm/atmarpd/atmarp_subr.c#3 integrate
.. //depot/projects/ia64/usr.sbin/atm/atmarpd/atmarpd.c#3 integrate
.. //depot/projects/ia64/usr.sbin/atm/scspd/scsp_subr.c#3 integrate
.. //depot/projects/ia64/usr.sbin/edquota/edquota.8#6 integrate

Differences ...

==== //depot/projects/ia64/UPDATING#46 (text+ko) ====

@@ -17,6 +17,13 @@
 	developers choose to disable these features on build machines
 	to maximize performance.
 
+20030728:
+	All current USB and Firewire quirks in da(4) have been deprecated
+	and will be removed for 5.2.  If this causes failure for your
+	umass(4) devices, enable "options DA_OLD_QUIRKS" in your kernel
+	and send the output of "camcontrol inquiry da0" to scsi@freebsd.org
+	so the quirk can be re-enabled.
+
 20030722:
 	FPU-less support has been removed from FreeBSD.  Chances are you won't
 	notice.  386+387 support should still work after this change, but
@@ -1326,4 +1333,4 @@
 Contact Warner Losh if you have any questions about your use of
 this document.
 
-$FreeBSD: src/UPDATING,v 1.259 2003/07/22 11:08:41 imp Exp $
+$FreeBSD: src/UPDATING,v 1.260 2003/07/29 04:40:33 njl Exp $

==== //depot/projects/ia64/contrib/isc-dhcp/FREEBSD-upgrade#5 (text+ko) ====

@@ -1,5 +1,5 @@
 # ex:ts=8
-$FreeBSD: src/contrib/isc-dhcp/FREEBSD-upgrade,v 1.14 2003/01/16 19:05:56 murray Exp $
+$FreeBSD: src/contrib/isc-dhcp/FREEBSD-upgrade,v 1.16 2003/07/28 08:30:11 mbr Exp $
 
 ISC DHCP client 3.0.1rc11
 	originals can be found at: ftp://ftp.isc.org/isc/dhcp/
@@ -42,19 +42,26 @@
 	client/clparse.c
 	  r1.6 - prefer strlcpy to strcpy.
 	client/dhclient.8 
+	  r1.14 - interface polling
 	  r1.8 - correct a man reference and a typo.
 	  r1.6 - document -D option.
           - remove dhcpd from SEE ALSO section.
 	client/dhclient.c
+	  r1.26 - interface polling
+	  r1.25 - correct release lease option
 	  r1.19 - connect std{in,out,err}.
 	  r1.13 - prefer strlcpy to strcpy.
 	  r1.6  - quiet by default.
 	        - document -D option.
 	client/dhclient.conf.5
-	  - Remove dhcpd from SEE ALSO section.
+	        - Remove dhcpd from SEE ALSO section.
 	common/dhcp-options.5
 	  r1.2 - note that hostname is only set if not already set.
-	  - Remove dhcpd from SEE ALSO section.
+	       - Remove dhcpd from SEE ALSO section.
+	common/dispatch.c
+	  r1.2 - polling mode
+	includes/dhcpd.h
+	  r1.2 - polling mode
     (see CVS logs for complete details)
 
 murray@FreeBSD.org

==== //depot/projects/ia64/contrib/isc-dhcp/client/dhclient.8#5 (text+ko) ====

@@ -20,7 +20,7 @@
 .\"
 .\" Portions copyright (c) 2000 David E. O'Brien.
 .\" All rights reserved.
-.\" $FreeBSD: src/contrib/isc-dhcp/client/dhclient.8,v 1.13 2003/03/18 19:46:55 obrien Exp $
+.\" $FreeBSD: src/contrib/isc-dhcp/client/dhclient.8,v 1.14 2003/07/28 08:30:11 mbr Exp $
 .\"
 .TH dhclient 8
 .SH NAME
@@ -74,6 +74,10 @@
 relay
 ]
 [
+.B -i
+interval
+]
+[
 .B -n
 ]
 [
@@ -190,6 +194,12 @@
 flag, followed by the IP address to send.   This is only useful for testing,
 and should not be expected to work in any consistent or useful way.
 .PP
+On FreeBSD, dhclient can be enabled to automatically handle the
+link status of the network card. Normally polling is done every
+five seconds. The polling interval can be set using the
+.B -i
+flag, followed by the numbers of seconds. Minimum is one second.
+.PP
 The DHCP client will normally run in the foreground until it has
 configured an interface, and then will revert to running in the
 background.   To run force dhclient to always run as a foreground

==== //depot/projects/ia64/contrib/isc-dhcp/client/dhclient.c#8 (text+ko) ====

@@ -42,12 +42,19 @@
 #ifndef lint
 static char ocopyright[] =
 "$Id: dhclient.c,v 1.129.2.12 2002/11/07 23:26:38 dhankins Exp $ Copyright (c) 1995-2002 Internet Software Consortium.  All rights reserved.\n"
-"$FreeBSD: src/contrib/isc-dhcp/client/dhclient.c,v 1.25 2003/03/23 23:29:36 mbr Exp $\n";
+"$FreeBSD: src/contrib/isc-dhcp/client/dhclient.c,v 1.27 2003/07/28 13:25:04 mbr Exp $\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
 #include "version.h"
 
+#ifdef __FreeBSD__
+#include <sys/ioctl.h>
+#include <net/if_media.h>
+#include <net80211/ieee80211_ioctl.h>
+#include <net80211/ieee80211.h>
+#endif
+
 TIME cur_time;
 TIME default_lease_time = 43200; /* 12 hours... */
 TIME max_lease_time = 86400; /* 24 hours... */
@@ -85,6 +92,10 @@
 int onetry=0;
 int quiet=1;
 int nowait=0;
+int doinitcheck=0;
+#ifdef ENABLE_POLLING_MODE
+int polling_interval = 5;
+#endif
 
 static void usage PROTO ((void));
 
@@ -202,6 +213,19 @@
 		} else if (!strcmp (argv [i], "-n")) {
 			/* do not start up any interfaces */
 			interfaces_requested = 1;
+#ifdef ENABLE_POLLING_MODE
+		} else if (!strcmp (argv [i], "-i")) {
+			if (++i == argc)
+				usage ();
+			polling_interval = (int)strtol(argv [i],
+			    (char **)NULL, 10);
+			if (polling_interval <= 0) {
+				log_info ("Incorrect polling interval %d",
+				    polling_interval);
+				log_info ("Using a default of 5 seconds");
+				polling_interval = 5;
+			}
+#endif
 		} else if (!strcmp (argv [i], "-w")) {
 			/* do not exit if there are no broadcast interfaces. */
 			persist = 1;
@@ -233,6 +257,8 @@
 			    log_fatal ("%s: interface name too long (max %ld)",
 				       argv [i], (long)strlen (argv [i]));
  		    strlcpy (tmp -> name, argv [i], IFNAMSIZ);
+		    set_ieee802(tmp);
+		    tmp->linkstatus = interface_active(tmp);
 		    if (interfaces) {
 			    interface_reference (&tmp -> next,
 						 interfaces, MDL);
@@ -386,6 +412,7 @@
 					     INTERFACE_AUTOMATIC)) !=
 			     INTERFACE_REQUESTED))
 				continue;
+			set_ieee802(ip);
 			script_init (ip -> client,
 				     "PREINIT", (struct string_list *)0);
 			if (ip -> client -> alias)
@@ -428,8 +455,13 @@
 				client -> state = S_INIT;
 				/* Set up a timeout to start the initialization
 				   process. */
+#ifdef ENABLE_POLLING_MODE
 				add_timeout (cur_time + random () % 5,
+					     state_link, client, 0, 0);
+#else
+				add_timeout(cur_time + random () % 5,
 					     state_reboot, client, 0, 0);
+#endif
 			}
 		}
 	}
@@ -1353,6 +1385,9 @@
 	int interval;
 	int increase = 1;
 
+	if (interface_active(client -> interface) == 0)
+		return;
+
 	/* Figure out how long it's been since we started transmitting. */
 	interval = cur_time - client -> first_sending;
 
@@ -1458,6 +1493,9 @@
 	struct client_lease *loop;
 	struct client_lease *lp;
 
+	if (interface_active(client -> interface) == 0)
+		return;
+
 	loop = lp = client -> active;
 
 	log_info ("No DHCPOFFERS received.");
@@ -2771,7 +2809,8 @@
 				break;
 			}
 			client -> state = S_INIT;
-			state_reboot (client);
+			if (interface_active(ip))
+				state_reboot(client);
 		}
 	}
 }
@@ -2932,8 +2971,10 @@
 			client -> state = S_INIT;
 			/* Set up a timeout to start the initialization
 			   process. */
-			add_timeout (cur_time + random () % 5,
-				     state_reboot, client, 0, 0);
+			if (interface_active(ip)) {
+				add_timeout(cur_time + random () % 5,
+					     state_reboot, client, 0, 0);
+			}
 		}
 	}
 	return ISC_R_SUCCESS;
@@ -2997,7 +3038,8 @@
 		    break;
 
 		  case server_awaken:
-		    state_reboot (client);
+		    if (interface_active(ip))
+			    state_reboot(client);
 		    break;
 		}
 	    }
@@ -3134,3 +3176,152 @@
 	data_string_forget (&ddns_dhcid, MDL);
 	return rcode;
 }
+
+/* Check to see if there's a wire plugged in */
+int
+interface_active(struct interface_info *ip) {
+#ifdef __FreeBSD__
+	struct ifmediareq ifmr;
+	int *media_list, i;
+	char *ifname;
+	int sock;
+
+	ifname = ip -> name;
+
+	if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
+		log_fatal("Can't create interface_active socket");
+
+	(void) memset(&ifmr, 0, sizeof(ifmr));
+	(void) strncpy(ifmr.ifm_name, ifname, sizeof(ifmr.ifm_name));
+
+	if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
+		/*
+		 * Interface doesn't support SIOCGIFMEDIA, presume okay
+		 */
+		close(sock);
+		return (1);
+	}
+	close(sock);
+
+	if (ifmr.ifm_count == 0) {
+		/*
+		 * this is unexpected (to me), but we'll just assume
+		 * that this means interface does not support SIOCGIFMEDIA
+		 */
+		log_fatal("%s: no media types?", ifname);
+		return (1);
+	}
+
+	if (ifmr.ifm_status & IFM_AVALID) {
+		if (ip->ieee802) {
+			if ((IFM_TYPE(ifmr.ifm_active) == IFM_IEEE80211) &&
+			     (ifmr.ifm_status & IFM_ACTIVE))
+				return (1);
+		} else {
+			if (ifmr.ifm_status & IFM_ACTIVE)
+				return (1);
+		}
+	}
+
+	return (0);
+#else /* ifdef __FreeBSD__ */
+
+	return (1);
+#endif /* Other OSs */
+}
+
+#ifdef __FreeBSD__
+set_ieee802 (struct interface_info *ip) {
+
+	struct ieee80211req     ireq;
+	u_int8_t                data[32];
+	int                     associated = 0;
+	int *media_list, i;
+	char *ifname;
+	int sock;
+
+	ifname = ip -> name;
+
+	if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
+		log_fatal("Can't create interface_active socket");
+
+	(void) memset(&ireq, 0, sizeof(ireq));
+	(void) strncpy(ireq.i_name, ifname, sizeof(ireq.i_name));
+	ireq.i_data = &data;
+	ireq.i_type = IEEE80211_IOC_SSID;
+	ireq.i_val = -1;
+	/*
+	 * If we can't get the SSID,
+	 * this isn't an 802.11 device.
+	 */
+	if (ioctl(sock, SIOCG80211, &ireq) < 0)
+		ip->ieee802 = 0;
+	else {
+#ifdef DEBUG
+		printf("Device %s has 802.11\n", ifname);
+#endif
+		ip->ieee802 = 1;
+	}
+	close(sock);
+}
+#endif /* __FreeBSD__ */
+
+#ifdef ENABLE_POLLING_MODE
+/* Check the state of the NICs if we have link */
+void state_link (cpp)
+        void *cpp;
+{
+	struct interface_info *ip;
+	struct client_state *client;
+
+#ifdef DEBUG
+	printf("Polling interface status\n");
+#endif
+	for (ip = interfaces; ip; ip = ip -> next) {
+		if (ip->linkstatus == 0 || doinitcheck == 0) {
+			if (interface_active(ip)) {
+#ifdef DEBUG
+				printf("%s: Found Link on interface\n", ip->name);
+#endif
+				for (client = ip -> client;
+				     client; client = client -> next) {
+					add_timeout(cur_time + random () % 5,
+					             state_reboot, client, 0, 0);
+				}
+				ip->linkstatus = 1;
+			} else {
+#ifdef DEBUG
+				printf("%s: No Link on interface\n", ip->name);
+#endif
+				for (client = ip -> client;
+				     client; client = client -> next) {
+					cancel_timeout(state_init, client);
+			 		cancel_timeout(send_discover, client);
+					cancel_timeout(send_request, client);
+					/*
+					 * XXX without this, dhclient does
+					 * not poll on a interface if there
+					 * is no cable plugged in at startup
+					 * time
+					 */
+					if (client -> state == S_INIT) {
+						add_timeout(cur_time + polling_interval,
+						             state_link, client, 0, 0);
+					}
+			 	}
+				ip->linkstatus = 0;
+			}
+		} else {
+			if (interface_active(ip) == 0) {
+#ifdef DEBUG
+				printf("%s: Lost Link on interface\n", ip->name);
+#endif
+				ip->linkstatus = 0;
+			}
+		}
+	}
+	if (doinitcheck)
+		go_daemon ();
+	doinitcheck = 1;
+}
+#endif /* ifdef ENABLE_POLLING_MODE */

==== //depot/projects/ia64/contrib/isc-dhcp/client/scripts/freebsd#4 (text+ko) ====

@@ -2,7 +2,7 @@
 #
 # $Id: freebsd,v 1.13.2.4 2002/06/09 22:37:55 murray Exp $
 #
-# $FreeBSD: src/contrib/isc-dhcp/client/scripts/freebsd,v 1.21 2003/01/15 10:47:32 murray Exp $
+# $FreeBSD: src/contrib/isc-dhcp/client/scripts/freebsd,v 1.22 2003/07/28 22:25:20 mbr Exp $
 
 if [ -x /usr/bin/logger ]; then
 	LOGGER="/usr/bin/logger -s -p user.notice -t dhclient"
@@ -13,13 +13,19 @@
 make_resolv_conf() {
   if [ x"$new_domain_name_servers" != x ]; then
     if [ "x$new_domain_name" != x ]; then
-      echo search $new_domain_name >/etc/resolv.conf
+      ( echo search $new_domain_name >/etc/resolv.conf )
+      exit_status=$?
+    else
+      ( rm /etc/resolv.conf )
+      exit_status=$?
+    fi
+    if [ $exit_status -ne 0 ]; then
+      $LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status"
     else
-      rm /etc/resolv.conf
+      for nameserver in $new_domain_name_servers; do
+       ( echo nameserver $nameserver >>/etc/resolv.conf )
+      done
     fi
-    for nameserver in $new_domain_name_servers; do
-      echo nameserver $nameserver >>/etc/resolv.conf
-    done
   fi
 }
 

==== //depot/projects/ia64/contrib/isc-dhcp/common/dispatch.c#4 (text+ko) ====

@@ -43,7 +43,8 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dispatch.c,v 1.63.2.3 2002/11/17 02:26:57 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dispatch.c,v 1.63.2.3 2002/11/17 02:26:57 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium.  All rights reserved.\n"
+"$FreeBSD: src/contrib/isc-dhcp/common/dispatch.c,v 1.3 2003/07/28 11:49:07 mbr Exp $\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -51,6 +52,10 @@
 struct timeout *timeouts;
 static struct timeout *free_timeouts;
 
+#ifdef ENABLE_POLLING_MODE
+extern int polling_interval;
+#endif
+
 void set_time (u_int32_t t)
 {
 	/* Do any outstanding timeouts. */
@@ -95,11 +100,26 @@
 void dispatch ()
 {
 	struct timeval tv, *tvp;
+#ifdef ENABLE_POLLING_MODE
+	struct timeval *tvp_new;
+#endif
 	isc_result_t status;
+	TIME cur_time;
 
+	tvp = NULL;
+#ifdef ENABLE_POLLING_MODE
+	tvp_new = NULL;
+#endif
 	/* Wait for a packet or a timeout... XXX */
 	do {
 		tvp = process_outstanding_timeouts (&tv);
+#ifdef ENABLE_POLLING_MODE
+		GET_TIME (&cur_time);
+		add_timeout(cur_time + polling_interval, state_link, 0, 0, 0);
+		tvp_new = process_outstanding_timeouts(&tv);
+		if (tvp != NULL && (tvp -> tv_sec > tvp_new -> tv_sec))
+			tvp = tvp_new;
+#endif /* ENABLE_POLLING_MODE */
 		status = omapi_one_dispatch (0, tvp);
 	} while (status == ISC_R_TIMEDOUT || status == ISC_R_SUCCESS);
 	log_fatal ("omapi_one_dispatch failed: %s -- exiting.",

==== //depot/projects/ia64/contrib/isc-dhcp/includes/dhcpd.h#6 (text+ko) ====

@@ -39,6 +39,8 @@
  * ``http://www.isc.org/''.  To learn more about Vixie Enterprises,
  * see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
  * ``http://www.nominum.com''.
+ *
+ * $FreeBSD: src/contrib/isc-dhcp/includes/dhcpd.h,v 1.3 2003/07/28 11:49:07 mbr Exp $
  */
 
 #ifndef __CYGWIN32__
@@ -778,6 +780,8 @@
 	unsigned remote_id_len;		/* Length of Remote ID. */
 
 	char name [IFNAMSIZ];		/* Its name... */
+	int linkstatus;			/* Link status */
+	int ieee802;			/* True if media is ieee802 */
 	int index;			/* Its index. */
 	int rfdesc;			/* Its read file descriptor. */
 	int wfdesc;			/* Its write file descriptor, if
@@ -1853,6 +1857,9 @@
 void send_decline PROTO ((void *));
 
 void state_reboot PROTO ((void *));
+#ifdef ENABLE_POLLING_MODE
+void state_link PROTO (());
+#endif
 void state_init PROTO ((void *));
 void state_selecting PROTO ((void *));
 void state_requesting PROTO ((void *));

==== //depot/projects/ia64/contrib/smbfs/lib/smb/ctx.c#7 (text+ko) ====

@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  * $Id: ctx.c,v 1.24 2002/04/13 14:35:28 bp Exp $
- * $FreeBSD: src/contrib/smbfs/lib/smb/ctx.c,v 1.2 2003/04/12 12:11:14 tjr Exp $
+ * $FreeBSD: src/contrib/smbfs/lib/smb/ctx.c,v 1.3 2003/07/27 11:41:38 tjr Exp $
  */
 #include <sys/param.h>
 #include <sys/sysctl.h>
@@ -275,7 +275,7 @@
 int
 smb_ctx_setserver(struct smb_ctx *ctx, const char *name)
 {
-	if (strlen(name) >= SMB_MAXSRVNAMELEN) {
+	if (strlen(name) > SMB_MAXSRVNAMELEN) {
 		smb_error("server name '%s' too long", 0, name);
 		return ENAMETOOLONG;
 	}
@@ -286,7 +286,7 @@
 int
 smb_ctx_setuser(struct smb_ctx *ctx, const char *name)
 {
-	if (strlen(name) >= SMB_MAXUSERNAMELEN) {
+	if (strlen(name) > SMB_MAXUSERNAMELEN) {
 		smb_error("user name '%s' too long", 0, name);
 		return ENAMETOOLONG;
 	}
@@ -297,7 +297,7 @@
 int
 smb_ctx_setworkgroup(struct smb_ctx *ctx, const char *name)
 {
-	if (strlen(name) >= SMB_MAXUSERNAMELEN) {
+	if (strlen(name) > SMB_MAXUSERNAMELEN) {
 		smb_error("workgroup name '%s' too long", 0, name);
 		return ENAMETOOLONG;
 	}
@@ -310,7 +310,7 @@
 {
 	if (passwd == NULL)
 		return EINVAL;
-	if (strlen(passwd) >= SMB_MAXPASSWORDLEN) {
+	if (strlen(passwd) > SMB_MAXPASSWORDLEN) {
 		smb_error("password too long", 0);
 		return ENAMETOOLONG;
 	}
@@ -325,7 +325,7 @@
 int
 smb_ctx_setshare(struct smb_ctx *ctx, const char *share, int stype)
 {
-	if (strlen(share) >= SMB_MAXSHARENAMELEN) {
+	if (strlen(share) > SMB_MAXSHARENAMELEN) {
 		smb_error("share name '%s' too long", 0, share);
 		return ENAMETOOLONG;
 	}

==== //depot/projects/ia64/etc/auth.conf#3 (text+ko) ====

@@ -1,10 +1,8 @@
 #
-# $FreeBSD: src/etc/auth.conf,v 1.5 2000/12/28 10:32:00 peter Exp $
+# $FreeBSD: src/etc/auth.conf,v 1.6 2003/07/28 02:28:51 rwatson Exp $
+#
+# Configure some authentication-related defaults.  This file is being
+# gradually subsumed by user class and PAM configuration.
 #
-# This file contains information on what types of authentication to use.
-# It is just the beginnings of a greater scheme.
 
 # crypt_default	=	md5 des
-# auth_list	=	passwd kerberos
-
-auth_list	=	passwd

==== //depot/projects/ia64/etc/defaults/rc.conf#36 (text+ko) ====

@@ -13,7 +13,7 @@
 #
 # All arguments must be in double or single quotes.
 #
-# $FreeBSD: src/etc/defaults/rc.conf,v 1.180 2003/06/26 09:50:50 smkelly Exp $
+# $FreeBSD: src/etc/defaults/rc.conf,v 1.182 2003/07/28 13:09:00 mbr Exp $
 
 ##############################################################
 ###  Important initial Boot-time options  ####################
@@ -57,6 +57,7 @@
 nisdomainname="NO"		# Set to NIS domain if using NIS (or NO).
 dhclient_program="/sbin/dhclient"	# Path to dhcp client program.
 dhclient_flags=""		# Additional flags to pass to dhcp client.
+background_dhclient="NO"	# Start dhcp client in the background.
 firewall_enable="NO"		# Set to YES to enable firewall functionality
 firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall
 firewall_type="UNKNOWN"		# Firewall type (see /etc/rc.firewall)

==== //depot/projects/ia64/etc/mtree/BSD.local.dist#15 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.98 2003/07/05 11:41:10 ache Exp $
+# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.99 2003/07/29 08:02:26 ache Exp $
 #
 # Please see the file src/etc/mtree/README before making changes to this file.
 #
@@ -447,6 +447,8 @@
             ..
             zh_CN.eucCN
             ..
+            zh_CN.GB18030
+            ..
             zh_CN.GBK
             ..
             zh_TW.Big5

==== //depot/projects/ia64/etc/mtree/BSD.usr.dist#23 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.276 2003/07/05 11:41:10 ache Exp $
+# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.277 2003/07/29 08:02:26 ache Exp $
 #
 # Please see the file src/etc/mtree/README before making changes to this file.
 #
@@ -509,6 +509,8 @@
             ..
             zh_CN.eucCN
             ..
+            zh_CN.GB18030      
+            ..
             zh_CN.GBK
             ..
             zh_TW.Big5
@@ -835,6 +837,8 @@
             ..
             zh_CN.eucCN
             ..
+            zh_CN.GB18030
+            ..
             zh_CN.GBK
             ..
             zh_TW.Big5

==== //depot/projects/ia64/etc/rc.d/Makefile#18 (text+ko) ====

@@ -1,10 +1,10 @@
 # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $
-# $FreeBSD: src/etc/rc.d/Makefile,v 1.20 2003/06/29 05:15:57 mtm Exp $
+# $FreeBSD: src/etc/rc.d/Makefile,v 1.21 2003/07/28 13:30:42 harti Exp $
 
 .include <bsd.own.mk>
 
 FILES=	DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz amd \
-	apm apmd archdep atm1 atm2.sh atm3.sh bgfsck bootparams ccd cleanvar \
+	apm apmd archdep atm1 atm2 atm3 bgfsck bootparams ccd cleanvar \
 	cleartmp cron devd devfs dhclient diskless dmesg dumpon fsck \
 	hostname inetd initdiskless initrandom ip6fw ipfilter ipfs ipfw ipmon \
 	ipnat ipsec ipxrouted isdnd jail \

==== //depot/projects/ia64/etc/rc.d/atm1#5 (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/rc.d/atm1,v 1.12 2003/04/18 17:55:05 mtm Exp $
+# $FreeBSD: src/etc/rc.d/atm1,v 1.13 2003/07/28 13:30:42 harti Exp $
 #
 
 # PROVIDE: atm1
@@ -46,6 +46,21 @@
 #
 atm_start()
 {
+	if [ -n "${natm_interfaces}" ] ; then
+		# Load the HARP pseudo interface
+		kldstat -v | grep -q if_harp || kldload if_harp
+
+		# Load all the NATM drivers that we need
+		for natm in ${natm_interfaces} ; do
+			ifconfig ${natm} up
+		done
+	fi
+
+	# Load loadable HARP drivers
+	for dev in ${atm_load} ; do
+		kldstat -v | grep -q ${dev} || kldload ${dev}
+	done
+
 	# Locate all probed ATM adapters
 	atmdev=`atm sh stat int | while read dev junk; do
 		case ${dev} in
@@ -58,6 +73,20 @@
 		idt[0-9] | idt[0-9][0-9])
 			echo "${dev} "
 			;;
+
+		# NATM interfaces per pseudo driver
+		en[0-9] | en[0-9][0-9])
+			echo "${dev} "
+			;;
+		fatm[0-9] | fatm[0-9][0-9])
+			echo "${dev} "
+			;;
+		hatm[0-9] | hatm[0-9][0-9])
+			echo "${dev} "
+			;;
+		patm[0-9] | patm[0-9][0-9])
+			echo "${dev} "
+			;;
 		*)
 			continue
 			;;

==== //depot/projects/ia64/etc/rc.d/dhclient#8 (text+ko) ====

@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $
-# $FreeBSD: src/etc/rc.d/dhclient,v 1.8 2003/07/26 18:58:46 mtm Exp $
+# $FreeBSD: src/etc/rc.d/dhclient,v 1.9 2003/07/28 08:15:52 mbr Exp $
 #
 
 # PROVIDE: dhclient
@@ -59,6 +59,10 @@
 		ifscript_up ${ifn}
 	done
 
+	if checkyesno background_dhclient; then
+		rc_flags="${rc_flags} -nw"
+	fi
+
 	rc_flags="${rc_flags} ${_cooked_list}"
 	return 0
 }

==== //depot/projects/ia64/etc/rc.d/ipfw#5 (text+ko) ====

@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/ipfw,v 1.4 2003/03/30 15:52:18 mtm Exp $
+# $FreeBSD: src/etc/rc.d/ipfw,v 1.5 2003/07/27 20:34:30 mbr Exp $
 #
 
 # PROVIDE: ipfw
@@ -9,6 +9,7 @@
 # KEYWORD: FreeBSD
 
 . /etc/rc.subr
+. /etc/network.subr
 
 name="ipfw"
 rcvar="firewall_enable"
@@ -40,6 +41,16 @@
 		# Network Address Translation daemon
 		#
 		if checkyesno natd_enable; then
+			dhcp_list="`list_net_interfaces dhcp`"
+			for ifn in ${dhcp_list}; do
+				case ${natd_interface} in
+				${ifn})
+					natd_flags="$natd_flags -dynamic"
+					;;
+				*)
+					;;
+				esac
+			done
 			if [ -n "${natd_interface}" ]; then
 				if echo ${natd_interface} | \
 				grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then
@@ -75,6 +86,8 @@
 	# Disable the firewall
 	#
 	${SYSCTL_W} net.inet.ip.fw.enable=0
+	killall natd;
+	sleep 2;
 }
 
 load_rc_config $name

==== //depot/projects/ia64/gnu/usr.bin/patch/backupfile.c#3 (text+ko) ====

@@ -20,7 +20,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/patch/backupfile.c,v 1.6 2002/04/28 01:33:45 gad Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/patch/backupfile.c,v 1.7 2003/07/29 00:31:07 jwd Exp $");
 
 #include "config.h"
 #include <stdio.h>
@@ -213,7 +213,7 @@

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307292336.h6TNaGqm071383>