From owner-p4-projects@FreeBSD.ORG Wed Feb 3 10:21:34 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 214FD1065670; Wed, 3 Feb 2010 10:21:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C13081065676 for ; Wed, 3 Feb 2010 10:21:33 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ACF5A8FC0C for ; Wed, 3 Feb 2010 10:21:33 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o13ALX97031217 for ; Wed, 3 Feb 2010 10:21:33 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o13ALXsO031214 for perforce@freebsd.org; Wed, 3 Feb 2010 10:21:33 GMT (envelope-from mav@freebsd.org) Date: Wed, 3 Feb 2010 10:21:33 GMT Message-Id: <201002031021.o13ALXsO031214@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174216 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:21:34 -0000 http://p4web.freebsd.org/chv.cgi?CH=174216 Change 174216 by mav@mav_mavbook on 2010/02/03 10:20:37 IFC Affected files ... .. //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/Makefile.inc#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/gen/rand48.3#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/string/strndup.c#2 integrate .. //depot/projects/scottl-camlock/src/lib/libpam/modules/pam_unix/pam_unix.c#3 integrate .. //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#38 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#38 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#50 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#33 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#80 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#150 integrate .. //depot/projects/scottl-camlock/src/sys/geom/geom_redboot.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/geom/virstor/g_virstor.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/kern/kern_shutdown.c#21 integrate .. //depot/projects/scottl-camlock/src/sys/kern/kern_umtx.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/kern/vfs_lookup.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/mips/include/proc.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_adhoc.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_hostap.c#7 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ioctl.h#17 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_mesh.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_sta.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_wds.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/in.c#31 integrate .. //depot/projects/scottl-camlock/src/sys/sys/ata.h#23 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/rtsold/rtsold.c#4 integrate Differences ... ==== //depot/projects/scottl-camlock/src/gnu/usr.bin/binutils/Makefile.inc#2 (text+ko) ==== @@ -1,9 +1,5 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc,v 1.9 2006/09/12 19:24:01 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc,v 1.10 2010/02/03 02:39:08 imp Exp $ -.if (${TARGET_ARCH} == "alpha") -WARNS?= 2 -.else WARNS?= 3 -.endif .include "../Makefile.inc" ==== //depot/projects/scottl-camlock/src/lib/libc/gen/rand48.3#2 (text+ko) ==== @@ -10,9 +10,9 @@ .\" to anyone/anything when using this software. .\" .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 -.\" $FreeBSD: src/lib/libc/gen/rand48.3,v 1.17 2005/01/20 09:17:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/rand48.3,v 1.19 2010/02/02 19:44:51 gavin Exp $ .\" -.Dd October 8, 1993 +.Dd February 2, 2010 .Dt RAND48 3 .Os .Sh NAME @@ -57,7 +57,7 @@ particular formula employed is r(n+1) = (a * r(n) + c) mod m where the default values are -for the multiplicand a = 0xfdeece66d = 25214903917 and +for the multiplicand a = 0x5deece66d = 25214903917 and the addend c = 0xb = 11. The modulo is always fixed at m = 2 ** 48. r(n) is called the seed of the random number generator. ==== //depot/projects/scottl-camlock/src/lib/libc/string/strndup.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/string/strndup.c,v 1.1 2008/12/06 09:37:54 kib Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/string/strndup.c,v 1.2 2010/02/02 19:02:08 ed Exp $"); #include #include @@ -42,9 +42,7 @@ size_t len; char *copy; - for (len = 0; len < n && str[len]; len++) - continue; - + len = strnlen(str, n); if ((copy = malloc(len + 1)) == NULL) return (NULL); memcpy(copy, str, len); ==== //depot/projects/scottl-camlock/src/lib/libpam/modules/pam_unix/pam_unix.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.53 2007/12/21 12:00:16 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.54 2010/02/02 13:47:18 des Exp $"); #include #include @@ -271,10 +271,11 @@ const void *yp_domain, *yp_server; #endif char salt[SALTSIZE + 1]; - login_cap_t * lc; + login_cap_t *lc; struct passwd *pwd, *old_pwd; const char *user, *old_pass, *new_pass; char *encrypted; + time_t passwordtime; int pfd, tfd, retval; if (openpam_get_option(pamh, PAM_OPT_AUTH_AS_SELF)) @@ -377,11 +378,17 @@ if ((old_pwd = pw_dup(pwd)) == NULL) return (PAM_BUF_ERR); - pwd->pw_change = 0; lc = login_getclass(pwd->pw_class); if (login_setcryptfmt(lc, password_hash, NULL) == NULL) openpam_log(PAM_LOG_ERROR, "can't set password cipher, relying on default"); + + /* set password expiry date */ + pwd->pw_change = 0; + passwordtime = login_getcaptime(lc, "passwordtime", 0, 0); + if (passwordtime > 0) + pwd->pw_change = time(NULL) + passwordtime; + login_close(lc); makesalt(salt); pwd->pw_passwd = crypt(new_pass, salt); ==== //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#38 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.72 2010/01/20 13:31:12 mav Exp $"); +__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.73 2010/02/02 11:09:28 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#38 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_all.c,v 1.13 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_all.c,v 1.14 2010/02/03 10:06:03 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#50 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.15 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.16 2010/02/02 18:03:21 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#33 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_pmp.c,v 1.6 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_pmp.c,v 1.7 2010/02/02 18:03:21 mav Exp $"); #include ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#80 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.21 2010/02/02 11:09:28 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.23 2010/02/03 10:06:03 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#150 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.237 2010/01/28 08:41:30 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.240 2010/02/03 08:42:08 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/geom/geom_redboot.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/geom_redboot.c,v 1.3 2009/06/24 06:42:13 jhay Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/geom_redboot.c,v 1.4 2010/02/03 01:12:19 gonzo Exp $"); #include #include @@ -252,7 +252,8 @@ if (!strcmp(pp->geom->class->name, REDBOOT_CLASS_NAME)) return (NULL); /* XXX only taste flash providers */ - if (strncmp(pp->name, "cfi", 3)) + if (strncmp(pp->name, "cfi", 3) && + strncmp(pp->name, "flash/spi", 9)) return (NULL); gp = g_slice_new(mp, REDBOOT_MAXSLICE, pp, &cp, &sc, sizeof(*sc), g_redboot_start); ==== //depot/projects/scottl-camlock/src/sys/geom/virstor/g_virstor.c#4 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/virstor/g_virstor.c,v 1.5 2010/01/25 20:51:40 ivoras Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/virstor/g_virstor.c,v 1.6 2010/02/02 22:25:22 delphij Exp $"); #include #include @@ -311,6 +311,11 @@ snprintf(aname, sizeof aname, "arg%d", i); prov_name = gctl_get_asciiparam(req, aname); + if (prov_name == NULL) { + gctl_error(req, "Error fetching argument '%s'", aname); + g_topology_unlock(); + return; + } if (strncmp(prov_name, _PATH_DEV, strlen(_PATH_DEV)) == 0) prov_name += strlen(_PATH_DEV); @@ -565,6 +570,10 @@ sprintf(param, "arg%d", i); prov_name = gctl_get_asciiparam(req, param); + if (prov_name == NULL) { + gctl_error(req, "Error fetching argument '%s'", param); + return; + } if (strncmp(prov_name, _PATH_DEV, strlen(_PATH_DEV)) == 0) prov_name += strlen(_PATH_DEV); ==== //depot/projects/scottl-camlock/src/sys/kern/kern_shutdown.c#21 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_shutdown.c,v 1.201 2009/10/23 15:09:51 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_shutdown.c,v 1.202 2010/02/03 08:42:08 mav Exp $"); #include "opt_ddb.h" #include "opt_kdb.h" ==== //depot/projects/scottl-camlock/src/sys/kern/kern_umtx.c#22 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.79 2010/01/10 09:31:57 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.81 2010/02/03 07:21:20 davidxu Exp $"); #include "opt_compat.h" #include @@ -2526,6 +2526,12 @@ umtxq_busy(&uq->uq_key); umtxq_unlock(&uq->uq_key); + /* + * re-read the state, in case it changed between the try-lock above + * and the check below + */ + state = fuword32(__DEVOLATILE(int32_t *, &rwlock->rw_state)); + /* set read contention bit */ while ((state & wrflags) && !(state & URWLOCK_READ_WAITERS)) { oldstate = casuword32(&rwlock->rw_state, state, state | URWLOCK_READ_WAITERS); @@ -2658,6 +2664,12 @@ umtxq_busy(&uq->uq_key); umtxq_unlock(&uq->uq_key); + /* + * re-read the state, in case it changed between the try-lock above + * and the check below + */ + state = fuword32(__DEVOLATILE(int32_t *, &rwlock->rw_state)); + while (((state & URWLOCK_WRITE_OWNER) || URWLOCK_READER_COUNT(state) != 0) && (state & URWLOCK_WRITE_WAITERS) == 0) { oldstate = casuword32(&rwlock->rw_state, state, state | URWLOCK_WRITE_WAITERS); @@ -2852,8 +2864,7 @@ } /* - * The magic thing is we should set c_has_waiters to 1 before - * releasing user mutex. + * set waiters byte and sleep. */ suword32(__DEVOLATILE(uint32_t *, &sem->_has_waiters), 1); ==== //depot/projects/scottl-camlock/src/sys/kern/vfs_lookup.c#22 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.133 2009/11/10 11:50:37 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.134 2010/02/02 23:10:27 rwatson Exp $"); #include "opt_kdtrace.h" #include "opt_ktrace.h" @@ -162,11 +162,16 @@ error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, (size_t *)&ndp->ni_pathlen); - /* If we are auditing the kernel pathname, save the user pathname. */ - if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG_UPATH1(td, cnp->cn_pnbuf); - if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG_UPATH2(td, cnp->cn_pnbuf); + if (error == 0) { + /* + * If we are auditing the kernel pathname, save the user + * pathname. + */ + if (cnp->cn_flags & AUDITVNODE1) + AUDIT_ARG_UPATH1(td, cnp->cn_pnbuf); + if (cnp->cn_flags & AUDITVNODE2) + AUDIT_ARG_UPATH2(td, cnp->cn_pnbuf); + } /* * Don't allow empty pathnames. ==== //depot/projects/scottl-camlock/src/sys/mips/include/proc.h#3 (text+ko) ==== @@ -33,7 +33,7 @@ * * @(#)proc.h 8.1 (Berkeley) 6/10/93 * JNPR: proc.h,v 1.7.2.1 2007/09/10 06:25:24 girish - * $FreeBSD: src/sys/mips/include/proc.h,v 1.2 2010/01/10 19:50:24 imp Exp $ + * $FreeBSD: src/sys/mips/include/proc.h,v 1.3 2010/02/03 04:09:36 neel Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -44,7 +44,7 @@ */ struct mdthread { int md_flags; /* machine-dependent flags */ - int md_upte[KSTACK_PAGES]; /* ptes for mapping u pcb */ + int md_upte[KSTACK_PAGES - 1]; /* ptes for mapping u pcb */ int md_ss_addr; /* single step address for ptrace */ int md_ss_instr; /* single step instruction for ptrace */ register_t md_saved_intr; ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_adhoc.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_adhoc.c,v 1.17 2009/07/05 17:59:19 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_adhoc.c,v 1.18 2010/02/03 10:07:43 rpaulo Exp $"); #endif /* @@ -293,7 +293,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -318,7 +318,6 @@ KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_hostap.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_hostap.c,v 1.28 2009/12/08 00:54:08 rpaulo Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_hostap.c,v 1.29 2010/02/03 10:07:43 rpaulo Exp $"); #endif /* @@ -480,7 +480,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -505,7 +505,6 @@ KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ioctl.h#17 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.42 2009/11/09 11:23:37 rpaulo Exp $ + * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.43 2010/02/03 10:07:43 rpaulo Exp $ */ #ifndef _NET80211_IEEE80211_IOCTL_H_ #define _NET80211_IEEE80211_IOCTL_H_ @@ -334,12 +334,12 @@ }; struct ieee80211req_mesh_route { + uint8_t imr_dest[IEEE80211_ADDR_LEN]; + uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; + uint16_t imr_nhops; uint8_t imr_flags; #define IEEE80211_MESHRT_FLAGS_VALID 0x01 #define IEEE80211_MESHRT_FLAGS_PROXY 0x02 - uint8_t imr_dest[IEEE80211_ADDR_LEN]; - uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; - uint16_t imr_nhops; uint8_t imr_pad; uint32_t imr_metric; uint32_t imr_lifetime; ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_mesh.c#8 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_mesh.c,v 1.13 2010/01/14 19:23:41 rpaulo Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_mesh.c,v 1.14 2010/02/03 10:12:49 rpaulo Exp $"); #endif /* @@ -1468,11 +1468,12 @@ if (xrates != NULL) IEEE80211_VERIFY_ELEMENT(xrates, IEEE80211_RATE_MAXSIZE - rates[1], return); - if (meshid != NULL) + if (meshid != NULL) { IEEE80211_VERIFY_ELEMENT(meshid, IEEE80211_MESHID_LEN, return); - /* NB: meshid, not ssid */ - IEEE80211_VERIFY_SSID(vap->iv_bss, meshid, return); + /* NB: meshid, not ssid */ + IEEE80211_VERIFY_SSID(vap->iv_bss, meshid, return); + } /* XXX find a better class or define it's own */ IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr2, ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_sta.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_sta.c,v 1.28 2010/01/25 12:23:51 rpaulo Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_sta.c,v 1.29 2010/02/03 10:07:43 rpaulo Exp $"); #endif /* @@ -517,7 +517,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; uint16_t rxseq; @@ -542,7 +542,6 @@ KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { ==== //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_wds.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ #include #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_wds.c,v 1.15 2009/07/05 18:17:37 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_wds.c,v 1.16 2010/02/03 10:07:43 rpaulo Exp $"); #endif /* @@ -414,7 +414,7 @@ struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; - int hdrspace, need_tap; + int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint16_t rxseq; @@ -437,7 +437,6 @@ KASSERT(ni != NULL, ("null node")); - need_tap = 1; /* mbuf need to be tapped. */ type = -1; /* undefined */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { ==== //depot/projects/scottl-camlock/src/sys/netinet/in.c#31 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/in.c,v 1.156 2010/01/08 17:49:24 qingli Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/in.c,v 1.157 2010/02/02 20:38:30 qingli Exp $"); #include "opt_carp.h" @@ -921,6 +921,12 @@ if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY) return (0); + if (ifp->if_flags & IFF_POINTOPOINT) { + if (ia->ia_dstaddr.sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr) + return (0); + } + + /* * add a loopback route to self */ ==== //depot/projects/scottl-camlock/src/sys/sys/ata.h#23 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/ata.h,v 1.48 2009/12/28 20:08:01 mav Exp $ + * $FreeBSD: src/sys/sys/ata.h,v 1.49 2010/02/03 10:06:03 mav Exp $ */ #ifndef _SYS_ATA_H_ ==== //depot/projects/scottl-camlock/src/usr.sbin/rtsold/rtsold.c#4 (text+ko) ==== @@ -28,20 +28,25 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.sbin/rtsold/rtsold.c,v 1.24 2009/09/12 22:14:58 hrs Exp $ + * $FreeBSD: src/usr.sbin/rtsold/rtsold.c,v 1.26 2010/02/02 18:38:17 ume Exp $ */ #include +#include #include #include #include #include #include +#include #include #include +#include +#include + #include #include #include @@ -785,8 +790,9 @@ static char **argv = NULL; static int n = 0; char **a; - int i, found; + int s, i, found; struct ifaddrs *ifap, *ifa, *target; + struct in6_ndireq nd; /* initialize */ while (n--) @@ -800,6 +806,11 @@ if (getifaddrs(&ifap) != 0) return NULL; + if (!Fflag && (s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { + err(1, "socket"); + /* NOTREACHED */ + } + target = NULL; /* find an ethernet */ for (ifa = ifap; ifa; ifa = ifa->ifa_next) { @@ -825,6 +836,23 @@ if (found) continue; + /* + * Skip the interfaces which IPv6 and/or accepting RA + * is disabled. + */ + if (!Fflag) { + memset(&nd, 0, sizeof(nd)); + strlcpy(nd.ifname, ifa->ifa_name, sizeof(nd.ifname)); + if (ioctl(s, SIOCGIFINFO_IN6, (caddr_t)&nd) < 0) { + err(1, "ioctl(SIOCGIFINFO_IN6)"); + /* NOTREACHED */ + } + if ((nd.ndi.flags & ND6_IFF_IFDISABLED)) + continue; + if (!(nd.ndi.flags & ND6_IFF_ACCEPT_RTADV)) + continue; + } + /* if we find multiple candidates, just warn. */ if (n != 0 && dflag > 1) warnx("multiple interfaces found"); @@ -837,7 +865,6 @@ if (!argv[n]) err(1, "malloc"); n++; - argv[n] = NULL; } if (n) { @@ -852,6 +879,8 @@ warnx("probing %s", argv[i]); } } + if (!Fflag) + close(s); freeifaddrs(ifap); return argv; }