[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree
zrouter-src-freebsd at zrouter.org
zrouter-src-freebsd at zrouter.org
Fri Mar 2 15:38:42 UTC 2012
details: http://zrouter.org/hg/FreeBSD/head//rev/f47f7c6f7737
changeset: 372:f47f7c6f7737
user: ray at terran.dlink.ua
date: Fri Mar 02 17:01:51 2012 +0200
description:
Update to FreeBSD-HEAD @232391
diffstat:
head/sbin/bsdlabel/bsdlabel.8 | 4 +-
head/sbin/fsck_ffs/fsck_ffs.8 | 9 ++++++-
head/sbin/fsck_ffs/setup.c | 4 +-
head/sbin/fsdb/Makefile | 6 +---
head/sbin/fsdb/fsdbutil.c | 15 ++++++-------
head/sbin/geom/class/sched/gsched.8 | 4 +-
head/sbin/hastd/parse.y | 4 +-
head/sbin/hastd/primary.c | 7 +++--
head/sbin/hastd/rangelock.c | 10 +++-----
head/sbin/ifconfig/Makefile | 7 +++++-
head/sbin/ifconfig/ifconfig.8 | 12 +++++-----
head/sbin/ifconfig/ifconfig.c | 10 +++++---
head/sbin/init/init.8 | 13 ++---------
head/sbin/init/init.c | 36 ++--------------------------------
head/sbin/ipfw/dummynet.c | 11 ++-------
head/sbin/ipfw/ipfw.8 | 16 ++++++++------
head/sbin/ipfw/ipfw2.c | 17 ++++++++++++---
head/sbin/iscontrol/iscsi.conf.5 | 14 ++++++------
head/sbin/newfs_msdos/newfs_msdos.8 | 38 ++++++++++++++++++------------------
head/sbin/reboot/nextboot.sh | 26 ++++++++++++++++++++++--
head/sbin/route/route.c | 6 ++--
21 files changed, 133 insertions(+), 136 deletions(-)
diffs (844 lines):
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/bsdlabel/bsdlabel.8
--- a/head/sbin/bsdlabel/bsdlabel.8 Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/bsdlabel/bsdlabel.8 Fri Mar 02 17:01:51 2012 +0200
@@ -29,7 +29,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94
-.\" $FreeBSD$
+.\" $FreeBSD: head/sbin/bsdlabel/bsdlabel.8 231564 2012-02-12 18:29:56Z ed $
.\"
.Dd March 5, 2011
.Dt BSDLABEL 8
@@ -475,7 +475,7 @@
to be decreased or the offset of a partition to be changed while it is open.
.Sh COMPATIBILITY
Due to the use of an
-.Vt u_int32_t
+.Vt uint32_t
to store the number of sectors,
.Bx
labels are restricted to a maximum of 2^32-1 sectors.
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/fsck_ffs/fsck_ffs.8
--- a/head/sbin/fsck_ffs/fsck_ffs.8 Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/fsck_ffs/fsck_ffs.8 Fri Mar 02 17:01:51 2012 +0200
@@ -27,9 +27,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)fsck.8 8.4 (Berkeley) 5/9/95
-.\" $FreeBSD: head/sbin/fsck_ffs/fsck_ffs.8 221233 2011-04-29 23:00:23Z des $
+.\" $FreeBSD: head/sbin/fsck_ffs/fsck_ffs.8 231377 2012-02-10 12:01:19Z trasz $
.\"
-.Dd April 27, 2011
+.Dd February 10, 2012
.Dt FSCK_FFS 8
.Os
.Sh NAME
@@ -193,6 +193,11 @@
the super block for the file system.
An alternate super block is usually located at block 32 for UFS1,
and block 160 for UFS2.
+.Pp
+See the
+.Fl N
+flag of
+.Xr newfs 8 .
.It Fl C
Check if file system was dismounted cleanly.
If so, skip file system checks (like "preen").
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/fsck_ffs/setup.c
--- a/head/sbin/fsck_ffs/setup.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/fsck_ffs/setup.c Fri Mar 02 17:01:51 2012 +0200
@@ -33,7 +33,7 @@
#endif /* not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sbin/fsck_ffs/setup.c 231377 2012-02-10 12:01:19Z trasz $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -194,7 +194,7 @@
"-b OPTION TO FSCK TO SPECIFY THE",
"LOCATION OF AN ALTERNATE",
"SUPER-BLOCK TO SUPPLY NEEDED",
- "INFORMATION; SEE fsck(8).");
+ "INFORMATION; SEE fsck_ffs(8).");
bflag = 0;
return(0);
}
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/fsdb/Makefile
--- a/head/sbin/fsdb/Makefile Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/fsdb/Makefile Fri Mar 02 17:01:51 2012 +0200
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.1.1.1 1995/10/08 23:08:36 thorpej Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
-# $FreeBSD: head/sbin/fsdb/Makefile 228693 2011-12-18 17:42:26Z dim $
+# $FreeBSD: head/sbin/fsdb/Makefile 232263 2012-02-28 18:30:18Z dim $
PROG= fsdb
MAN= fsdb.8
@@ -9,10 +9,8 @@
pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c
CFLAGS+= -I${.CURDIR}/../fsck_ffs
WARNS?= 2
-.if ${CC:T:Mclang} == "clang"
# Work around a problem with format string warnings and ntohs macros.
-NO_WFORMAT=
-.endif
+NO_WFORMAT.clang=
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAP}
.PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/fsdb/fsdbutil.c
--- a/head/sbin/fsdb/fsdbutil.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/fsdb/fsdbutil.c Fri Mar 02 17:01:51 2012 +0200
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "$FreeBSD: head/sbin/fsdb/fsdbutil.c 228693 2011-12-18 17:42:26Z dim $";
+ "$FreeBSD: head/sbin/fsdb/fsdbutil.c 231102 2012-02-06 21:50:11Z truckman $";
#endif /* not lint */
#include <sys/param.h>
@@ -293,22 +293,21 @@
printf("Blocks for inode %d:\n", inum);
printf("Direct blocks:\n");
ndb = howmany(DIP(dp, di_size), sblock.fs_bsize);
- for (i = 0; i < NDADDR; i++) {
- if (DIP(dp, di_db[i]) == 0) {
- putchar('\n');
- return;
- }
+ for (i = 0; i < NDADDR && i < ndb; i++) {
if (i > 0)
printf(", ");
blkno = DIP(dp, di_db[i]);
printf("%jd", (intmax_t)blkno);
- if (--ndb == 0 && (offset = blkoff(&sblock, DIP(dp, di_size))) != 0) {
+ }
+ if (ndb <= NDADDR) {
+ offset = blkoff(&sblock, DIP(dp, di_size));
+ if (offset != 0) {
nfrags = numfrags(&sblock, fragroundup(&sblock, offset));
printf(" (%d frag%s)", nfrags, nfrags > 1? "s": "");
}
}
putchar('\n');
- if (ndb == 0)
+ if (ndb <= NDADDR)
return;
bufp = malloc((unsigned int)sblock.fs_bsize);
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/geom/class/sched/gsched.8
--- a/head/sbin/geom/class/sched/gsched.8 Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/geom/class/sched/gsched.8 Fri Mar 02 17:01:51 2012 +0200
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/sbin/geom/class/sched/gsched.8 231992 2012-02-22 04:51:17Z eadler $
.\"
.Dd August 29, 2010
.Dt GSCHED 8
@@ -141,7 +141,7 @@
# Load the geom_sched module:
kldload geom_sched
# Load some scheduler classes used by geom_sched:
-kldload gsched_rr gsched_as
+kldload gsched_rr
# Configure device ad0 to use scheduler "rr":
geom sched insert -a rr ad0
# Now provider ad0 uses the "rr" algorithm;
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/hastd/parse.y
--- a/head/sbin/hastd/parse.y Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/hastd/parse.y Fri Mar 02 17:01:51 2012 +0200
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sbin/hastd/parse.y 230436 2012-01-21 20:13:37Z pjd $
+ * $FreeBSD: head/sbin/hastd/parse.y 230976 2012-02-04 07:59:12Z pjd $
*/
#include <sys/param.h> /* MAXHOSTNAMELEN */
@@ -85,7 +85,7 @@
size_t bufsize;
/*
- * First check if the give name matches our full hostname.
+ * First check if the given name matches our full hostname.
*/
if (gethostname(buf, sizeof(buf)) < 0) {
pjdlog_errno(LOG_ERR, "gethostname() failed");
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/hastd/primary.c
--- a/head/sbin/hastd/primary.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/hastd/primary.c Fri Mar 02 17:01:51 2012 +0200
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 229945 2012-01-10 22:39:07Z pjd $");
+__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 231016 2012-02-05 15:23:32Z trociny $");
#include <sys/types.h>
#include <sys/time.h>
@@ -1255,7 +1255,7 @@
pjdlog_debug(2,
"ggate_recv: (%p) Moving request to the send queues.", hio);
refcount_init(&hio->hio_countdown, ncomps);
- for (ii = ncomp; ii < ncomps; ii++)
+ for (ii = ncomp; ii < ncomp + ncomps; ii++)
QUEUE_INSERT1(hio, send, ii);
}
/* NOTREACHED */
@@ -1326,7 +1326,8 @@
} else {
hio->hio_errors[ncomp] = 0;
if (hio->hio_replication ==
- HAST_REPLICATION_ASYNC) {
+ HAST_REPLICATION_ASYNC &&
+ !ISSYNCREQ(hio)) {
ggio->gctl_error = 0;
write_complete(res, hio);
}
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/hastd/rangelock.c
--- a/head/sbin/hastd/rangelock.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/hastd/rangelock.c Fri Mar 02 17:01:51 2012 +0200
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sbin/hastd/rangelock.c 225787 2011-09-27 08:50:37Z pjd $");
+__FBSDID("$FreeBSD: head/sbin/hastd/rangelock.c 231525 2012-02-11 16:41:52Z pjd $");
#include <sys/queue.h>
@@ -128,15 +128,13 @@
rangelock_islocked(struct rangelocks *rls, off_t offset, off_t length)
{
struct rlock *rl;
+ off_t end;
PJDLOG_ASSERT(rls->rls_magic == RANGELOCKS_MAGIC);
+ end = offset + length;
TAILQ_FOREACH(rl, &rls->rls_locks, rl_next) {
- if (rl->rl_start >= offset && rl->rl_start < offset + length)
- break;
- else if (rl->rl_end > offset && rl->rl_end <= offset + length)
- break;
- else if (rl->rl_start < offset && rl->rl_end > offset + length)
+ if (rl->rl_start < end && rl->rl_end > offset)
break;
}
return (rl != NULL);
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/ifconfig/Makefile
--- a/head/sbin/ifconfig/Makefile Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/ifconfig/Makefile Fri Mar 02 17:01:51 2012 +0200
@@ -1,5 +1,5 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/5/93
-# $FreeBSD: head/sbin/ifconfig/Makefile 228577 2011-12-16 14:30:58Z glebius $
+# $FreeBSD: head/sbin/ifconfig/Makefile 231642 2012-02-14 07:14:42Z rmh $
.include <bsd.own.mk>
@@ -63,6 +63,11 @@
DPADD+= ${LIBIPX}
LDADD+= -lipx
.endif
+.if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE)
+CFLAGS+= -DJAIL
+DPADD+= ${LIBJAIL}
+LDADD+= -ljail
+.endif
MAN= ifconfig.8
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/ifconfig/ifconfig.8
--- a/head/sbin/ifconfig/ifconfig.8 Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/ifconfig/ifconfig.8 Fri Mar 02 17:01:51 2012 +0200
@@ -26,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
-.\" $FreeBSD: head/sbin/ifconfig/ifconfig.8 229518 2012-01-04 21:04:57Z rwatson $
+.\" $FreeBSD: head/sbin/ifconfig/ifconfig.8 232316 2012-02-29 21:11:02Z brueffer $
.\"
-.Dd January 4, 2012
+.Dd February 29, 2012
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -1036,7 +1036,7 @@
DFS embodies several facilities including detection of overlapping
radar signals, dynamic transmit power control, and channel selection
according to a least-congested criteria.
-DFS support is mandatory for some 5Ghz frequencies in certain
+DFS support is mandatory for some 5GHz frequencies in certain
locales (e.g. ETSI).
By default DFS is enabled according to the regulatory definitions
specified in /etc/regdomain.xml and the current country code, regdomain,
@@ -1091,7 +1091,7 @@
.It Cm quiet
Enable the use of quiet IE. Hostap will use this to silent other
stations to reduce interference for radar detection when
-operating on 5Ghz frequency and doth support is enabled.
+operating on 5GHz frequency and doth support is enabled.
Use
.Fl quiet
to disable this functionality.
@@ -2106,7 +2106,7 @@
.It Cm maxaddr Ar size
Set the size of the bridge address cache to
.Ar size .
-The default is 100 entries.
+The default is 2000 entries.
.It Cm timeout Ar seconds
Set the timeout of address cache entries to
.Ar seconds
@@ -2114,7 +2114,7 @@
If
.Ar seconds
is zero, then address cache entries will not be expired.
-The default is 240 seconds.
+The default is 1200 seconds.
.It Cm addr
Display the addresses that have been learned by the bridge.
.It Cm static Ar interface-name Ar address
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/ifconfig/ifconfig.c
--- a/head/sbin/ifconfig/ifconfig.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/ifconfig/ifconfig.c Fri Mar 02 17:01:51 2012 +0200
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#endif
static const char rcsid[] =
- "$FreeBSD: head/sbin/ifconfig/ifconfig.c 228571 2011-12-16 12:16:56Z glebius $";
+ "$FreeBSD: head/sbin/ifconfig/ifconfig.c 231642 2012-02-14 07:14:42Z rmh $";
#endif /* not lint */
#include <sys/param.h>
@@ -66,7 +66,7 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
-#ifndef WITHOUT_JAIL_SUPPORT
+#ifdef JAIL
#include <jail.h>
#endif
#include <stdio.h>
@@ -257,6 +257,7 @@
ifconfig(argc, argv, 1, NULL);
exit(0);
}
+#ifdef JAIL
/*
* NOTE: We have to special-case the `-vnet' command
* right here as we would otherwise fail when trying
@@ -270,6 +271,7 @@
ifconfig(argc, argv, 0, NULL);
exit(0);
}
+#endif
errx(1, "interface %s does not exist", ifname);
}
}
@@ -690,7 +692,7 @@
err(1, "SIOCDIFPHYADDR");
}
-#ifndef WITHOUT_JAIL_SUPPORT
+#ifdef JAIL
static void
setifvnet(const char *jname, int dummy __unused, int s,
const struct afswtch *afp)
@@ -1177,7 +1179,7 @@
DEF_CMD_ARG2("tunnel", settunnel),
DEF_CMD("-tunnel", 0, deletetunnel),
DEF_CMD("deletetunnel", 0, deletetunnel),
-#ifndef WITHOUT_JAIL_SUPPORT
+#ifdef JAIL
DEF_CMD_ARG("vnet", setifvnet),
DEF_CMD_ARG("-vnet", setifrvnet),
#endif
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/init/init.8
--- a/head/sbin/init/init.8 Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/init/init.8 Fri Mar 02 17:01:51 2012 +0200
@@ -29,9 +29,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)init.8 8.3 (Berkeley) 4/18/94
-.\" $FreeBSD: head/sbin/init/init.8 226436 2011-10-16 14:30:28Z eadler $
+.\" $FreeBSD: head/sbin/init/init.8 231534 2012-02-11 20:47:16Z ed $
.\"
-.Dd January 23, 2011
+.Dd February 11, 2012
.Dt INIT 8
.Os
.Sh NAME
@@ -146,14 +146,7 @@
When this shell
dies, either because the user logged out
or an abnormal termination occurred (a signal),
-.Nm login
-records the logout in the user accounting
-database (see
-.Xr getutxent 3)
-and terminates.
-The cycle is
-then restarted by
-.Nm
+the cycle is restarted by
executing a new
.Nm getty
for the line.
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/init/init.c
--- a/head/sbin/init/init.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/init/init.c Fri Mar 02 17:01:51 2012 +0200
@@ -41,7 +41,7 @@
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93";
#endif
static const char rcsid[] =
- "$FreeBSD: head/sbin/init/init.c 227081 2011-11-04 13:36:02Z ed $";
+ "$FreeBSD: head/sbin/init/init.c 231994 2012-02-22 06:27:20Z kevlo $";
#endif /* not lint */
#include <sys/param.h>
@@ -66,7 +66,6 @@
#include <time.h>
#include <ttyent.h>
#include <unistd.h>
-#include <utmpx.h>
#include <sys/reboot.h>
#include <err.h>
@@ -181,8 +180,6 @@
#endif
static int clang;
-static void clear_session_logs(session_t *);
-
static int start_session_db(void);
static void add_session(session_t *);
static void del_session(session_t *);
@@ -567,20 +564,6 @@
}
/*
- * Close out the accounting files for a login session.
- * NB: should send a message to the session logger to avoid blocking.
- */
-static void
-clear_session_logs(session_t *sp __unused)
-{
-
- /*
- * XXX: Use getutxline() and call pututxline() for each entry.
- * Is this safe to do this here? Is it really required anyway?
- */
-}
-
-/*
* Start a session and allocate a controlling terminal.
* Only called by children of init after forking.
*/
@@ -674,7 +657,8 @@
_exit(0);
password = crypt(clear, pp->pw_passwd);
bzero(clear, _PASSWORD_LEN);
- if (strcmp(password, pp->pw_passwd) == 0)
+ if (password == NULL ||
+ strcmp(password, pp->pw_passwd) == 0)
break;
warning("single-user login failed\n");
}
@@ -780,17 +764,12 @@
static state_func_t
runcom(void)
{
- struct utmpx utx;
state_func_t next_transition;
if ((next_transition = run_script(_PATH_RUNCOM)) != 0)
return next_transition;
runcom_mode = AUTOBOOT; /* the default */
- /* NB: should send a message to the session logger to avoid blocking. */
- utx.ut_type = BOOT_TIME;
- gettimeofday(&utx.ut_tv, NULL);
- pututxline(&utx);
return (state_func_t) read_ttys;
}
@@ -1119,8 +1098,6 @@
* There shouldn't be any, but just in case...
*/
for (sp = sessions; sp; sp = snext) {
- if (sp->se_process)
- clear_session_logs(sp);
snext = sp->se_next;
free_session(sp);
}
@@ -1274,7 +1251,6 @@
if (! (sp = find_session(pid)))
return;
- clear_session_logs(sp);
del_session(sp);
sp->se_process = 0;
@@ -1504,14 +1480,8 @@
static state_func_t
death(void)
{
- struct utmpx utx;
session_t *sp;
- /* NB: should send a message to the session logger to avoid blocking. */
- utx.ut_type = SHUTDOWN_TIME;
- gettimeofday(&utx.ut_tv, NULL);
- pututxline(&utx);
-
/*
* Also revoke the TTY here. Because runshutdown() may reopen
* the TTY whose getty we're killing here, there is no guarantee
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/ipfw/dummynet.c
--- a/head/sbin/ipfw/dummynet.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/ipfw/dummynet.c Fri Mar 02 17:01:51 2012 +0200
@@ -10,7 +10,7 @@
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
- * $FreeBSD: head/sbin/ipfw/dummynet.c 220804 2011-04-18 22:09:03Z glebius $
+ * $FreeBSD: head/sbin/ipfw/dummynet.c 232347 2012-03-01 17:35:16Z luigi $
*
* dummynet support
*/
@@ -761,7 +761,6 @@
{
int i, j;
char *end;
- void *par = NULL;
struct dn_id *buf, *base;
struct dn_sch *sch = NULL;
struct dn_link *p = NULL;
@@ -905,7 +904,6 @@
* per-flow queue, mask is dst_ip, dst_port,
* src_ip, src_port, proto measured in bits
*/
- par = NULL;
bzero(mask, sizeof(*mask));
end = NULL;
@@ -1179,7 +1177,6 @@
if (fs->flags & DN_IS_RED) {
size_t len;
int lookup_depth, avg_pkt_size;
- double w_q;
if (fs->min_th >= fs->max_th)
errx(EX_DATAERR, "min_th %d must be < than max_th %d",
@@ -1205,6 +1202,7 @@
"net.inet.ip.dummynet.red_avg_pkt_size must"
" be greater than zero");
+#if 0 /* the following computation is now done in the kernel */
/*
* Ticks needed for sending a medium-sized packet.
* Unfortunately, when we are configuring a WF2Q+ queue, we
@@ -1214,19 +1212,16 @@
* correct. But on the other hand, why do we want RED with
* WF2Q+ ?
*/
-#if 0
if (p.bandwidth==0) /* this is a WF2Q+ queue */
s = 0;
else
s = (double)ck.hz * avg_pkt_size * 8 / p.bandwidth;
-#endif
/*
* max idle time (in ticks) before avg queue size becomes 0.
* NOTA: (3/w_q) is approx the value x so that
* (1-w_q)^x < 10^-3.
*/
w_q = ((double)fs->w_q) / (1 << SCALE_RED);
-#if 0 // go in kernel
idle = s * 3. / w_q;
fs->lookup_step = (int)idle / lookup_depth;
if (!fs->lookup_step)
@@ -1235,7 +1230,7 @@
for (t = fs->lookup_step; t > 1; --t)
weight *= 1 - w_q;
fs->lookup_weight = (int)(weight * (1 << SCALE_RED));
-#endif
+#endif /* code moved in the kernel */
}
}
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/ipfw/ipfw.8
--- a/head/sbin/ipfw/ipfw.8 Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/ipfw/ipfw.8 Fri Mar 02 17:01:51 2012 +0200
@@ -1,7 +1,7 @@
.\"
-.\" $FreeBSD: head/sbin/ipfw/ipfw.8 227419 2011-11-10 12:05:26Z glebius $
+.\" $FreeBSD: head/sbin/ipfw/ipfw.8 232250 2012-02-28 13:19:34Z gavin $
.\"
-.Dd November 10, 2011
+.Dd February 6, 2012
.Dt IPFW 8
.Os
.Sh NAME
@@ -1652,10 +1652,12 @@
TCP packets only.
Match if the TCP header sequence number field is set to
.Ar seq .
-.It Cm tcpwin Ar win
-TCP packets only.
-Match if the TCP header window field is set to
-.Ar win .
+.It Cm tcpwin Ar tcpwin-list
+Matches TCP packets whose header window field is set to
+.Ar tcpwin-list ,
+which is either a single value or a list of values or ranges
+specified in the same way as
+.Ar ports .
.It Cm tcpoptions Ar spec
TCP packets only.
Match if the TCP header contains the comma separated list of
@@ -2233,7 +2235,7 @@
is just a FIFO scheduler (which means that all packets
are stored in the same queue as they arrive to the scheduler).
FIFO has O(1) per-packet time complexity, with very low
-constants (estimate 60-80ns on a 2Ghz desktop machine)
+constants (estimate 60-80ns on a 2GHz desktop machine)
but gives no service guarantees.
.It Cm wf2qp
implements the WF2Q+ algorithm, which is a Weighted Fair Queueing
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/ipfw/ipfw2.c
--- a/head/sbin/ipfw/ipfw2.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/ipfw/ipfw2.c Fri Mar 02 17:01:51 2012 +0200
@@ -17,7 +17,7 @@
*
* NEW command line interface for IP firewall facility
*
- * $FreeBSD: head/sbin/ipfw/ipfw2.c 229778 2012-01-07 16:09:33Z uqs $
+ * $FreeBSD: head/sbin/ipfw/ipfw2.c 231076 2012-02-06 11:35:29Z glebius $
*/
#include <sys/types.h>
@@ -512,6 +512,7 @@
{"ipttl", O_IPTTL},
{"mac-type", O_MAC_TYPE},
{"tcpdatalen", O_TCPDATALEN},
+ {"tcpwin", O_TCPWIN},
{"tagged", O_TAGGED},
{NULL, 0}
};
@@ -1480,7 +1481,11 @@
break;
case O_TCPWIN:
- printf(" tcpwin %d", ntohs(cmd->arg1));
+ if (F_LEN(cmd) == 1)
+ printf(" tcpwin %u", cmd->arg1);
+ else
+ print_newports((ipfw_insn_u16 *)cmd, 0,
+ O_TCPWIN);
break;
case O_TCPACK:
@@ -3447,8 +3452,12 @@
case TOK_TCPWIN:
NEED1("tcpwin requires length");
- fill_cmd(cmd, O_TCPWIN, 0,
- htons(strtoul(*av, NULL, 0)));
+ if (strpbrk(*av, "-,")) {
+ if (!add_ports(cmd, *av, 0, O_TCPWIN))
+ errx(EX_DATAERR, "invalid tcpwin len %s", *av);
+ } else
+ fill_cmd(cmd, O_TCPWIN, 0,
+ strtoul(*av, NULL, 0));
av++;
break;
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/iscontrol/iscsi.conf.5
--- a/head/sbin/iscontrol/iscsi.conf.5 Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/iscontrol/iscsi.conf.5 Fri Mar 02 17:01:51 2012 +0200
@@ -22,9 +22,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/sbin/iscontrol/iscsi.conf.5 232158 2012-02-25 15:21:43Z gjb $
.\"
-.Dd June 5, 2007
+.Dd February 25, 2012
.Dt ISCSI.CONF 5
.Os
.Sh NAME
@@ -39,7 +39,7 @@
It contains declarations and parameter/key-options.
The syntax is very simple,
.D1 Li variable = value;
-and they can be grouped via a
+and they can be grouped via a
.Em block
declaration:
.Bf Li
@@ -60,7 +60,7 @@
digest either MD5 or SHA.
Default is none.
.It Cm HeaderDigest
-a
+a
.Em digest
is calculated on the header of all iSCSI PDUs, and
checked.
@@ -113,7 +113,7 @@
.It Cm MaxOutstandingR2T
is used to calculate/negotiate the
.Em tag opening ,
-can be overriden by the
+can be overridden by the
.Sy tag
option.
.It Cm DataPDUInOrder
@@ -141,7 +141,7 @@
.It Cm maxluns
overrides the compiled value of
.Sy luns ,
-see
+see
.Xr iscsi_initiator 4 .
This value can only be reduced.
.It Cm sockbufsize
@@ -185,7 +185,7 @@
targetaddress = iscsi1
targetname = iqn.1900.com.com:sn.123456
}
-chaptest {
+chaptest {
targetaddress= 10.0.0.1;
targetname = iqn.1900.com.com:sn.123456
initiatorname= iqn.2005-01.il.ac.huji.cs:nobody
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/newfs_msdos/newfs_msdos.8
--- a/head/sbin/newfs_msdos/newfs_msdos.8 Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/newfs_msdos/newfs_msdos.8 Fri Mar 02 17:01:51 2012 +0200
@@ -23,7 +23,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: head/sbin/newfs_msdos/newfs_msdos.8 228740 2011-12-20 15:50:54Z pfg $
+.\" $FreeBSD: head/sbin/newfs_msdos/newfs_msdos.8 231564 2012-02-12 18:29:56Z ed $
.\"
.Dd July 25, 2010
.Dt NEWFS_MSDOS 8
@@ -180,27 +180,27 @@
below.
.Bd -literal
struct bsbpb {
- u_int16_t bpbBytesPerSec; /* [-S] bytes per sector */
- u_int8_t bpbSecPerClust; /* [-c] sectors per cluster */
- u_int16_t bpbResSectors; /* [-r] reserved sectors */
- u_int8_t bpbFATs; /* [-n] number of FATs */
- u_int16_t bpbRootDirEnts; /* [-e] root directory entries */
- u_int16_t bpbSectors; /* [-s] total sectors */
- u_int8_t bpbMedia; /* [-m] media descriptor */
- u_int16_t bpbFATsecs; /* [-a] sectors per FAT */
- u_int16_t bpbSecPerTrack; /* [-u] sectors per track */
- u_int16_t bpbHeads; /* [-h] drive heads */
- u_int32_t bpbHiddenSecs; /* [-o] hidden sectors */
- u_int32_t bpbHugeSectors; /* [-s] big total sectors */
+ uint16_t bpbBytesPerSec; /* [-S] bytes per sector */
+ uint8_t bpbSecPerClust; /* [-c] sectors per cluster */
+ uint16_t bpbResSectors; /* [-r] reserved sectors */
+ uint8_t bpbFATs; /* [-n] number of FATs */
+ uint16_t bpbRootDirEnts; /* [-e] root directory entries */
+ uint16_t bpbSectors; /* [-s] total sectors */
+ uint8_t bpbMedia; /* [-m] media descriptor */
+ uint16_t bpbFATsecs; /* [-a] sectors per FAT */
+ uint16_t bpbSecPerTrack; /* [-u] sectors per track */
+ uint16_t bpbHeads; /* [-h] drive heads */
+ uint32_t bpbHiddenSecs; /* [-o] hidden sectors */
+ uint32_t bpbHugeSectors; /* [-s] big total sectors */
};
/* FAT32 extensions */
struct bsxbpb {
- u_int32_t bpbBigFATsecs; /* [-a] big sectors per FAT */
- u_int16_t bpbExtFlags; /* control flags */
- u_int16_t bpbFSVers; /* file system version */
- u_int32_t bpbRootClust; /* root directory start cluster */
- u_int16_t bpbFSInfo; /* [-i] file system info sector */
- u_int16_t bpbBackup; /* [-k] backup boot sector */
+ uint32_t bpbBigFATsecs; /* [-a] big sectors per FAT */
+ uint16_t bpbExtFlags; /* control flags */
+ uint16_t bpbFSVers; /* file system version */
+ uint32_t bpbRootClust; /* root directory start cluster */
+ uint16_t bpbFSInfo; /* [-i] file system info sector */
+ uint16_t bpbBackup; /* [-k] backup boot sector */
};
.Ed
.Sh LIMITATION
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/reboot/nextboot.sh
--- a/head/sbin/reboot/nextboot.sh Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/reboot/nextboot.sh Fri Mar 02 17:01:51 2012 +0200
@@ -1,10 +1,30 @@
#! /bin/sh
#
-# Copyright 2002. Gordon Tetlow.
-# gordon at FreeBSD.org
+# Copyright (c) 2002 Gordon Tetlow. All rights reserved.
# Copyright (c) 2012 Sandvine Incorporated. All rights reserved.
#
-# $FreeBSD: head/sbin/reboot/nextboot.sh 230812 2012-01-31 15:32:05Z emaste $
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (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: head/sbin/reboot/nextboot.sh 231129 2012-02-07 14:06:30Z emaste $
delete="NO"
kenv=
diff -r 22418adf039f -r f47f7c6f7737 head/sbin/route/route.c
--- a/head/sbin/route/route.c Fri Mar 02 17:01:18 2012 +0200
+++ b/head/sbin/route/route.c Fri Mar 02 17:01:51 2012 +0200
@@ -40,7 +40,7 @@
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sbin/route/route.c 229766 2012-01-07 09:01:19Z ume $");
+__FBSDID("$FreeBSD: head/sbin/route/route.c 230989 2012-02-04 17:53:22Z hrs $");
#include <sys/param.h>
#include <sys/file.h>
@@ -460,8 +460,8 @@
* Guess at the subnet mask, assuming reasonable
* width subnet fields.
*/
- while (in.s_addr &~ mask)
- mask = (long)mask >> subnetshift;
+ while (in.s_addr & ~mask)
+ mask |= mask >> subnetshift;
net = in.s_addr & mask;
while ((mask & 1) == 0)
mask >>= 1, net >>= 1;
More information about the Zrouter-src-freebsd
mailing list