From owner-svn-src-stable-7@FreeBSD.ORG Sun Feb 5 19:22:20 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAA50106566C; Sun, 5 Feb 2012 19:22:20 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A991E8FC18; Sun, 5 Feb 2012 19:22:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q15JMKXv097068; Sun, 5 Feb 2012 19:22:20 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q15JMKF8097065; Sun, 5 Feb 2012 19:22:20 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201202051922.q15JMKF8097065@svn.freebsd.org> From: Sean Bruno Date: Sun, 5 Feb 2012 19:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231033 - in stable/7: share/man/man4 sys/dev/ciss X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 19:22:21 -0000 Author: sbruno Date: Sun Feb 5 19:22:20 2012 New Revision: 231033 URL: http://svn.freebsd.org/changeset/base/231033 Log: MFC r230313, r230316, r230323, r230588 Support new raid controllers Modified: stable/7/share/man/man4/ciss.4 stable/7/sys/dev/ciss/ciss.c Directory Properties: stable/7/share/man/man4/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/share/man/man4/ciss.4 ============================================================================== --- stable/7/share/man/man4/ciss.4 Sun Feb 5 19:10:48 2012 (r231032) +++ stable/7/share/man/man4/ciss.4 Sun Feb 5 19:22:20 2012 (r231033) @@ -2,7 +2,7 @@ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" -.Dd November 3, 2005 +.Dd January 26, 2012 .Dt CISS 4 .Os .Sh NAME @@ -121,6 +121,10 @@ HP Smart Array E200i .It HP Smart Array P212 .It +HP Smart Array P220i +.It +HP Smart Array P222 +.It HP Smart Array P400 .It HP Smart Array P400i @@ -131,8 +135,16 @@ HP Smart Array P410i .It HP Smart Array P411 .It +HP Smart Array P420 +.It +HP Smart Array P420i +.It +HP Smart Array P421 +.It HP Smart Array P600 .It +HP Smart Array P721m +.It HP Smart Array P800 .It HP Smart Array P812 Modified: stable/7/sys/dev/ciss/ciss.c ============================================================================== --- stable/7/sys/dev/ciss/ciss.c Sun Feb 5 19:10:48 2012 (r231032) +++ stable/7/sys/dev/ciss/ciss.c Sun Feb 5 19:22:20 2012 (r231033) @@ -306,6 +306,13 @@ static struct { 0x103C, 0x3249, CISS_BOARD_SA5, "HP Smart Array P812" }, { 0x103C, 0x324A, CISS_BOARD_SA5, "HP Smart Array P712m" }, { 0x103C, 0x324B, CISS_BOARD_SA5, "HP Smart Array" }, + { 0x103C, 0x3350, CISS_BOARD_SA5, "HP Smart Array P222" }, + { 0x103C, 0x3351, CISS_BOARD_SA5, "HP Smart Array P420" }, + { 0x103C, 0x3352, CISS_BOARD_SA5, "HP Smart Array P421" }, + { 0x103C, 0x3353, CISS_BOARD_SA5, "HP Smart Array P822" }, + { 0x103C, 0x3354, CISS_BOARD_SA5, "HP Smart Array P420i" }, + { 0x103C, 0x3355, CISS_BOARD_SA5, "HP Smart Array P220i" }, + { 0x103C, 0x3356, CISS_BOARD_SA5, "HP Smart Array P721m" }, { 0, 0, 0, NULL } }; @@ -4230,7 +4237,8 @@ ciss_ioctl(struct cdev *dev, u_long cmd, pis->bus = pci_get_bus(sc->ciss_dev); pis->dev_fn = pci_get_slot(sc->ciss_dev); - pis->board_id = pci_get_devid(sc->ciss_dev); + pis->board_id = (pci_get_subvendor(sc->ciss_dev) << 16) | + pci_get_subdevice(sc->ciss_dev); break; } From owner-svn-src-stable-7@FreeBSD.ORG Mon Feb 6 17:31:13 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D255E106566B; Mon, 6 Feb 2012 17:31:13 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C088D8FC0C; Mon, 6 Feb 2012 17:31:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q16HVDQw046202; Mon, 6 Feb 2012 17:31:13 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q16HVDL1046200; Mon, 6 Feb 2012 17:31:13 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201202061731.q16HVDL1046200@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 6 Feb 2012 17:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231090 - stable/7/sys/fs/pseudofs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2012 17:31:13 -0000 Author: jh Date: Mon Feb 6 17:31:13 2012 New Revision: 231090 URL: http://svn.freebsd.org/changeset/base/231090 Log: MFC r229692: Check the return value of sbuf_finish() in pfs_readlink() and return ENAMETOOLONG if the buffer overflowed. Modified: stable/7/sys/fs/pseudofs/pseudofs_vnops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- stable/7/sys/fs/pseudofs/pseudofs_vnops.c Mon Feb 6 17:28:55 2012 (r231089) +++ stable/7/sys/fs/pseudofs/pseudofs_vnops.c Mon Feb 6 17:31:13 2012 (r231090) @@ -805,7 +805,11 @@ pfs_readlink(struct vop_readlink_args *v PFS_RETURN (error); } - sbuf_finish(&sb); + if (sbuf_finish(&sb) != 0) { + sbuf_delete(&sb); + PFS_RETURN (ENAMETOOLONG); + } + error = uiomove_frombuf(sbuf_data(&sb), sbuf_len(&sb), uio); sbuf_delete(&sb); PFS_RETURN (error); From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 07:34:03 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C06C9106566B; Wed, 8 Feb 2012 07:34:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAEFB8FC14; Wed, 8 Feb 2012 07:34:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q187Y3hR028366; Wed, 8 Feb 2012 07:34:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q187Y3XM028364; Wed, 8 Feb 2012 07:34:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201202080734.q187Y3XM028364@svn.freebsd.org> From: Alexander Motin Date: Wed, 8 Feb 2012 07:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231190 - stable/7/sys/vm X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 07:34:03 -0000 Author: mav Date: Wed Feb 8 07:34:03 2012 New Revision: 231190 URL: http://svn.freebsd.org/changeset/base/231190 Log: MFC 230877: Fix NULL dereference panic on attempt to turn off (on system shutdown) disconnected swap device. This is quick and imperfect solution, as swap device will still be opened and GEOM will not be able to destroy it. Proper solution would be to automatically turn off and close disconnected swap device, but with existing code it will cause panic if there is at least one page on device, even if it is unimportant page of the user-level process. It needs some work. Modified: stable/7/sys/vm/swap_pager.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/vm/swap_pager.c ============================================================================== --- stable/7/sys/vm/swap_pager.c Wed Feb 8 07:31:55 2012 (r231189) +++ stable/7/sys/vm/swap_pager.c Wed Feb 8 07:34:03 2012 (r231190) @@ -2368,7 +2368,7 @@ swapgeom_orphan(struct g_consumer *cp) mtx_lock(&sw_dev_mtx); TAILQ_FOREACH(sp, &swtailq, sw_list) if (sp->sw_id == cp) - sp->sw_id = NULL; + sp->sw_flags |= SW_CLOSING; mtx_unlock(&sw_dev_mtx); } From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 15:38:37 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C2A9106564A; Wed, 8 Feb 2012 15:38:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A3DF8FC12; Wed, 8 Feb 2012 15:38:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18FcbnH049140; Wed, 8 Feb 2012 15:38:37 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18FcaTu049138; Wed, 8 Feb 2012 15:38:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081538.q18FcaTu049138@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 15:38:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231207 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 15:38:37 -0000 Author: bz Date: Wed Feb 8 15:38:36 2012 New Revision: 231207 URL: http://svn.freebsd.org/changeset/base/231207 Log: MFC r225030: While not explicitly allowed by RFC 2460, in case there is no translation technology involved (and that section is suggested to be removed by Errata 2843), single packet fragments do not harm. There is another errata and further drafts under discussion to clarify on these kinds of packets. Meanwhile add a sysctl to allow disabling this behaviour again. We will treat single packet fragment (a fragment header added when not needed) as if there was no fragment header. Submitted by: Matthew Luckie (mjl luckie.org.nz) (original version) PR: kern/145733 Modified: stable/7/sys/netinet/ip_fw2.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/ip_fw2.c ============================================================================== --- stable/7/sys/netinet/ip_fw2.c Wed Feb 8 15:37:34 2012 (r231206) +++ stable/7/sys/netinet/ip_fw2.c Wed Feb 8 15:38:36 2012 (r231207) @@ -110,6 +110,9 @@ static u_int32_t set_disable; static int fw_verbose; static struct callout ipfw_timeout; static int verbose_limit; +#ifdef INET6 +static int fw_permit_single_frag6 = 1; +#endif #ifdef IPFIREWALL_DEFAULT_TO_ACCEPT static int default_to_accept = 1; @@ -2158,10 +2161,14 @@ ipfw_chk(struct ip_fw_args *args) * we have a fragment at this offset of an IPv4 packet. * offset == 0 means that (if this is an IPv4 packet) * this is the first or only fragment. - * For IPv6 offset == 0 means there is no Fragment Header. + * For IPv6 offset == 0 means there is no Fragment Header or there + * is a single packet fragement (fragement header added without + * needed). We will treat a single packet fragment as if there + * was no fragment header (or log/block depending on the + * fw_permit_single_frag6 sysctl setting). * If offset != 0 for IPv6 always use correct mask to - * get the correct offset because we add IP6F_MORE_FRAG - * to be able to dectect the first fragment which would + * get the correct offset because we add IP6F_MORE_FRAG to be able + * to dectect the first of multiple fragments which would * otherwise have offset = 0. */ u_short offset = 0; @@ -2318,10 +2325,11 @@ do { \ offset = ((struct ip6_frag *)ulp)->ip6f_offlg & IP6F_OFF_MASK; /* Add IP6F_MORE_FRAG for offset of first - * fragment to be != 0. */ + * fragment to be != 0 if there shall be more. */ offset |= ((struct ip6_frag *)ulp)->ip6f_offlg & IP6F_MORE_FRAG; - if (offset == 0) { + if (fw_permit_single_frag6 == 0 && + offset == 0) { printf("IPFW2: IPV6 - Invalid Fragment " "Header\n"); if (fw_deny_unknown_exthdrs) @@ -4506,6 +4514,10 @@ ipfw_init(void) OID_AUTO, "deny_unknown_exthdrs", CTLFLAG_RW | CTLFLAG_SECURE, &fw_deny_unknown_exthdrs, 0, "Deny packets with unknown IPv6 Extension Headers"); + SYSCTL_ADD_INT(&ip6_fw_sysctl_ctx, SYSCTL_CHILDREN(ip6_fw_sysctl_tree), + OID_AUTO, "permit_single_frag6", CTLFLAG_RW | CTLFLAG_SECURE, + &fw_permit_single_frag6, 0, + "Permit single packet IPv6 fragments"); #endif layer3_chain.rules = NULL; From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 16:07:08 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 123CA106566B; Wed, 8 Feb 2012 16:07:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9CB58FC14; Wed, 8 Feb 2012 16:07:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18G77mA050265; Wed, 8 Feb 2012 16:07:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18G774q050262; Wed, 8 Feb 2012 16:07:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081607.q18G774q050262@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 16:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231209 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 16:07:08 -0000 Author: bz Date: Wed Feb 8 16:07:07 2012 New Revision: 231209 URL: http://svn.freebsd.org/changeset/base/231209 Log: MFC r225032,225034: ipfw internally checks for offset == 0 to determine whether the packet is a/the first fragment or not. For IPv6 we have added the "more fragments" flag as well to be able to determine on whether there will be more as we do not have the fragment header avaialble for logging, while for IPv4 this information can be derived directly from the IPv4 header. This allowed fragmented packets to bypass normal rules as proper masking was not done when checking offset. Split variables to not need masking for IPv6 to avoid further errors. After r225032 fix logging in a similar way masking the the IPv6 more fragments flag off so that offset == 0 checks work properly. Submitted by: Matthew Luckie (mjl luckie.org.nz) PR: kern/145733 Modified: stable/7/sys/netinet/ip_fw2.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/ip_fw2.c ============================================================================== --- stable/7/sys/netinet/ip_fw2.c Wed Feb 8 16:03:05 2012 (r231208) +++ stable/7/sys/netinet/ip_fw2.c Wed Feb 8 16:07:07 2012 (r231209) @@ -897,10 +897,14 @@ ipfw_log(struct ip_fw *f, u_int hlen, st #ifdef INET6 struct ip6_hdr *ip6 = NULL; struct icmp6_hdr *icmp6; + u_short ip6f_mf; #endif src[0] = '\0'; dst[0] = '\0'; #ifdef INET6 + ip6f_mf = offset & IP6F_MORE_FRAG; + offset &= IP6F_OFF_MASK; + if (IS_IP6_FLOW_ID(&(args->f_id))) { char ip6buf[INET6_ADDRSTRLEN]; snprintf(src, sizeof(src), "[%s]", @@ -982,8 +986,7 @@ ipfw_log(struct ip_fw *f, u_int hlen, st " (frag %08x:%d@%d%s)", args->f_id.frag_id6, ntohs(ip6->ip6_plen) - hlen, - ntohs(offset & IP6F_OFF_MASK) << 3, - (offset & IP6F_MORE_FRAG) ? "+" : ""); + ntohs(offset) << 3, ip6f_mf ? "+" : ""); } else #endif { @@ -2161,17 +2164,14 @@ ipfw_chk(struct ip_fw_args *args) * we have a fragment at this offset of an IPv4 packet. * offset == 0 means that (if this is an IPv4 packet) * this is the first or only fragment. - * For IPv6 offset == 0 means there is no Fragment Header or there - * is a single packet fragement (fragement header added without - * needed). We will treat a single packet fragment as if there - * was no fragment header (or log/block depending on the + * For IPv6 offset|ip6f_mf == 0 means there is no Fragment Header + * or there is a single packet fragement (fragement header added + * without needed). We will treat a single packet fragment as if + * there was no fragment header (or log/block depending on the * fw_permit_single_frag6 sysctl setting). - * If offset != 0 for IPv6 always use correct mask to - * get the correct offset because we add IP6F_MORE_FRAG to be able - * to dectect the first of multiple fragments which would - * otherwise have offset = 0. */ u_short offset = 0; + u_short ip6f_mf = 0; /* * Local copies of addresses. They are only valid if we have @@ -2324,12 +2324,10 @@ do { \ proto = ((struct ip6_frag *)ulp)->ip6f_nxt; offset = ((struct ip6_frag *)ulp)->ip6f_offlg & IP6F_OFF_MASK; - /* Add IP6F_MORE_FRAG for offset of first - * fragment to be != 0 if there shall be more. */ - offset |= ((struct ip6_frag *)ulp)->ip6f_offlg & + ip6f_mf = ((struct ip6_frag *)ulp)->ip6f_offlg & IP6F_MORE_FRAG; if (fw_permit_single_frag6 == 0 && - offset == 0) { + offset == 0 && ip6f_mf == 0) { printf("IPFW2: IPV6 - Invalid Fragment " "Header\n"); if (fw_deny_unknown_exthdrs) @@ -2918,7 +2916,7 @@ check_body: case O_LOG: if (fw_verbose) ipfw_log(f, hlen, args, m, - oif, offset, tablearg, ip); + oif, offset | ip6f_mf, tablearg, ip); match = 1; break; From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 16:26:01 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3A0F1065676; Wed, 8 Feb 2012 16:26:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D21088FC1D; Wed, 8 Feb 2012 16:26:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18GQ16w051034; Wed, 8 Feb 2012 16:26:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18GQ1gu051032; Wed, 8 Feb 2012 16:26:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081626.q18GQ1gu051032@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 16:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231211 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 16:26:02 -0000 Author: bz Date: Wed Feb 8 16:26:01 2012 New Revision: 231211 URL: http://svn.freebsd.org/changeset/base/231211 Log: MFC r225033: If we detect an IPv6 fragment header and it is not the first fragment, then terminate the loop as we will not find any further headers and for short fragments this could otherwise lead to a pullup error discarding the fragment. Submitted by: Matthew Luckie (mjl luckie.org.nz) PR: kern/145733 Modified: stable/7/sys/netinet/ip_fw2.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/ip_fw2.c ============================================================================== --- stable/7/sys/netinet/ip_fw2.c Wed Feb 8 16:24:56 2012 (r231210) +++ stable/7/sys/netinet/ip_fw2.c Wed Feb 8 16:26:01 2012 (r231211) @@ -2260,7 +2260,7 @@ do { \ proto = ip6->ip6_nxt; /* Search extension headers to find upper layer protocols */ - while (ulp == NULL) { + while (ulp == NULL && offset == 0) { switch (proto) { case IPPROTO_ICMPV6: PULLUP_TO(hlen, ulp, struct icmp6_hdr); From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 16:45:21 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0248C1065744; Wed, 8 Feb 2012 16:45:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CADC18FC17; Wed, 8 Feb 2012 16:45:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18GjKbr051807; Wed, 8 Feb 2012 16:45:20 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18GjKL4051805; Wed, 8 Feb 2012 16:45:20 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081645.q18GjKL4051805@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 16:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231213 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 16:45:21 -0000 Author: bz Date: Wed Feb 8 16:45:20 2012 New Revision: 231213 URL: http://svn.freebsd.org/changeset/base/231213 Log: MFC r225036: Hide IPv6 next header parsing warnings under the verbose sysctl so people can possibly disable it when their consoles are flooded, or enabled it for debugging. Modified: stable/7/sys/netinet/ip_fw2.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/ip_fw2.c ============================================================================== --- stable/7/sys/netinet/ip_fw2.c Wed Feb 8 16:44:54 2012 (r231212) +++ stable/7/sys/netinet/ip_fw2.c Wed Feb 8 16:45:20 2012 (r231213) @@ -2304,9 +2304,11 @@ do { \ ext_hd |= EXT_RTHDR2; break; default: - printf("IPFW2: IPV6 - Unknown Routing " - "Header type(%d)\n", - ((struct ip6_rthdr *)ulp)->ip6r_type); + if (fw_verbose) + printf("IPFW2: IPV6 - Unknown " + "Routing Header type(%d)\n", + ((struct ip6_rthdr *) + ulp)->ip6r_type); if (fw_deny_unknown_exthdrs) return (IP_FW_DENY); break; @@ -2328,8 +2330,9 @@ do { \ IP6F_MORE_FRAG; if (fw_permit_single_frag6 == 0 && offset == 0 && ip6f_mf == 0) { - printf("IPFW2: IPV6 - Invalid Fragment " - "Header\n"); + if (fw_verbose) + printf("IPFW2: IPV6 - Invalid " + "Fragment Header\n"); if (fw_deny_unknown_exthdrs) return (IP_FW_DENY); break; @@ -2400,8 +2403,10 @@ do { \ break; default: - printf("IPFW2: IPV6 - Unknown Extension " - "Header(%d), ext_hd=%x\n", proto, ext_hd); + if (fw_verbose) + printf("IPFW2: IPV6 - Unknown " + "Extension Header(%d), ext_hd=%x\n", + proto, ext_hd); if (fw_deny_unknown_exthdrs) return (IP_FW_DENY); PULLUP_TO(hlen, ulp, struct ip6_ext); From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 17:03:31 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DE231065677; Wed, 8 Feb 2012 17:03:31 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C5668FC19; Wed, 8 Feb 2012 17:03:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18H3VuQ052497; Wed, 8 Feb 2012 17:03:31 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18H3VKv052495; Wed, 8 Feb 2012 17:03:31 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081703.q18H3VKv052495@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 17:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231215 - stable/7/sys/dev/mfi X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 17:03:31 -0000 Author: bz Date: Wed Feb 8 17:03:30 2012 New Revision: 231215 URL: http://svn.freebsd.org/changeset/base/231215 Log: MFC r225428: Shorten a variable access some using a cached value rather than casting the input argument again, making the code more readable. Reviewed by: jhb Modified: stable/7/sys/dev/mfi/mfi.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/mfi/mfi.c ============================================================================== --- stable/7/sys/dev/mfi/mfi.c Wed Feb 8 17:03:12 2012 (r231214) +++ stable/7/sys/dev/mfi/mfi.c Wed Feb 8 17:03:30 2012 (r231215) @@ -2133,8 +2133,7 @@ mfi_ioctl(struct cdev *dev, u_long cmd, if (ioc->mfi_sense_len) { /* get user-space sense ptr then copy out sense */ - bcopy(&((struct mfi_ioc_packet*)arg) - ->mfi_frame.raw[ioc->mfi_sense_off], + bcopy(&ioc->mfi_frame.raw[ioc->mfi_sense_off], &sense_ptr.sense_ptr_data[0], sizeof(sense_ptr.sense_ptr_data)); #ifdef __amd64__ From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 17:54:12 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83ED31065670; Wed, 8 Feb 2012 17:54:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71C498FC12; Wed, 8 Feb 2012 17:54:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18HsCSM054143; Wed, 8 Feb 2012 17:54:12 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18HsCpI054138; Wed, 8 Feb 2012 17:54:12 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081754.q18HsCpI054138@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 17:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231217 - in stable/7/sys: netinet netinet6 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 17:54:12 -0000 Author: bz Date: Wed Feb 8 17:54:11 2012 New Revision: 231217 URL: http://svn.freebsd.org/changeset/base/231217 Log: MFC r222845: Correct comments and debug logging in ipsec to better match reality. Modified: stable/7/sys/netinet/ip_input.c stable/7/sys/netinet/ip_ipsec.c stable/7/sys/netinet6/ip6_ipsec.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/netinet/ip_input.c ============================================================================== --- stable/7/sys/netinet/ip_input.c Wed Feb 8 17:54:02 2012 (r231216) +++ stable/7/sys/netinet/ip_input.c Wed Feb 8 17:54:11 2012 (r231217) @@ -393,7 +393,7 @@ tooshort: } #ifdef IPSEC /* - * Bypass packet filtering for packets from a tunnel (gif). + * Bypass packet filtering for packets previously handled by IPsec. */ if (ip_ipsec_filtertunnel(m)) goto passin; Modified: stable/7/sys/netinet/ip_ipsec.c ============================================================================== --- stable/7/sys/netinet/ip_ipsec.c Wed Feb 8 17:54:02 2012 (r231216) +++ stable/7/sys/netinet/ip_ipsec.c Wed Feb 8 17:54:11 2012 (r231217) @@ -75,7 +75,7 @@ ip_ipsec_filtertunnel(struct mbuf *m) { #if defined(IPSEC) && !defined(IPSEC_FILTERTUNNEL) /* - * Bypass packet filtering for packets from a tunnel. + * Bypass packet filtering for packets previously handled by IPsec. */ if (m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL) != NULL) return 1; Modified: stable/7/sys/netinet6/ip6_ipsec.c ============================================================================== --- stable/7/sys/netinet6/ip6_ipsec.c Wed Feb 8 17:54:02 2012 (r231216) +++ stable/7/sys/netinet6/ip6_ipsec.c Wed Feb 8 17:54:11 2012 (r231217) @@ -75,7 +75,7 @@ extern struct protosw inet6sw[]; /* * Check if we have to jump over firewall processing for this packet. - * Called from ip_input(). + * Called from ip6_input(). * 1 = jump over firewall, 0 = packet goes through firewall. */ int @@ -83,7 +83,7 @@ ip6_ipsec_filtertunnel(struct mbuf *m) { #if defined(IPSEC) && !defined(IPSEC_FILTERTUNNEL) /* - * Bypass packet filtering for packets from a tunnel. + * Bypass packet filtering for packets previously handled by IPsec. */ if (m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL) != NULL) return 1; @@ -94,7 +94,7 @@ ip6_ipsec_filtertunnel(struct mbuf *m) /* * Check if this packet has an active SA and needs to be dropped instead * of forwarded. - * Called from ip_input(). + * Called from ip6_input(). * 1 = drop packet, 0 = forward packet. */ int @@ -117,7 +117,7 @@ ip6_ipsec_fwd(struct mbuf *m) if (sp == NULL) { /* NB: can happen if error */ splx(s); /*XXX error stat???*/ - DPRINTF(("ip_input: no SP for forwarding\n")); /*XXX*/ + DPRINTF(("%s: no SP for forwarding\n", __func__)); /*XXX*/ return 1; } @@ -139,7 +139,7 @@ ip6_ipsec_fwd(struct mbuf *m) * Check if protocol type doesn't have a further header and do IPSEC * decryption or reject right now. Protocols with further headers get * their IPSEC treatment within the protocol specific processing. - * Called from ip_input(). + * Called from ip6_input(). * 1 = drop packet, 0 = continue processing packet. */ int @@ -182,7 +182,7 @@ ip6_ipsec_input(struct mbuf *m, int nxt) } else { /* XXX error stat??? */ error = EINVAL; - DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/ + DPRINTF(("%s: no SP, packet discarded\n", __func__));/*XXX*/ return 1; } splx(s); From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 18:22:11 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CEE110656D4; Wed, 8 Feb 2012 18:22:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BACD8FC17; Wed, 8 Feb 2012 18:22:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18IMBRX055151; Wed, 8 Feb 2012 18:22:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18IMBwm055149; Wed, 8 Feb 2012 18:22:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081822.q18IMBwm055149@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 18:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231219 - stable/7 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 18:22:11 -0000 Author: bz Date: Wed Feb 8 18:22:10 2012 New Revision: 231219 URL: http://svn.freebsd.org/changeset/base/231219 Log: Remove sun4v from universe targets. Approved by: re Modified: stable/7/Makefile Modified: stable/7/Makefile ============================================================================== --- stable/7/Makefile Wed Feb 8 18:21:48 2012 (r231218) +++ stable/7/Makefile Wed Feb 8 18:22:10 2012 (r231219) @@ -272,7 +272,7 @@ make: .PHONY # existing system is. # .if make(universe) -TARGETS?=amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v +TARGETS?=amd64 arm i386 ia64 pc98 powerpc sparc64 universe: universe_prologue universe_prologue: From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 18:51:27 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 145971065868; Wed, 8 Feb 2012 18:51:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3851C8FC17; Wed, 8 Feb 2012 18:51:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18IpQ9Z056273; Wed, 8 Feb 2012 18:51:26 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18IpPjP056270; Wed, 8 Feb 2012 18:51:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081851.q18IpPjP056270@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 18:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231223 - stable/7/sbin/ifconfig X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 18:51:27 -0000 Author: bz Date: Wed Feb 8 18:51:25 2012 New Revision: 231223 URL: http://svn.freebsd.org/changeset/base/231223 Log: MFC r228641: Allow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum offloading on vlans and document the new option. Modified: stable/7/sbin/ifconfig/ifconfig.8 stable/7/sbin/ifconfig/ifvlan.c Directory Properties: stable/7/sbin/ifconfig/ (props changed) Modified: stable/7/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/7/sbin/ifconfig/ifconfig.8 Wed Feb 8 18:51:20 2012 (r231222) +++ stable/7/sbin/ifconfig/ifconfig.8 Wed Feb 8 18:51:25 2012 (r231223) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd March 20, 2011 +.Dd December 17, 2011 .Dt IFCONFIG 8 .Os .Sh NAME @@ -402,10 +402,10 @@ they support in their capabilities. is a synonym for enabling all available WOL mechanisms. To disable WOL use .Fl wol . -.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso +.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwcsum, vlanhwtso If the driver offers user-configurable VLAN support, enable reception of extended frames, tag processing in hardware, -frame filtering in hardware, or TSO on VLAN, +frame filtering in hardware, checksum offloading, or TSO on VLAN, respectively. Note that this must be issued on a physical interface associated with .Xr vlan 4 , Modified: stable/7/sbin/ifconfig/ifvlan.c ============================================================================== --- stable/7/sbin/ifconfig/ifvlan.c Wed Feb 8 18:51:20 2012 (r231222) +++ stable/7/sbin/ifconfig/ifvlan.c Wed Feb 8 18:51:25 2012 (r231223) @@ -184,6 +184,8 @@ static struct cmd vlan_cmds[] = { DEF_CMD("-vlanhwfilter", -IFCAP_VLAN_HWFILTER, setifcap), DEF_CMD("-vlanhwtso", -IFCAP_VLAN_HWTSO, setifcap), DEF_CMD("vlanhwtso", IFCAP_VLAN_HWTSO, setifcap), + DEF_CMD("vlanhwcsum", IFCAP_VLAN_HWCSUM, setifcap), + DEF_CMD("-vlanhwcsum", -IFCAP_VLAN_HWCSUM, setifcap), }; static struct afswtch af_vlan = { .af_name = "af_vlan", From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 19:20:11 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1BB4106564A; Wed, 8 Feb 2012 19:20:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9015A8FC08; Wed, 8 Feb 2012 19:20:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18JKBmS057622; Wed, 8 Feb 2012 19:20:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18JKBif057619; Wed, 8 Feb 2012 19:20:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202081920.q18JKBif057619@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 8 Feb 2012 19:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231224 - stable/7/sys/net X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 19:20:11 -0000 Author: bz Date: Wed Feb 8 19:20:11 2012 New Revision: 231224 URL: http://svn.freebsd.org/changeset/base/231224 Log: MFC r223359: Garbage collect never used global, sysctl, externs. Modified: stable/7/sys/net/route.c stable/7/sys/net/route.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/net/route.c ============================================================================== --- stable/7/sys/net/route.c Wed Feb 8 18:51:25 2012 (r231223) +++ stable/7/sys/net/route.c Wed Feb 8 19:20:11 2012 (r231224) @@ -130,12 +130,6 @@ static void rt_maskedcopy(struct sockadd static uma_zone_t rtzone; /* Routing table UMA zone. */ -#if 0 -/* default fib for tunnels to use */ -u_int tunnel_fib = 0; -SYSCTL_INT(_net, OID_AUTO, tunnelfib, CTLFLAG_RD, &tunnel_fib, 0, ""); -#endif - /* * handler for net.my_fibnum */ Modified: stable/7/sys/net/route.h ============================================================================== --- stable/7/sys/net/route.h Wed Feb 8 18:51:25 2012 (r231223) +++ stable/7/sys/net/route.h Wed Feb 8 19:20:11 2012 (r231224) @@ -83,8 +83,6 @@ struct rt_metrics { #define RTTTOPRHZ(r) ((r) / (RTM_RTTUNIT / PR_SLOWHZ)) extern u_int rt_numfibs; /* number fo usable routing tables */ -extern u_int tunnel_fib; /* tunnels use these */ -extern u_int fwd_fib; /* packets being forwarded use these routes */ /* * XXX kernel function pointer `rt_output' is visible to applications. */ From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 8 23:12:05 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B597F106564A; Wed, 8 Feb 2012 23:12:05 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A39948FC0A; Wed, 8 Feb 2012 23:12:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q18NC5pB069241; Wed, 8 Feb 2012 23:12:05 GMT (envelope-from scf@svn.freebsd.org) Received: (from scf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q18NC5Ie069239; Wed, 8 Feb 2012 23:12:05 GMT (envelope-from scf@svn.freebsd.org) Message-Id: <201202082312.q18NC5Ie069239@svn.freebsd.org> From: Sean Farley Date: Wed, 8 Feb 2012 23:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231233 - stable/7/usr.sbin/cron/crontab X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 23:12:05 -0000 Author: scf Date: Wed Feb 8 23:12:05 2012 New Revision: 231233 URL: http://svn.freebsd.org/changeset/base/231233 Log: Merge from head to stable/7: r230655: Since April 2, 2006, Indiana has observed DST. Modified: stable/7/usr.sbin/cron/crontab/crontab.5 Directory Properties: stable/7/usr.sbin/cron/crontab/ (props changed) Modified: stable/7/usr.sbin/cron/crontab/crontab.5 ============================================================================== --- stable/7/usr.sbin/cron/crontab/crontab.5 Wed Feb 8 22:33:51 2012 (r231232) +++ stable/7/usr.sbin/cron/crontab/crontab.5 Wed Feb 8 23:12:05 2012 (r231233) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2005 +.Dd January 28, 2012 .Dt CRONTAB 5 .Os .Sh NAME @@ -301,7 +301,7 @@ affected. In general, it is not a good idea to schedule jobs during this period. .Pp -For US timezones (except parts of IN, AZ, and HI) the time shift occurs at +For US timezones (except parts of AZ and HI) the time shift occurs at 2AM local time. For others, the output of the .Xr zdump 8 From owner-svn-src-stable-7@FreeBSD.ORG Thu Feb 9 01:18:09 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E91BC106564A; Thu, 9 Feb 2012 01:18:09 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D75228FC08; Thu, 9 Feb 2012 01:18:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q191I9lA073536; Thu, 9 Feb 2012 01:18:09 GMT (envelope-from scf@svn.freebsd.org) Received: (from scf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q191I9QG073534; Thu, 9 Feb 2012 01:18:09 GMT (envelope-from scf@svn.freebsd.org) Message-Id: <201202090118.q191I9QG073534@svn.freebsd.org> From: Sean Farley Date: Thu, 9 Feb 2012 01:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231241 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 01:18:10 -0000 Author: scf Date: Thu Feb 9 01:18:09 2012 New Revision: 231241 URL: http://svn.freebsd.org/changeset/base/231241 Log: Merge from head to stable/7: r230656: msdos was renamed to msdosfs in 2001 by r77577. Modified: stable/7/share/man/man4/umass.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/umass.4 ============================================================================== --- stable/7/share/man/man4/umass.4 Thu Feb 9 00:16:12 2012 (r231240) +++ stable/7/share/man/man4/umass.4 Thu Feb 9 01:18:09 2012 (r231241) @@ -232,7 +232,7 @@ based file systems when storing informat videos. These file systems can be accessed by specifying the file system type as -.Cm msdos +.Cm msdosfs when using .Xr mount 8 . .Sh SEE ALSO From owner-svn-src-stable-7@FreeBSD.ORG Thu Feb 9 07:28:18 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 023FD10657C0; Thu, 9 Feb 2012 07:28:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E06B38FC15; Thu, 9 Feb 2012 07:28:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q197SHqL087333; Thu, 9 Feb 2012 07:28:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q197SH1A087331; Thu, 9 Feb 2012 07:28:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202090728.q197SH1A087331@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 9 Feb 2012 07:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231250 - stable/7/contrib/ntp/ntpd X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 07:28:18 -0000 Author: bz Date: Thu Feb 9 07:28:17 2012 New Revision: 231250 URL: http://svn.freebsd.org/changeset/base/231250 Log: MFC r223626: Compare port numbers correctly. They are stored by SRCPORT() in host byte order, so we need to compare them as such. Properly compare IPv6 addresses as well. This allows the, by default, 8 badaddrs slots per address family to work correctly and only print sendto() errors once. The change is no longer applicable to any latest upstream versions. Approved by: roberto Sponsored by: Sandvine Incorporated Modified: stable/7/contrib/ntp/ntpd/ntp_io.c Directory Properties: stable/7/contrib/ntp/ (props changed) Modified: stable/7/contrib/ntp/ntpd/ntp_io.c ============================================================================== --- stable/7/contrib/ntp/ntpd/ntp_io.c Thu Feb 9 07:27:59 2012 (r231249) +++ stable/7/contrib/ntp/ntpd/ntp_io.c Thu Feb 9 07:28:17 2012 (r231250) @@ -2646,14 +2646,14 @@ sendpkt( for (slot = ERRORCACHESIZE; --slot >= 0; ) if(dest->ss_family == AF_INET) { - if (badaddrs[slot].port == ((struct sockaddr_in*)dest)->sin_port && + if (badaddrs[slot].port == SRCPORT(dest) && badaddrs[slot].addr.s_addr == ((struct sockaddr_in*)dest)->sin_addr.s_addr) break; } #ifdef INCLUDE_IPV6_SUPPORT else if (dest->ss_family == AF_INET6) { - if (badaddrs6[slot].port == ((struct sockaddr_in6*)dest)->sin6_port && - badaddrs6[slot].addr.s6_addr == ((struct sockaddr_in6*)dest)->sin6_addr.s6_addr) + if (badaddrs6[slot].port == SRCPORT(dest) && + !memcmp(&badaddrs6[slot].addr, &((struct sockaddr_in6*)dest)->sin6_addr, sizeof(struct in6_addr))) break; } #endif /* INCLUDE_IPV6_SUPPORT */ From owner-svn-src-stable-7@FreeBSD.ORG Thu Feb 9 07:52:44 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5E9F1065674; Thu, 9 Feb 2012 07:52:44 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F5108FC0C; Thu, 9 Feb 2012 07:52:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q197qiSQ088363; Thu, 9 Feb 2012 07:52:44 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q197qi7k088360; Thu, 9 Feb 2012 07:52:44 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202090752.q197qi7k088360@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 9 Feb 2012 07:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231255 - stable/7/contrib/ntp/ntpd X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 07:52:44 -0000 Author: bz Date: Thu Feb 9 07:52:44 2012 New Revision: 231255 URL: http://svn.freebsd.org/changeset/base/231255 Log: MFC r223667: In case ntp cannot resolve a hostname on startup it will queue the entry for resolving by a child process that, upon success, will add the entry to the config of the running running parent process. Unfortunately there are a couple of bugs with this, fixed in various later versions of upstream in potentially different ways due to other code changes: 1) Upon server [-46] the [-46] are used as FQDN for later resolving which does not work. Make sure we always pass the name (or IP there). 2) The intermediate file to carry the information to the child process does not know about -4/-6 restrictions, so that a dual-stacked host could resolve to an IPv6 address but that might be unreachable (see r223626) leading to no working synchronization ignoring a IPv4 record. Thus alter the intermediate format to also pass the address family (AF_UNSPEC (default), AF_INET or AF_INET6) to the child process depending on -4 or -6. 3) Make the child process to parse the new intermediate file format and save the address family for getaddrinfo() hints flags. 4) Change child to always reload resolv.conf calling res_init() before trying to resolve names. This will pick up resolv.conf changes or new resolv.confs should they have not existed or been empty or unusable on ntp startup. This fix is more conditional in upstream versions but given FreeBSD has res_init there is no need for the configure logic as well. Approved by: roberto Sponsored by: Sandvine Incorporated Modified: stable/7/contrib/ntp/ntpd/ntp_config.c stable/7/contrib/ntp/ntpd/ntp_intres.c Directory Properties: stable/7/contrib/ntp/ (props changed) Modified: stable/7/contrib/ntp/ntpd/ntp_config.c ============================================================================== --- stable/7/contrib/ntp/ntpd/ntp_config.c Thu Feb 9 07:45:02 2012 (r231254) +++ stable/7/contrib/ntp/ntpd/ntp_config.c Thu Feb 9 07:52:44 2012 (r231255) @@ -414,7 +414,7 @@ enum gnn_type { static int getnetnum P((const char *, struct sockaddr_storage *, int, enum gnn_type)); static void save_resolve P((char *, int, int, int, int, u_int, int, - keyid_t, u_char *)); + keyid_t, u_char *, u_char)); static void do_resolve_internal P((void)); static void abort_resolve P((void)); #if !defined(VMS) && !defined(SYS_WINNT) @@ -870,9 +870,9 @@ getconfig( stoa(&peeraddr)); } } else if (errflg == -1) { - save_resolve(tokens[1], hmode, peerversion, + save_resolve(tokens[istart - 1], hmode, peerversion, minpoll, maxpoll, peerflags, ttl, - peerkey, peerkeystr); + peerkey, peerkeystr, peeraddr.ss_family); } break; @@ -2325,7 +2325,8 @@ save_resolve( u_int flags, int ttl, keyid_t keyid, - u_char *keystr + u_char *keystr, + u_char peeraf ) { #ifndef SYS_VXWORKS @@ -2365,11 +2366,11 @@ save_resolve( } #endif - (void)fprintf(res_fp, "%s %d %d %d %d %d %d %u %s\n", name, + (void)fprintf(res_fp, "%s %u %d %d %d %d %d %d %u %s\n", name, peeraf, mode, version, minpoll, maxpoll, flags, ttl, keyid, keystr); #ifdef DEBUG if (debug > 1) - printf("config: %s %d %d %d %d %x %d %u %s\n", name, mode, + printf("config: %s %u %d %d %d %d %x %d %u %s\n", name, peeraf, mode, version, minpoll, maxpoll, flags, ttl, keyid, keystr); #endif Modified: stable/7/contrib/ntp/ntpd/ntp_intres.c ============================================================================== --- stable/7/contrib/ntp/ntpd/ntp_intres.c Thu Feb 9 07:45:02 2012 (r231254) +++ stable/7/contrib/ntp/ntpd/ntp_intres.c Thu Feb 9 07:52:44 2012 (r231255) @@ -34,6 +34,7 @@ #include #include +#include #include /**/ @@ -116,15 +117,16 @@ static int resolve_value; /* next value * is supposed to consist of entries in the following order */ #define TOK_HOSTNAME 0 -#define TOK_HMODE 1 -#define TOK_VERSION 2 -#define TOK_MINPOLL 3 -#define TOK_MAXPOLL 4 -#define TOK_FLAGS 5 -#define TOK_TTL 6 -#define TOK_KEYID 7 -#define TOK_KEYSTR 8 -#define NUMTOK 9 +#define TOK_PEERAF 1 +#define TOK_HMODE 2 +#define TOK_VERSION 3 +#define TOK_MINPOLL 4 +#define TOK_MAXPOLL 5 +#define TOK_FLAGS 6 +#define TOK_TTL 7 +#define TOK_KEYID 8 +#define TOK_KEYSTR 9 +#define NUMTOK 10 #define MAXLINESIZE 512 @@ -145,7 +147,7 @@ char *req_file; /* name of the file wit static void checkparent P((void)); static void removeentry P((struct conf_entry *)); static void addentry P((char *, int, int, int, int, u_int, - int, keyid_t, char *)); + int, keyid_t, char *, u_char)); static int findhostaddr P((struct conf_entry *)); static void openntp P((void)); static int request P((struct conf_peer *)); @@ -402,7 +404,8 @@ addentry( u_int flags, int ttl, keyid_t keyid, - char *keystr + char *keystr, + u_char peeraf ) { register char *cp; @@ -412,7 +415,7 @@ addentry( #ifdef DEBUG if (debug > 1) msyslog(LOG_INFO, - "intres: <%s> %d %d %d %d %x %d %x %s\n", name, + "intres: <%s> %u %d %d %d %d %x %d %x %s\n", name, peeraf, mode, version, minpoll, maxpoll, flags, ttl, keyid, keystr); #endif @@ -427,6 +430,7 @@ addentry( ce->ce_peeraddr6 = in6addr_any; #endif ANYSOCK(&ce->peer_store); + ce->peer_store.ss_family = peeraf; /* Save AF for getaddrinfo hints. */ ce->ce_hmode = (u_char)mode; ce->ce_version = (u_char)version; ce->ce_minpoll = (u_char)minpoll; @@ -488,7 +492,8 @@ findhostaddr( #endif /* DEBUG */ memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_UNSPEC; + hints.ai_family = entry->peer_store.ss_family; + hints.ai_socktype = SOCK_DGRAM; /* * If the IPv6 stack is not available look only for IPv4 addresses */ @@ -1022,6 +1027,13 @@ readconf( } } + if (intval[TOK_PEERAF] != AF_UNSPEC && intval[TOK_PEERAF] != + AF_INET && intval[TOK_PEERAF] != AF_INET6) { + msyslog(LOG_ERR, "invalid peer address family (%u) in " + "file %s", intval[TOK_PEERAF], name); + exit(1); + } + if (intval[TOK_HMODE] != MODE_ACTIVE && intval[TOK_HMODE] != MODE_CLIENT && intval[TOK_HMODE] != MODE_BROADCAST) { @@ -1078,7 +1090,7 @@ readconf( addentry(token[TOK_HOSTNAME], (int)intval[TOK_HMODE], (int)intval[TOK_VERSION], (int)intval[TOK_MINPOLL], (int)intval[TOK_MAXPOLL], flags, (int)intval[TOK_TTL], - intval[TOK_KEYID], token[TOK_KEYSTR]); + intval[TOK_KEYID], token[TOK_KEYSTR], (u_char)intval[TOK_PEERAF]); } } @@ -1100,6 +1112,9 @@ doconfigure( dores ? "with" : "without" ); #endif + if (dores) /* Reload /etc/resolv.conf - bug 1226 */ + res_init(); + ce = confentries; while (ce != NULL) { #ifdef DEBUG From owner-svn-src-stable-7@FreeBSD.ORG Thu Feb 9 09:01:03 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2DE11065679; Thu, 9 Feb 2012 09:01:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93F598FC21; Thu, 9 Feb 2012 09:01:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q19913dH090902; Thu, 9 Feb 2012 09:01:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q19913Mm090900; Thu, 9 Feb 2012 09:01:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202090901.q19913Mm090900@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 9 Feb 2012 09:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231259 - stable/7/contrib/pf/ftp-proxy X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 09:01:03 -0000 Author: bz Date: Thu Feb 9 09:01:03 2012 New Revision: 231259 URL: http://svn.freebsd.org/changeset/base/231259 Log: MF8 r224326: Flush output buffers before closing TCP session. Fixes the case where the proxy would eat the 221 response coming from the server towards the client. Obtained from: OpenBSD r1.18 PR: bin/154469 Modified: stable/7/contrib/pf/ftp-proxy/ftp-proxy.c Directory Properties: stable/7/contrib/pf/ (props changed) Modified: stable/7/contrib/pf/ftp-proxy/ftp-proxy.c ============================================================================== --- stable/7/contrib/pf/ftp-proxy/ftp-proxy.c Thu Feb 9 08:41:56 2012 (r231258) +++ stable/7/contrib/pf/ftp-proxy/ftp-proxy.c Thu Feb 9 09:01:03 2012 (r231259) @@ -273,6 +273,12 @@ end_session(struct session *s) logmsg(LOG_INFO, "#%d ending session", s->id); + /* Flush output buffers. */ + if (s->client_bufev && s->client_fd != -1) + evbuffer_write(s->client_bufev->output, s->client_fd); + if (s->server_bufev && s->server_fd != -1) + evbuffer_write(s->server_bufev->output, s->server_fd); + if (s->client_fd != -1) close(s->client_fd); if (s->server_fd != -1) From owner-svn-src-stable-7@FreeBSD.ORG Thu Feb 9 16:12:25 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD8201065816; Thu, 9 Feb 2012 16:12:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6ED68FC0A; Thu, 9 Feb 2012 16:12:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q19GCPM7008828; Thu, 9 Feb 2012 16:12:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q19GCPYe008826; Thu, 9 Feb 2012 16:12:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202091612.q19GCPYe008826@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 9 Feb 2012 16:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231286 - stable/7/sys/netinet6 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 16:12:26 -0000 Author: bz Date: Thu Feb 9 16:12:25 2012 New Revision: 231286 URL: http://svn.freebsd.org/changeset/base/231286 Log: MFC r229127: Remove a declaration to a non-existent function. Modified: stable/7/sys/netinet6/scope6_var.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/netinet6/scope6_var.h ============================================================================== --- stable/7/sys/netinet6/scope6_var.h Thu Feb 9 16:12:12 2012 (r231285) +++ stable/7/sys/netinet6/scope6_var.h Thu Feb 9 16:12:25 2012 (r231286) @@ -49,7 +49,6 @@ int scope6_set __P((struct ifnet *, stru int scope6_get __P((struct ifnet *, struct scope6_id *)); void scope6_setdefault __P((struct ifnet *)); int scope6_get_default __P((struct scope6_id *)); -u_int32_t scope6_in6_addrscope __P((struct in6_addr *)); u_int32_t scope6_addr2default __P((struct in6_addr *)); int sa6_embedscope __P((struct sockaddr_in6 *, int)); int sa6_recoverscope __P((struct sockaddr_in6 *)); From owner-svn-src-stable-7@FreeBSD.ORG Thu Feb 9 20:54:25 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E21A7106566C; Thu, 9 Feb 2012 20:54:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D07698FC17; Thu, 9 Feb 2012 20:54:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q19KsP8W028966; Thu, 9 Feb 2012 20:54:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q19KsPfh028964; Thu, 9 Feb 2012 20:54:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202092054.q19KsPfh028964@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 9 Feb 2012 20:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231303 - stable/7/sys/netinet6 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 20:54:26 -0000 Author: bz Date: Thu Feb 9 20:54:25 2012 New Revision: 231303 URL: http://svn.freebsd.org/changeset/base/231303 Log: MFC r229276: Remove an uneeded inpcb forward declaration and align the function declaration following to match the style in the rest of the file. Modified: stable/7/sys/netinet6/in6_var.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/netinet6/in6_var.h ============================================================================== --- stable/7/sys/netinet6/in6_var.h Thu Feb 9 20:54:14 2012 (r231302) +++ stable/7/sys/netinet6/in6_var.h Thu Feb 9 20:54:25 2012 (r231303) @@ -625,8 +625,7 @@ void in6_ifremloop(struct ifaddr *); void in6_ifaddloop(struct ifaddr *); int in6_is_addr_deprecated __P((struct sockaddr_in6 *)); -struct inpcb; -int in6_src_ioctl __P((u_long, caddr_t)); +int in6_src_ioctl __P((u_long, caddr_t)); #endif /* _KERNEL */ #endif /* _NETINET6_IN6_VAR_H_ */ From owner-svn-src-stable-7@FreeBSD.ORG Thu Feb 9 21:33:45 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 528BE1065670; Thu, 9 Feb 2012 21:33:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40F5C8FC15; Thu, 9 Feb 2012 21:33:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q19LXjQR033988; Thu, 9 Feb 2012 21:33:45 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q19LXjRq033986; Thu, 9 Feb 2012 21:33:45 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202092133.q19LXjRq033986@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 9 Feb 2012 21:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231308 - stable/7/sys/netinet6 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 21:33:45 -0000 Author: bz Date: Thu Feb 9 21:33:44 2012 New Revision: 231308 URL: http://svn.freebsd.org/changeset/base/231308 Log: MFC r229546: Convert an #ifdef DIAGNOSTIC if/panic to a KASSERT. Modified: stable/7/sys/netinet6/in6_ifattach.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/netinet6/in6_ifattach.c ============================================================================== --- stable/7/sys/netinet6/in6_ifattach.c Thu Feb 9 21:33:36 2012 (r231307) +++ stable/7/sys/netinet6/in6_ifattach.c Thu Feb 9 21:33:44 2012 (r231308) @@ -480,12 +480,7 @@ in6_ifattach_linklocal(struct ifnet *ifp } ia = in6ifa_ifpforlinklocal(ifp, 0); /* ia must not be NULL */ -#ifdef DIAGNOSTIC - if (!ia) { - panic("ia == NULL in in6_ifattach_linklocal"); - /* NOTREACHED */ - } -#endif + KASSERT(ia != NULL, ("%s: ia == NULL, ifp=%p", __func__, ifp)); /* * Make the link-local prefix (fe80::%link/64) as on-link. From owner-svn-src-stable-7@FreeBSD.ORG Thu Feb 9 22:13:21 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F6E106566C; Thu, 9 Feb 2012 22:13:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 745AB8FC15; Thu, 9 Feb 2012 22:13:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q19MDLgI038833; Thu, 9 Feb 2012 22:13:21 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q19MDLRm038831; Thu, 9 Feb 2012 22:13:21 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202092213.q19MDLRm038831@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 9 Feb 2012 22:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231311 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 22:13:21 -0000 Author: bz Date: Thu Feb 9 22:13:20 2012 New Revision: 231311 URL: http://svn.freebsd.org/changeset/base/231311 Log: Fix no-IPv6 kernels after r231207. Reported by: someone via luigi Modified: stable/7/sys/netinet/ip_fw2.c Modified: stable/7/sys/netinet/ip_fw2.c ============================================================================== --- stable/7/sys/netinet/ip_fw2.c Thu Feb 9 22:05:51 2012 (r231310) +++ stable/7/sys/netinet/ip_fw2.c Thu Feb 9 22:13:20 2012 (r231311) @@ -110,9 +110,7 @@ static u_int32_t set_disable; static int fw_verbose; static struct callout ipfw_timeout; static int verbose_limit; -#ifdef INET6 static int fw_permit_single_frag6 = 1; -#endif #ifdef IPFIREWALL_DEFAULT_TO_ACCEPT static int default_to_accept = 1; From owner-svn-src-stable-7@FreeBSD.ORG Fri Feb 10 00:10:14 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3553D1065679; Fri, 10 Feb 2012 00:10:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 237BC8FC21; Fri, 10 Feb 2012 00:10:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1A0AEtS044657; Fri, 10 Feb 2012 00:10:14 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1A0AEt3044655; Fri, 10 Feb 2012 00:10:14 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201202100010.q1A0AEt3044655@svn.freebsd.org> From: Eitan Adler Date: Fri, 10 Feb 2012 00:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231323 - stable/7/sys/cam/scsi X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 00:10:14 -0000 Author: eadler Date: Fri Feb 10 00:10:13 2012 New Revision: 231323 URL: http://svn.freebsd.org/changeset/base/231323 Log: MFC r228344: - Add support for Support SEAGATE DAT Scopion 130 PR: kern/141934 Approved by: cperciva Modified: stable/7/sys/cam/scsi/scsi_sa.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/7/sys/cam/scsi/scsi_sa.c Fri Feb 10 00:09:21 2012 (r231322) +++ stable/7/sys/cam/scsi/scsi_sa.c Fri Feb 10 00:10:13 2012 (r231323) @@ -339,6 +339,10 @@ static struct sa_quirk_entry sa_quirk_ta "STT20000*", "*"}, SA_QUIRK_1FM, 0 }, { + { T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "SEAGATE", + "DAT 06241-XXX", "*"}, SA_QUIRK_VARIABLE|SA_QUIRK_2FM, 0 + }, + { { T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "TANDBERG", " TDC 3600", "U07:"}, SA_QUIRK_NOCOMP|SA_QUIRK_1FM, 512 }, From owner-svn-src-stable-7@FreeBSD.ORG Fri Feb 10 04:11:04 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF2A51065670; Fri, 10 Feb 2012 04:11:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD5A48FC08; Fri, 10 Feb 2012 04:11:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1A4B4gQ052946; Fri, 10 Feb 2012 04:11:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1A4B4qF052944; Fri, 10 Feb 2012 04:11:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201202100411.q1A4B4qF052944@svn.freebsd.org> From: Eitan Adler Date: Fri, 10 Feb 2012 04:11:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231335 - stable/7/share/man/man7 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 04:11:05 -0000 Author: eadler Date: Fri Feb 10 04:11:04 2012 New Revision: 231335 URL: http://svn.freebsd.org/changeset/base/231335 Log: MFC r231111, r231331: ports(7) currently makes no mention of LOCALBASE: fix that PR: 159551 Approved by: gjb Modified: stable/7/share/man/man7/ports.7 Directory Properties: stable/7/share/ (props changed) stable/7/share/man/ (props changed) stable/7/share/man/man7/ (props changed) Modified: stable/7/share/man/man7/ports.7 ============================================================================== --- stable/7/share/man/man7/ports.7 Fri Feb 10 04:10:13 2012 (r231334) +++ stable/7/share/man/man7/ports.7 Fri Feb 10 04:11:04 2012 (r231335) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2011 +.Dd February 9, 2012 .Dt PORTS 7 .Os .Sh NAME @@ -408,10 +408,13 @@ Directory to put the package in. .It Va PKGFILE The full path to the package. .El -.It Va PREFIX -Where to install things in general -(usually +.It Va LOCALBASE +Where existing things are installed and where to search for files when +resolving dependencies (usually .Pa /usr/local ) . +.It Va PREFIX +Where to install this port (usually set to the same as +.Va LOCALBASE ) . .It Va MASTER_SITES Primary sites for distribution files if not found locally. .It Va PATCH_SITES From owner-svn-src-stable-7@FreeBSD.ORG Fri Feb 10 06:06:30 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C954B106564A; Fri, 10 Feb 2012 06:06:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B79378FC13; Fri, 10 Feb 2012 06:06:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1A66UHF056617; Fri, 10 Feb 2012 06:06:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1A66UFm056615; Fri, 10 Feb 2012 06:06:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202100606.q1A66UFm056615@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 10 Feb 2012 06:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231339 - stable/7/share/man/man9 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 06:06:30 -0000 Author: bz Date: Fri Feb 10 06:06:30 2012 New Revision: 231339 URL: http://svn.freebsd.org/changeset/base/231339 Log: MFC r223259: Correct a typo in the function name. Modified: stable/7/share/man/man9/device_get_sysctl.9 Directory Properties: stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man9/device_get_sysctl.9 ============================================================================== --- stable/7/share/man/man9/device_get_sysctl.9 Fri Feb 10 06:06:25 2012 (r231338) +++ stable/7/share/man/man9/device_get_sysctl.9 Fri Feb 10 06:06:30 2012 (r231339) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2006 +.Dd June 18, 2011 .Dt DEVICE_GET_SYSCTL 9 .Os .Sh NAME @@ -49,7 +49,7 @@ This node can be accessed with the .Fn device_get_sysctl_tree function. The context for the node can be obtained with the -.Fn device_get_sysctl_ctl +.Fn device_get_sysctl_ctx function. .Sh SEE ALSO .Xr device 9 From owner-svn-src-stable-7@FreeBSD.ORG Fri Feb 10 06:43:17 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B357B106567A; Fri, 10 Feb 2012 06:43:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 966F78FC08; Fri, 10 Feb 2012 06:43:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1A6hHq7058216; Fri, 10 Feb 2012 06:43:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1A6hHRF058206; Fri, 10 Feb 2012 06:43:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202100643.q1A6hHRF058206@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 10 Feb 2012 06:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231348 - in stable/7: sbin/ifconfig share/man/man9 sys/net sys/sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 06:43:17 -0000 Author: bz Date: Fri Feb 10 06:43:16 2012 New Revision: 231348 URL: http://svn.freebsd.org/changeset/base/231348 Log: MFC r223735: Add infrastructure to allow all frames/packets received on an interface to be assigned to a non-default FIB instance. Submitted by: cjsp Submitted by: Alexander V. Chernikov (melifaro ipfw.ru) (original versions) Reviewed by: julian Reviewed by: Alexander V. Chernikov (melifaro ipfw.ru) Reviewed by: melifaro Added: stable/7/sbin/ifconfig/iffib.c - copied unchanged from r223735, head/sbin/ifconfig/iffib.c Modified: stable/7/sbin/ifconfig/Makefile stable/7/sbin/ifconfig/ifconfig.8 stable/7/share/man/man9/ifnet.9 stable/7/sys/net/if.c stable/7/sys/net/if.h stable/7/sys/net/if_var.h stable/7/sys/sys/priv.h stable/7/sys/sys/sockio.h Directory Properties: stable/7/sbin/ifconfig/ (props changed) stable/7/share/man/man9/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/sbin/ifconfig/Makefile ============================================================================== --- stable/7/sbin/ifconfig/Makefile Fri Feb 10 06:42:50 2012 (r231347) +++ stable/7/sbin/ifconfig/Makefile Fri Feb 10 06:43:16 2012 (r231348) @@ -22,6 +22,7 @@ SRCS+= af_atalk.c # AppleTalk support SRCS+= ifclone.c # clone device support SRCS+= ifmac.c # MAC support SRCS+= ifmedia.c # SIOC[GS]IFMEDIA support +SRCS+= iffib.c # non-default FIB support SRCS+= ifvlan.c # SIOC[GS]ETVLAN support SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support SRCS+= ifgre.c # GRE keys etc Modified: stable/7/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/7/sbin/ifconfig/ifconfig.8 Fri Feb 10 06:42:50 2012 (r231347) +++ stable/7/sbin/ifconfig/ifconfig.8 Fri Feb 10 06:43:16 2012 (r231348) @@ -288,6 +288,19 @@ Remove the interface from the given Fill interface index (lowermost 64bit of an IPv6 address) automatically. +.It Cm fib Ar fib_number +Specify interface FIB. +A FIB +.Ar fib_number +is assigned to all frames or packets received on that interface. +The FIB is not inherited, e.g. vlans or other sub-interfaces will use +the default FIB (0) irrespective of the parent interface's FIB. +The kernel needs to be tuned to support more than the default FIB +using the +.Va ROUTETABLES +kernel configuration option, or the +.Va net.fibs +tunable. .It Cm ipdst This is used to specify an Internet host who is willing to receive IP packets encapsulating IPX packets bound for a remote network. Copied: stable/7/sbin/ifconfig/iffib.c (from r223735, head/sbin/ifconfig/iffib.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sbin/ifconfig/iffib.c Fri Feb 10 06:43:16 2012 (r231348, copy of r223735, head/sbin/ifconfig/iffib.c) @@ -0,0 +1,103 @@ +/*- + * Copyright (c) 2011 Alexander V. Chernikov + * Copyright (c) 2011 Christian S.J. Peron + * Copyright (c) 2011 Bjoern A. Zeeb + * All rights reserved. + * + * 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$ + */ + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include "ifconfig.h" + +static void +fib_status(int s) +{ + struct ifreq ifr; + + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + + if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) < 0) + return; + + /* Ignore if it is the default. */ + if (ifr.ifr_fib == 0) + return; + + printf("\tfib: %u\n", ifr.ifr_fib); +} + +static void +setiffib(const char *val, int dummy __unused, int s, + const struct afswtch *afp) +{ + unsigned long fib; + char *ep; + + fib = strtoul(val, &ep, 0); + if (*ep != '\0' || fib > UINT_MAX) { + warn("fib %s not valid", val); + return; + } + + strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); + ifr.ifr_fib = fib; + if (ioctl(s, SIOCSIFFIB, (caddr_t)&ifr) < 0) + warn("ioctl (SIOCSIFFIB)"); +} + +static struct cmd fib_cmds[] = { + DEF_CMD_ARG("fib", setiffib), +}; + +static struct afswtch af_fib = { + .af_name = "af_fib", + .af_af = AF_UNSPEC, + .af_other_status = fib_status, +}; + +static __constructor void +fib_ctor(void) +{ +#define N(a) (sizeof(a) / sizeof(a[0])) + size_t i; + + for (i = 0; i < N(fib_cmds); i++) + cmd_register(&fib_cmds[i]); + af_register(&af_fib); +#undef N +} Modified: stable/7/share/man/man9/ifnet.9 ============================================================================== --- stable/7/share/man/man9/ifnet.9 Fri Feb 10 06:42:50 2012 (r231347) +++ stable/7/share/man/man9/ifnet.9 Fri Feb 10 06:43:16 2012 (r231348) @@ -28,8 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 14, 2007 -.Os +.Dd July 3, 2011 .Dt IFNET 9 .Sh NAME .Nm ifnet , @@ -1129,11 +1128,12 @@ list. Caller must have appropriate privilege. (No call-down to driver.) .It Dv SIOCGIFCAP +.It Dv SIOCGIFFIB .It Dv SIOCGIFFLAGS .It Dv SIOCGIFMETRIC .It Dv SIOCGIFMTU .It Dv SIOCGIFPHYS -Get interface capabilities, flags, metric, MTU, medium selection. +Get interface capabilities, FIB, flags, metric, MTU, medium selection. (No call-down to driver.) .Pp .It Dv SIOCSIFCAP @@ -1152,6 +1152,12 @@ and .Va if_data.ifi_hwassist appropriately. .Pp +.It Dv SIOCSIFFIB +Sets interface FIB. +Caller must have appropriate privilege. +FIB values start at 0 and values greater or equals than +.Va net.fibs +are considered invalid. .It Dv SIOCSIFFLAGS Change interface flags. Caller must have appropriate privilege. Modified: stable/7/sys/net/if.c ============================================================================== --- stable/7/sys/net/if.c Fri Feb 10 06:42:50 2012 (r231347) +++ stable/7/sys/net/if.c Fri Feb 10 06:43:16 2012 (r231348) @@ -56,6 +56,8 @@ #include #include #include +#include + #include #include @@ -1683,6 +1685,20 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, ifr->ifr_phys = ifp->if_physical; break; + case SIOCGIFFIB: + ifr->ifr_fib = ifp->if_fib; + break; + + case SIOCSIFFIB: + error = priv_check(td, PRIV_NET_SETIFFIB); + if (error) + return (error); + if (ifr->ifr_fib >= rt_numfibs) + return (EINVAL); + + ifp->if_fib = ifr->ifr_fib; + break; + case SIOCSIFFLAGS: error = priv_check(td, PRIV_NET_SETIFFLAGS); if (error) Modified: stable/7/sys/net/if.h ============================================================================== --- stable/7/sys/net/if.h Fri Feb 10 06:42:50 2012 (r231347) +++ stable/7/sys/net/if.h Fri Feb 10 06:43:16 2012 (r231348) @@ -303,6 +303,7 @@ struct ifreq { int ifru_media; caddr_t ifru_data; int ifru_cap[2]; + u_int ifru_fib; } ifr_ifru; #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ @@ -317,6 +318,7 @@ struct ifreq { #define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */ #define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */ #define ifr_index ifr_ifru.ifru_index /* interface index */ +#define ifr_fib ifr_ifru.ifru_fib /* interface fib */ }; #define _SIZEOF_ADDR_IFREQ(ifr) \ Modified: stable/7/sys/net/if_var.h ============================================================================== --- stable/7/sys/net/if_var.h Fri Feb 10 06:42:50 2012 (r231347) +++ stable/7/sys/net/if_var.h Fri Feb 10 06:43:16 2012 (r231348) @@ -187,7 +187,8 @@ struct ifnet { void *if_pf_kif; void *if_lagg; /* lagg glue */ void *if_pspare[10]; /* multiq/TOE 3; vimage 3; general use 4 */ - int if_ispare[2]; /* general use 2 */ + int if_ispare[1]; /* general use */ + u_int if_fib; /* interface FIB */ }; typedef void if_init_f_t(void *); Modified: stable/7/sys/sys/priv.h ============================================================================== --- stable/7/sys/sys/priv.h Fri Feb 10 06:42:50 2012 (r231347) +++ stable/7/sys/sys/priv.h Fri Feb 10 06:43:16 2012 (r231348) @@ -328,6 +328,7 @@ #define PRIV_NET_DELIFADDR 414 /* Delete protocol addr on interface. */ #define PRIV_NET_LAGG 415 /* Administer lagg interface. */ #define PRIV_NET_GIF 416 /* Administer gif interface. */ +#define PRIV_NET_SETIFFIB 419 /* Set interface fib. */ /* * 802.11-related privileges. Modified: stable/7/sys/sys/sockio.h ============================================================================== --- stable/7/sys/sys/sockio.h Fri Feb 10 06:42:50 2012 (r231347) +++ stable/7/sys/sys/sockio.h Fri Feb 10 06:43:16 2012 (r231348) @@ -108,6 +108,9 @@ #define SIOCGPRIVATE_0 _IOWR('i', 80, struct ifreq) /* device private 0 */ #define SIOCGPRIVATE_1 _IOWR('i', 81, struct ifreq) /* device private 1 */ +#define SIOCGIFFIB _IOWR('i', 92, struct ifreq) /* get IF fib */ +#define SIOCSIFFIB _IOW('i', 93, struct ifreq) /* set IF fib */ + #define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific parameters */ #define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific From owner-svn-src-stable-7@FreeBSD.ORG Fri Feb 10 10:23:55 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1979106566C; Fri, 10 Feb 2012 10:23:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFBD08FC1D; Fri, 10 Feb 2012 10:23:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1AANtU2066739; Fri, 10 Feb 2012 10:23:55 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1AANtGQ066737; Fri, 10 Feb 2012 10:23:55 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201202101023.q1AANtGQ066737@svn.freebsd.org> From: Doug Barton Date: Fri, 10 Feb 2012 10:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231375 - stable/7/etc/rc.d X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 10:23:56 -0000 Author: dougb Date: Fri Feb 10 10:23:55 2012 New Revision: 231375 URL: http://svn.freebsd.org/changeset/base/231375 Log: MFC r228191: Ensure kldxref is run first. Modified: stable/7/etc/rc.d/kld Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.d/kld ============================================================================== --- stable/7/etc/rc.d/kld Fri Feb 10 10:23:20 2012 (r231374) +++ stable/7/etc/rc.d/kld Fri Feb 10 10:23:55 2012 (r231375) @@ -27,7 +27,7 @@ # $FreeBSD$ # # PROVIDE: kld -# REQUIRE: FILESYSTEMS +# REQUIRE: kldxref # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-stable-7@FreeBSD.ORG Fri Feb 10 16:05:34 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D41871065680; Fri, 10 Feb 2012 16:05:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC76A8FC12; Fri, 10 Feb 2012 16:05:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1AG5YnT082595; Fri, 10 Feb 2012 16:05:34 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1AG5YPw082579; Fri, 10 Feb 2012 16:05:34 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202101605.q1AG5YPw082579@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 10 Feb 2012 16:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231390 - in stable/7/sys: dev/iicbus dev/lmc dev/ppbus net netgraph X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 16:05:35 -0000 Author: bz Date: Fri Feb 10 16:05:33 2012 New Revision: 231390 URL: http://svn.freebsd.org/changeset/base/231390 Log: MFC r223741: Tag mbufs of all incoming frames or packets with the interface's FIB setting (either default or if supported as set by SIOCSIFFIB, e.g. from ifconfig). Submitted by: Alexander V. Chernikov (melifaro ipfw.ru) Reviewed by: julian Modified: stable/7/sys/dev/iicbus/if_ic.c stable/7/sys/dev/lmc/if_lmc.c stable/7/sys/dev/ppbus/if_plip.c stable/7/sys/net/if_arcsubr.c stable/7/sys/net/if_atmsubr.c stable/7/sys/net/if_ethersubr.c stable/7/sys/net/if_fddisubr.c stable/7/sys/net/if_fwsubr.c stable/7/sys/net/if_gif.c stable/7/sys/net/if_iso88025subr.c stable/7/sys/net/if_spppfr.c stable/7/sys/net/if_spppsubr.c stable/7/sys/net/if_stf.c stable/7/sys/net/if_tun.c stable/7/sys/netgraph/ng_iface.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/iicbus/if_ic.c ============================================================================== --- stable/7/sys/dev/iicbus/if_ic.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/dev/iicbus/if_ic.c Fri Feb 10 16:05:33 2012 (r231390) @@ -300,6 +300,7 @@ icintr(device_t dev, int event, char *pt BPF_TAP(sc->ic_ifp, sc->ic_ifbuf, len + ICHDRLEN); top = m_devget(sc->ic_ifbuf + ICHDRLEN, len, 0, sc->ic_ifp, 0); if (top) + M_SETFIB(top, sc->ic_ifp->if_fib); netisr_dispatch(NETISR_IP, top); break; err: Modified: stable/7/sys/dev/lmc/if_lmc.c ============================================================================== --- stable/7/sys/dev/lmc/if_lmc.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/dev/lmc/if_lmc.c Fri Feb 10 16:05:33 2012 (r231390) @@ -2526,6 +2526,7 @@ lmc_raw_input(struct ifnet *ifp, struct { softc_t *sc = IFP2SC(ifp); + M_SETFIB(mbuf, ifp->if_fib); # if INET if (mbuf->m_data[0]>>4 == 4) netisr_dispatch(NETISR_IP, mbuf); Modified: stable/7/sys/dev/ppbus/if_plip.c ============================================================================== --- stable/7/sys/dev/ppbus/if_plip.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/dev/ppbus/if_plip.c Fri Feb 10 16:05:33 2012 (r231390) @@ -516,6 +516,9 @@ lp_intr (void *arg) if (top) { if (bpf_peers_present(sc->sc_ifp->if_bpf)) lptap(sc->sc_ifp, top); + + M_SETFIB(top, sc->sc_ifp->if_fib); + netisr_queue(NETISR_IP, top); /* mbuf is free'd on failure. */ } goto done; @@ -561,6 +564,9 @@ lp_intr (void *arg) if (top) { if (bpf_peers_present(sc->sc_ifp->if_bpf)) lptap(sc->sc_ifp, top); + + M_SETFIB(top, sc->sc_ifp->if_fib); + netisr_queue(NETISR_IP, top); /* mbuf is free'd on failure. */ } } Modified: stable/7/sys/net/if_arcsubr.c ============================================================================== --- stable/7/sys/net/if_arcsubr.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_arcsubr.c Fri Feb 10 16:05:33 2012 (r231390) @@ -603,6 +603,7 @@ arc_input(struct ifnet *ifp, struct mbuf m_freem(m); return; } + M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); } Modified: stable/7/sys/net/if_atmsubr.c ============================================================================== --- stable/7/sys/net/if_atmsubr.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_atmsubr.c Fri Feb 10 16:05:33 2012 (r231390) @@ -344,6 +344,7 @@ atm_input(struct ifnet *ifp, struct atm_ return; } } + M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); } Modified: stable/7/sys/net/if_ethersubr.c ============================================================================== --- stable/7/sys/net/if_ethersubr.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_ethersubr.c Fri Feb 10 16:05:33 2012 (r231390) @@ -635,6 +635,8 @@ ether_input(struct ifnet *ifp, struct mb m_adj(m, ETHER_VLAN_ENCAP_LEN); } + M_SETFIB(m, ifp->if_fib); + /* Allow ng_ether(4) to claim this frame. */ if (IFP2AC(ifp)->ac_netgraph != NULL) { KASSERT(ng_ether_input_p != NULL, Modified: stable/7/sys/net/if_fddisubr.c ============================================================================== --- stable/7/sys/net/if_fddisubr.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_fddisubr.c Fri Feb 10 16:05:33 2012 (r231390) @@ -543,6 +543,7 @@ fddi_input(ifp, m) ifp->if_noproto++; goto dropanyway; } + M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); return; Modified: stable/7/sys/net/if_fwsubr.c ============================================================================== --- stable/7/sys/net/if_fwsubr.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_fwsubr.c Fri Feb 10 16:05:33 2012 (r231390) @@ -632,6 +632,7 @@ firewire_input(struct ifnet *ifp, struct return; } + M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); } Modified: stable/7/sys/net/if_gif.c ============================================================================== --- stable/7/sys/net/if_gif.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_gif.c Fri Feb 10 16:05:33 2012 (r231390) @@ -603,6 +603,7 @@ gif_input(m, af, ifp) ifp->if_ipackets++; ifp->if_ibytes += m->m_pkthdr.len; + M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); } Modified: stable/7/sys/net/if_iso88025subr.c ============================================================================== --- stable/7/sys/net/if_iso88025subr.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_iso88025subr.c Fri Feb 10 16:05:33 2012 (r231390) @@ -680,6 +680,7 @@ iso88025_input(ifp, m) break; } + M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); return; Modified: stable/7/sys/net/if_spppfr.c ============================================================================== --- stable/7/sys/net/if_spppfr.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_spppfr.c Fri Feb 10 16:05:33 2012 (r231390) @@ -280,6 +280,8 @@ drop: ++ifp->if_ierrors; if (! (ifp->if_flags & IFF_UP)) goto drop; + M_SETFIB(m, ifp->if_fib); + /* Check queue. */ if (netisr_queue(isr, m)) { /* (0) on success. */ if (debug) Modified: stable/7/sys/net/if_spppsubr.c ============================================================================== --- stable/7/sys/net/if_spppsubr.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_spppsubr.c Fri Feb 10 16:05:33 2012 (r231390) @@ -779,6 +779,7 @@ sppp_input(struct ifnet *ifp, struct mbu goto drop; SPPP_UNLOCK(sp); + M_SETFIB(m, ifp->if_fib); /* Check queue. */ if (netisr_queue(isr, m)) { /* (0) on success. */ if (debug) Modified: stable/7/sys/net/if_stf.c ============================================================================== --- stable/7/sys/net/if_stf.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_stf.c Fri Feb 10 16:05:33 2012 (r231390) @@ -766,6 +766,7 @@ in_stf_input(m, off) */ ifp->if_ipackets++; ifp->if_ibytes += m->m_pkthdr.len; + M_SETFIB(m, ifp->if_fib); netisr_dispatch(NETISR_IPV6, m); } Modified: stable/7/sys/net/if_tun.c ============================================================================== --- stable/7/sys/net/if_tun.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/net/if_tun.c Fri Feb 10 16:05:33 2012 (r231390) @@ -921,6 +921,7 @@ tunwrite(struct cdev *dev, struct uio *u random_harvest(m, 16, 3, 0, RANDOM_NET); ifp->if_ibytes += m->m_pkthdr.len; ifp->if_ipackets++; + M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); return (0); } Modified: stable/7/sys/netgraph/ng_iface.c ============================================================================== --- stable/7/sys/netgraph/ng_iface.c Fri Feb 10 15:54:39 2012 (r231389) +++ stable/7/sys/netgraph/ng_iface.c Fri Feb 10 16:05:33 2012 (r231390) @@ -774,6 +774,7 @@ ng_iface_rcvdata(hook_p hook, item_p ite /* First chunk of an mbuf contains good junk */ if (harvest.point_to_point) random_harvest(m, 16, 3, 0, RANDOM_NET); + M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); return (0); } From owner-svn-src-stable-7@FreeBSD.ORG Sat Feb 11 23:58:08 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F9CE1065670; Sat, 11 Feb 2012 23:58:08 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07B098FC08; Sat, 11 Feb 2012 23:58:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1BNw7JG056064; Sat, 11 Feb 2012 23:58:07 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1BNw7D9056059; Sat, 11 Feb 2012 23:58:07 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201202112358.q1BNw7D9056059@svn.freebsd.org> From: Craig Rodrigues Date: Sat, 11 Feb 2012 23:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231540 - stable/7/usr.bin/tftp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2012 23:58:08 -0000 Author: rodrigc Date: Sat Feb 11 23:58:07 2012 New Revision: 231540 URL: http://svn.freebsd.org/changeset/base/231540 Log: MFC 170382 through 231539 - this records svn:mergeinfo for previously merged changesets This pulls in changes such as: MFC 216370 - Remove adertising clause from UCB copyrighted files in usr.bin MFC 222534 - Fix a couple of spelling errors. MFC 223493 - Remove duplicated header files MFC 223135 - 223491 - man page updates MFC 229403 - Replace index() and rindex() calls with strchr() and strrchr(). MFC 230044 - fgets(3) returns a pointer, so compare against NULL, not integer 0. Modified: stable/7/usr.bin/tftp/main.c stable/7/usr.bin/tftp/tftp.1 stable/7/usr.bin/tftp/tftp.c stable/7/usr.bin/tftp/tftp.h Directory Properties: stable/7/usr.bin/tftp/ (props changed) Modified: stable/7/usr.bin/tftp/main.c ============================================================================== --- stable/7/usr.bin/tftp/main.c Sat Feb 11 23:39:53 2012 (r231539) +++ stable/7/usr.bin/tftp/main.c Sat Feb 11 23:58:07 2012 (r231540) @@ -10,10 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -56,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -82,7 +77,7 @@ __FBSDID("$FreeBSD$"); #define MAXLINE 200 #define TIMEOUT 5 /* secs between rexmt's */ -static struct sockaddr_storage peeraddr; +typedef struct sockaddr_storage peeraddr; static int connected; static char mode[32]; jmp_buf toplevel; @@ -159,7 +154,7 @@ static struct cmd cmdtab[] = { { "options", setoptions, "enable or disable RFC2347 style options" }, { "help", help, "print help information" }, - { "packetdrop", setpacketdrop, "artifical packetloss feature" }, + { "packetdrop", setpacketdrop, "artificial packetloss feature" }, { "?", help, "print help information" }, { NULL, NULL, NULL } }; @@ -442,16 +437,16 @@ put(int argc, char *argv[]) return; } targ = argv[argc - 1]; - if (rindex(argv[argc - 1], ':')) { + if (strrchr(argv[argc - 1], ':')) { char *lcp; for (n = 1; n < argc - 1; n++) - if (index(argv[n], ':')) { + if (strchr(argv[n], ':')) { putusage(argv[0]); return; } lcp = argv[argc - 1]; - targ = rindex(lcp, ':'); + targ = strrchr(lcp, ':'); *targ++ = 0; if (lcp[0] == '[' && lcp[strlen(lcp) - 1] == ']') { lcp[strlen(lcp) - 1] = '\0'; @@ -482,7 +477,7 @@ put(int argc, char *argv[]) } /* this assumes the target is a directory */ /* on a remote unix system. hmmmm. */ - cp = index(targ, '\0'); + cp = strchr(targ, '\0'); *cp++ = '/'; for (n = 1; n < argc - 1; n++) { strcpy(cp, tail(argv[n])); @@ -537,7 +532,7 @@ get(int argc, char *argv[]) } if (!connected) { for (n = 1; n < argc ; n++) - if (rindex(argv[n], ':') == 0) { + if (strrchr(argv[n], ':') == 0) { printf("No remote host specified and " "no host given for file '%s'\n", argv[n]); getusage(argv[0]); @@ -545,7 +540,7 @@ get(int argc, char *argv[]) } } for (n = 1; n < argc ; n++) { - src = rindex(argv[n], ':'); + src = strrchr(argv[n], ':'); if (src == NULL) src = argv[n]; else { @@ -686,7 +681,7 @@ tail(char *filename) char *s; while (*filename) { - s = rindex(filename, '/'); + s = strrchr(filename, '/'); if (s == NULL) break; if (s[1]) @@ -739,7 +734,7 @@ command(void) history(hist, &he, H_ENTER, bp); } else { line[0] = 0; - if (fgets(line, sizeof line , stdin) == 0) { + if (fgets(line, sizeof line , stdin) == NULL) { if (feof(stdin)) { exit(txrx_error); } else { @@ -844,8 +839,8 @@ help(int argc, char *argv[]) printf("%-*s\t%s\n", (int)HELPINDENT, c->name, c->help); printf("\n[-] : You shouldn't use these ones anymore.\n"); - printf("[*] : RFC2834 options support required.\n"); - printf("[**] : Non-standard RFC2834 option.\n"); + printf("[*] : RFC2347 options support required.\n"); + printf("[**] : Non-standard RFC2347 option.\n"); return; } while (--argc > 0) { @@ -959,7 +954,7 @@ setblocksize(int argc, char *argv[]) if (!options_rfc_enabled) printf("RFC2347 style options are not enabled " - "(but proceding anyway)\n"); + "(but proceeding anyway)\n"); if (argc != 1) { int size = atoi(argv[1]); @@ -997,7 +992,7 @@ setblocksize2(int argc, char *argv[]) if (!options_rfc_enabled || !options_extra_enabled) printf( "RFC2347 style or non-RFC defined options are not enabled " - "(but proceding anyway)\n"); + "(but proceeding anyway)\n"); if (argc != 1) { int size = atoi(argv[1]); Modified: stable/7/usr.bin/tftp/tftp.1 ============================================================================== --- stable/7/usr.bin/tftp/tftp.1 Sat Feb 11 23:39:53 2012 (r231539) +++ stable/7/usr.bin/tftp/tftp.1 Sat Feb 11 23:58:07 2012 (r231540) @@ -9,10 +9,6 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -32,7 +28,7 @@ .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 1, 2003 +.Dd June 22, 2011 .Dt TFTP 1 .Os .Sh NAME @@ -74,6 +70,21 @@ Shorthand for "mode ascii" .It Cm binary Shorthand for "mode binary" .Pp +.It Cm blocksize Ar [size] +Sets the TFTP blksize option in TFTP Read Request or Write Request packets +to +.Ar [size] +as specified in RFC 2348. Valid values are between 8 and 65464. +If no blocksize is specified, then by default a blocksize of 512 bytes +will be used. +.Pp +.It Cm blocksize2 Ar [size] +Sets the TFTP blksize2 option in TFTP Read Request or Write Request packets +to +.Ar [size] . +Values are restricted to powers of 2 between 8 and 32768. This is a +non-standard TFTP option. +.Pp .It Cm connect Ar host Op Ar port Set the .Ar host @@ -97,6 +108,14 @@ or .Cm put commands. .Pp +.It Cm debug Ar level +Enable or disable debugging levels during verbose output. The value of +.Ar level +can be one of +.Cm packet, simple, options, +or +.Cm access. +.Pp .It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname .It Cm get Xo .Oo Ar host1 : Oc Ns Ar file1 @@ -134,6 +153,11 @@ or The default is .Em ascii . .Pp +.It Cm packetdrop [arg] +Randomly drop +.Ar arg +out of 100 packets during a transfer. This is a debugging feature. +.Pp .It Cm put Ar file Op Oo Ar host : Oc Ns Ar remotename .It Cm put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory Put a file or set of files to the remote host. @@ -153,6 +177,17 @@ see the example under the .Cm get command. .Pp +.It Cm options Ar [arg] +Enable or disable support for TFTP options. The valid values of +.Ar arg +are +.Cm on +(enable RFC 2347 options), +.Cm off +(disable RFC 2347 options), and +.Cm extra +(toggle support for non-RFC defined options). +.Pp .It Cm quit Exit .Nm . @@ -161,6 +196,15 @@ An end of file also exits. .It Cm rexmt Ar retransmission-timeout Set the per-packet retransmission timeout, in seconds. .Pp +.It Cm rollover [arg] +Specify the rollover option in TFTP Read Request or Write +Request packets. After 65535 packets have been transmitted, set the block +counter to +.Ar arg . +Valid values of +.Ar arg +are 0 and 1. This is a non-standard TFTP option. +.Pp .It Cm status Show current status. .Pp @@ -173,12 +217,52 @@ Toggle packet tracing. .It Cm verbose Toggle verbose mode. .El +.Sh SEE ALSO +.Xr tftpd 8 +.Pp +The following RFC's are supported: +.Rs +RFC 1350 +.%T The TFTP Protocol (Revision 2) +.Re +.Rs +RFC 2347 +.%T TFTP Option Extension +.Re +.Rs +RFC 2348 +.%T TFTP Blocksize Option +.Re +.Rs +RFC 2349 +.%T TFTP Timeout Interval and Transfer Size Options +.Re +.Rs +RFC 3617 +.%T Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) +.Re +.Pp +The non-standard +.Cm rollover +and +.Cm blksize2 +TFTP options are mentioned here: +.Rs +.%T Extending TFTP +.%U http://www.compuphase.com/tftp.htm +.Re .Sh HISTORY The .Nm command appeared in .Bx 4.3 . -.Sh BUGS +.Pp +Edwin Groothuis performed a major rewrite of the +.Xr tftpd 8 +and +.Nm +code to support RFC2348. +.Sh NOTES Because there is no user-login or validation within the .Tn TFTP @@ -189,4 +273,5 @@ exact methods are specific to each site difficult to document here. .Pp Files larger than 33488896 octets (65535 blocks) cannot be transferred -without client and server supporting blocksize negotiation (RFC1783). +without client and server supporting the TFTP blocksize option (RFC2348), +or the non-standard TFTP rollover option. Modified: stable/7/usr.bin/tftp/tftp.c ============================================================================== --- stable/7/usr.bin/tftp/tftp.c Sat Feb 11 23:39:53 2012 (r231539) +++ stable/7/usr.bin/tftp/tftp.c Sat Feb 11 23:58:07 2012 (r231540) @@ -10,10 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/7/usr.bin/tftp/tftp.h ============================================================================== --- stable/7/usr.bin/tftp/tftp.h Sat Feb 11 23:39:53 2012 (r231539) +++ stable/7/usr.bin/tftp/tftp.h Sat Feb 11 23:58:07 2012 (r231540) @@ -10,10 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission.