svn commit: r186115 - in projects/arpv2_merge_1: . etc include
include/arpa lib/libc/include/isc lib/libc/inet lib/libc/net
lib/libc/resolv sbin/atacontrol sbin/devd sbin/ifconfig
sys/amd64/amd64 s...
Kip Macy
kmacy at FreeBSD.org
Sun Dec 14 20:20:43 PST 2008
Author: kmacy
Date: Mon Dec 15 04:20:42 2008
New Revision: 186115
URL: http://svn.freebsd.org/changeset/base/186115
Log:
IFC 186072:186109
merge latest from HEAD
Added:
projects/arpv2_merge_1/lib/libc/include/isc/platform.h
Deleted:
projects/arpv2_merge_1/sys/modules/ath_rate_amrr/
projects/arpv2_merge_1/sys/modules/ath_rate_onoe/
projects/arpv2_merge_1/sys/modules/ath_rate_sample/
Modified:
projects/arpv2_merge_1/ (props changed)
projects/arpv2_merge_1/etc/regdomain.xml
projects/arpv2_merge_1/include/arpa/nameser.h
projects/arpv2_merge_1/include/resolv.h
projects/arpv2_merge_1/lib/libc/include/isc/eventlib.h (contents, props changed)
projects/arpv2_merge_1/lib/libc/inet/inet_net_pton.c
projects/arpv2_merge_1/lib/libc/net/rcmd.3
projects/arpv2_merge_1/lib/libc/resolv/res_debug.c
projects/arpv2_merge_1/lib/libc/resolv/res_mkquery.c
projects/arpv2_merge_1/lib/libc/resolv/res_query.c
projects/arpv2_merge_1/lib/libc/resolv/res_send.c
projects/arpv2_merge_1/sbin/atacontrol/atacontrol.8
projects/arpv2_merge_1/sbin/devd/devd.cc
projects/arpv2_merge_1/sbin/devd/devd.conf.5
projects/arpv2_merge_1/sbin/ifconfig/ifieee80211.c
projects/arpv2_merge_1/sbin/ifconfig/regdomain.c
projects/arpv2_merge_1/sbin/ifconfig/regdomain.h
projects/arpv2_merge_1/sys/amd64/amd64/exception.S
projects/arpv2_merge_1/sys/boot/Makefile
projects/arpv2_merge_1/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c
projects/arpv2_merge_1/sys/dev/usb/ucom.c
projects/arpv2_merge_1/sys/dev/usb/ucomvar.h
projects/arpv2_merge_1/sys/dev/usb/uftdi.c
projects/arpv2_merge_1/sys/modules/Makefile
projects/arpv2_merge_1/sys/modules/ath/Makefile
projects/arpv2_merge_1/sys/net80211/_ieee80211.h
projects/arpv2_merge_1/sys/net80211/ieee80211.c
projects/arpv2_merge_1/sys/net80211/ieee80211_ddb.c
projects/arpv2_merge_1/sys/net80211/ieee80211_dfs.h
projects/arpv2_merge_1/sys/net80211/ieee80211_hostap.c
projects/arpv2_merge_1/sys/net80211/ieee80211_input.c
projects/arpv2_merge_1/sys/net80211/ieee80211_ioctl.c
projects/arpv2_merge_1/sys/net80211/ieee80211_node.c
projects/arpv2_merge_1/sys/net80211/ieee80211_node.h
projects/arpv2_merge_1/sys/net80211/ieee80211_output.c
projects/arpv2_merge_1/sys/net80211/ieee80211_regdomain.c
projects/arpv2_merge_1/sys/net80211/ieee80211_scan_sta.c
projects/arpv2_merge_1/sys/net80211/ieee80211_var.h
projects/arpv2_merge_1/sys/netgraph/ng_base.c
projects/arpv2_merge_1/sys/netinet/in_pcb.c
projects/arpv2_merge_1/sys/sys/vtoc.h
projects/arpv2_merge_1/tools/regression/bin/sh/builtins/type1.0.stderr (props changed)
projects/arpv2_merge_1/usr.sbin/jls/jls.c
projects/arpv2_merge_1/usr.sbin/sysinstall/cdrom.c
projects/arpv2_merge_1/usr.sbin/sysinstall/label.c
projects/arpv2_merge_1/usr.sbin/sysinstall/main.c
projects/arpv2_merge_1/usr.sbin/sysinstall/sysinstall.8
projects/arpv2_merge_1/usr.sbin/sysinstall/sysinstall.h
projects/arpv2_merge_1/usr.sbin/sysinstall/system.c
Modified: projects/arpv2_merge_1/etc/regdomain.xml
==============================================================================
--- projects/arpv2_merge_1/etc/regdomain.xml Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/etc/regdomain.xml Mon Dec 15 04:20:42 2008 (r186115)
@@ -39,7 +39,7 @@
-->
<rd id="debug">
<name>DEBUG</name>
- <sku>0</sku>
+ <sku>0x1ff</sku>
</rd>
<rd id="fcc">
@@ -1080,6 +1080,75 @@
</band>
</netband>
</rd>
+
+<rd id="sr9">
+ <name>SR9</name>
+ <sku>0x0298</sku>
+ <defcc ref="SR9"/>
+ <netband mode="11g">
+ <band>
+ <freqband ref="S1_907_922_5"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ <band>
+ <freqband ref="S1_907_922_10"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ <band>
+ <freqband ref="S1_912_917"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ </netband>
+</rd>
+
+<rd id="xr9">
+ <name>XR9</name>
+ <sku>0x299</sku>
+ <defcc ref="XR9"/>
+ <netband mode="11g">
+ <band>
+ <freqband ref="S2_907_922_5"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ <band>
+ <freqband ref="S2_907_922_10"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ <band>
+ <freqband ref="S2_912_917"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ </netband>
+</rd>
+
+<rd id="gz901">
+ <name>GZ901</name>
+ <sku>0x29a</sku>
+ <defcc ref="GZ901"/>
+ <netband mode="11g">
+ <band>
+ <freqband ref="S1_908_923_5"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ <band>
+ <freqband ref="S1_913_918_10"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ <band>
+ <freqband ref="S1_913_918"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ </netband>
+</rd>
</regulatory-domains>
<country-codes>
@@ -1201,6 +1270,9 @@
<country id="GT">
<isocc>320</isocc> <name>Guatemala</name> <rd ref="none"/>
</country>
+<country id="GZ901">
+ <isocc>5002</isocc> <name>ZComax GZ-901</name> <rd ref="gz901"/>
+</country>
<country id="HN">
<isocc>340</isocc> <name>Honduras</name> <rd ref="none"/>
</country>
@@ -1396,6 +1468,12 @@
<country id="TR">
<isocc>792</isocc> <name>Turkey</name> <rd ref="etsi"/>
</country>
+<country id="SR9">
+ <isocc>5000</isocc> <name>Ubiquiti SR9</name> <rd ref="sr9"/>
+</country>
+<country id="XR9">
+ <isocc>5001</isocc> <name>Ubiquiti XR9</name> <rd ref="xr9"/>
+</country>
<country id="UA">
<isocc>804</isocc> <name>Ukraine</name> <rd ref="none"/>
</country>
@@ -1426,6 +1504,10 @@
<country id="ZW">
<isocc>716</isocc> <name>Zimbabwe</name> <rd ref="none"/>
</country>
+
+<country id="DEBUG">
+ <isocc>0</isocc> <name>Debug</name> <rd ref="debug"/>
+</country>
</country-codes>
<!--
@@ -1575,6 +1657,61 @@
<freqstart>2512</freqstart> <freqend>2732</freqend>
<chanwidth>20</chanwidth> <chansep>5</chansep>
</freqband>
+
+<freqband id="S1_907_922_5">
+ <freqstart>2422</freqstart> <freqend>2437</freqend>
+ <chanwidth>5</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+ <flags>IEEE80211_CHAN_QUARTER</flags>
+</freqband>
+<freqband id="S1_907_922_10">
+ <freqstart>2422</freqstart> <freqend>2437</freqend>
+ <chanwidth>10</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+ <flags>IEEE80211_CHAN_HALF</flags>
+</freqband>
+<freqband id="S1_912_917">
+ <freqstart>2427</freqstart> <freqend>2432</freqend>
+ <chanwidth>20</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+</freqband>
+
+<freqband id="S2_907_922_5">
+ <freqstart>2427</freqstart> <freqend>2442</freqend>
+ <chanwidth>5</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+ <flags>IEEE80211_CHAN_QUARTER</flags>
+</freqband>
+<freqband id="S2_907_922_10">
+ <freqstart>2427</freqstart> <freqend>2442</freqend>
+ <chanwidth>10</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+ <flags>IEEE80211_CHAN_HALF</flags>
+</freqband>
+<freqband id="S2_912_917">
+ <freqstart>2432</freqstart> <freqend>2437</freqend>
+ <chanwidth>20</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+</freqband>
+
+<freqband id="S1_908_923_5">
+ <freqstart>2447</freqstart> <freqend>2467</freqend>
+ <chanwidth>5</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+ <flags>IEEE80211_CHAN_QUARTER</flags>
+</freqband>
+<freqband id="S1_913_918_10">
+ <freqstart>2457</freqstart> <freqend>2462</freqend>
+ <chanwidth>10</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+ <flags>IEEE80211_CHAN_HALF</flags>
+</freqband>
+<freqband id="S1_913_918">
+ <freqstart>2457</freqstart> <freqend>2462</freqend>
+ <chanwidth>20</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+</freqband>
+
</shared-frequency-bands>
</regulatory-data>
Modified: projects/arpv2_merge_1/include/arpa/nameser.h
==============================================================================
--- projects/arpv2_merge_1/include/arpa/nameser.h Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/include/arpa/nameser.h Mon Dec 15 04:20:42 2008 (r186115)
@@ -49,7 +49,7 @@
*/
/*
- * $Id: nameser.h,v 1.7.18.1 2005/04/27 05:00:50 sra Exp $
+ * $Id: nameser.h,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $
* $FreeBSD$
*/
@@ -424,9 +424,10 @@ typedef enum __ns_cert_types {
#define NS_NXT_MAX 127
/*%
- * EDNS0 extended flags, host order.
+ * EDNS0 extended flags and option codes, host order.
*/
#define NS_OPT_DNSSEC_OK 0x8000U
+#define NS_OPT_NSID 3
/*%
* Inline versions of get/put short/long. Pointer is advanced.
Modified: projects/arpv2_merge_1/include/resolv.h
==============================================================================
--- projects/arpv2_merge_1/include/resolv.h Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/include/resolv.h Mon Dec 15 04:20:42 2008 (r186115)
@@ -50,7 +50,7 @@
/*%
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.19.18.3 2005/08/25 04:43:51 marka Exp $
+ * $Id: resolv.h,v 1.19.18.4 2008/04/03 23:15:15 marka Exp $
* $FreeBSD$
*/
@@ -245,6 +245,7 @@ union res_sockaddr_union {
#define RES_NOCHECKNAME 0x00008000 /*%< do not check names for sanity. */
#define RES_KEEPTSIG 0x00010000 /*%< do not strip TSIG records */
#define RES_BLAST 0x00020000 /*%< blast all recursive servers */
+#define RES_NSID 0x00040000 /*%< request name server ID */
#define RES_NOTLDQUERY 0x00100000 /*%< don't unqualified name as a tld */
#define RES_USE_DNSSEC 0x00200000 /*%< use DNSSEC using OK bit in OPT */
/* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */
@@ -386,6 +387,7 @@ extern const struct res_sym __p_rcode_sy
#define sym_ntos __sym_ntos
#define sym_ston __sym_ston
#define res_nopt __res_nopt
+#define res_nopt_rdata __res_nopt_rdata
#define res_ndestroy __res_ndestroy
#define res_nametoclass __res_nametoclass
#define res_nametotype __res_nametotype
@@ -474,6 +476,8 @@ int res_findzonecut2(res_state, const c
union res_sockaddr_union *, int);
void res_nclose(res_state);
int res_nopt(res_state, int, u_char *, int, int);
+int res_nopt_rdata(res_state, int, u_char *, int, u_char *,
+ u_short, u_short, u_char *);
void res_send_setqhook(res_send_qhook);
void res_send_setrhook(res_send_rhook);
int __res_vinit(res_state, int);
Modified: projects/arpv2_merge_1/lib/libc/include/isc/eventlib.h
==============================================================================
--- projects/arpv2_merge_1/lib/libc/include/isc/eventlib.h Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/lib/libc/include/isc/eventlib.h Mon Dec 15 04:20:42 2008 (r186115)
@@ -18,7 +18,7 @@
/* eventlib.h - exported interfaces for eventlib
* vix 09sep95 [initial]
*
- * $Id: eventlib.h,v 1.3.18.2 2005/07/28 07:38:07 marka Exp $
+ * $Id: eventlib.h,v 1.3.18.3 2008/01/23 02:12:01 marka Exp $
*/
#ifndef _EVENTLIB_H
@@ -29,6 +29,8 @@
#include <sys/time.h>
#include <stdio.h>
+#include <isc/platform.h>
+
#ifndef __P
# define __EVENTLIB_P_DEFINED
# ifdef __STDC__
Added: projects/arpv2_merge_1/lib/libc/include/isc/platform.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/arpv2_merge_1/lib/libc/include/isc/platform.h Mon Dec 15 04:20:42 2008 (r186115)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: platform.h.in,v 1.2.6.2 2008/01/23 02:15:02 tbox Exp $ */
+/* $FreeBSD$ */
+
+/*! \file */
+
+#ifndef ISC_PLATFORM_H
+#define ISC_PLATFORM_H
+
+/*
+ * Define if the OS does not define struct timespec.
+ */
+#undef ISC_PLATFORM_NEEDTIMESPEC
+#ifdef ISC_PLATFORM_NEEDTIMESPEC
+#include <time.h> /* For time_t */
+struct timespec {
+ time_t tv_sec; /* seconds */
+ long tv_nsec; /* nanoseconds */
+};
+#endif
+
+#endif
Modified: projects/arpv2_merge_1/lib/libc/inet/inet_net_pton.c
==============================================================================
--- projects/arpv2_merge_1/lib/libc/inet/inet_net_pton.c Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/lib/libc/inet/inet_net_pton.c Mon Dec 15 04:20:42 2008 (r186115)
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7.18.1 2005/04/27 05:00:53 sra Exp $";
+static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7.18.2 2008/08/26 04:42:43 marka Exp $";
#endif
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -135,11 +135,11 @@ inet_net_pton_ipv4(const char *src, u_ch
assert(n >= 0 && n <= 9);
bits *= 10;
bits += n;
+ if (bits > 32)
+ goto enoent;
} while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
if (ch != '\0')
goto enoent;
- if (bits > 32)
- goto emsgsize;
}
/* Firey death and destruction unless we prefetched EOS. */
Modified: projects/arpv2_merge_1/lib/libc/net/rcmd.3
==============================================================================
--- projects/arpv2_merge_1/lib/libc/net/rcmd.3 Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/lib/libc/net/rcmd.3 Mon Dec 15 04:20:42 2008 (r186115)
@@ -238,6 +238,13 @@ For
.Fn rcmd_af ,
.Dv PF_UNSPEC
is also allowed.
+.Sh ENVIRONMENT
+.Bl -tag -width RSH
+.It Ev RSH
+When using the
+.Fn rcmd
+function, this variable is used as the program to run instead of
+.Xr rsh 1 .
.Sh DIAGNOSTICS
The
.Fn rcmd
Modified: projects/arpv2_merge_1/lib/libc/resolv/res_debug.c
==============================================================================
--- projects/arpv2_merge_1/lib/libc/resolv/res_debug.c Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/lib/libc/resolv/res_debug.c Mon Dec 15 04:20:42 2008 (r186115)
@@ -91,7 +91,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_debug.c,v 1.10.18.5 2005/07/28 07:38:11 marka Exp $";
+static const char rcsid[] = "$Id: res_debug.c,v 1.10.18.6 2008/04/03 23:15:15 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -187,10 +187,56 @@ do_section(const res_state statp,
p_type(ns_rr_type(rr)),
p_class(ns_rr_class(rr)));
else if (section == ns_s_ar && ns_rr_type(rr) == ns_t_opt) {
+ u_int16_t optcode, optlen, rdatalen = ns_rr_rdlen(rr);
u_int32_t ttl = ns_rr_ttl(rr);
+
fprintf(file,
"; EDNS: version: %u, udp=%u, flags=%04x\n",
(ttl>>16)&0xff, ns_rr_class(rr), ttl&0xffff);
+
+ while (rdatalen >= 4) {
+ const u_char *cp = ns_rr_rdata(rr);
+ int i;
+
+ GETSHORT(optcode, cp);
+ GETSHORT(optlen, cp);
+
+ if (optcode == NS_OPT_NSID) {
+ fputs("; NSID: ", file);
+ if (optlen == 0) {
+ fputs("; NSID\n", file);
+ } else {
+ fputs("; NSID: ", file);
+ for (i = 0; i < optlen; i++)
+ fprintf(file, "%02x ",
+ cp[i]);
+ fputs(" (",file);
+ for (i = 0; i < optlen; i++)
+ fprintf(file, "%c",
+ isprint(cp[i])?
+ cp[i] : '.');
+ fputs(")\n", file);
+ }
+ } else {
+ if (optlen == 0) {
+ fprintf(file, "; OPT=%u\n",
+ optcode);
+ } else {
+ fprintf(file, "; OPT=%u: ",
+ optcode);
+ for (i = 0; i < optlen; i++)
+ fprintf(file, "%02x ",
+ cp[i]);
+ fputs(" (",file);
+ for (i = 0; i < optlen; i++)
+ fprintf(file, "%c",
+ isprint(cp[i]) ?
+ cp[i] : '.');
+ fputs(")\n", file);
+ }
+ }
+ rdatalen -= 4 + optlen;
+ }
} else {
n = ns_sprintrr(handle, &rr, NULL, NULL,
buf, buflen);
@@ -202,7 +248,7 @@ do_section(const res_state statp,
buf = malloc(buflen += 1024);
if (buf == NULL) {
fprintf(file,
- ";; memory allocation failure\n");
+ ";; memory allocation failure\n");
return;
}
continue;
@@ -379,7 +425,7 @@ static const struct res_sym __p_default_
{ns_s_an, "ANSWER", (char *)0},
{ns_s_ns, "AUTHORITY", (char *)0},
{ns_s_ar, "ADDITIONAL", (char *)0},
- {0, (char *)0, (char *)0}
+ {0, (char *)0, (char *)0}
};
static const struct res_sym __p_update_section_syms[] = {
@@ -387,7 +433,7 @@ static const struct res_sym __p_update_s
{S_PREREQ, "PREREQUISITE", (char *)0},
{S_UPDATE, "UPDATE", (char *)0},
{S_ADDT, "ADDITIONAL", (char *)0},
- {0, (char *)0, (char *)0}
+ {0, (char *)0, (char *)0}
};
const struct res_sym __p_key_syms[] = {
@@ -615,6 +661,7 @@ p_option(u_long option) {
case RES_USE_INET6: return "inet6";
#ifdef RES_USE_EDNS0 /*%< KAME extension */
case RES_USE_EDNS0: return "edns0";
+ case RES_NSID: return "nsid";
#endif
#ifdef RES_USE_DNAME
case RES_USE_DNAME: return "dname";
Modified: projects/arpv2_merge_1/lib/libc/resolv/res_mkquery.c
==============================================================================
--- projects/arpv2_merge_1/lib/libc/resolv/res_mkquery.c Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/lib/libc/resolv/res_mkquery.c Mon Dec 15 04:20:42 2008 (r186115)
@@ -66,7 +66,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_mkquery.c,v 1.5.18.1 2005/04/27 05:01:11 sra Exp $";
+static const char rcsid[] = "$Id: res_mkquery.c,v 1.5.18.2 2008/04/03 23:15:15 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -201,9 +201,6 @@ res_nmkquery(res_state statp,
#ifdef RES_USE_EDNS0
/* attach OPT pseudo-RR, as documented in RFC2671 (EDNS0). */
-#ifndef T_OPT
-#define T_OPT 41
-#endif
int
res_nopt(res_state statp,
@@ -228,15 +225,16 @@ res_nopt(res_state statp,
if ((ep - cp) < 1 + RRFIXEDSZ)
return (-1);
- *cp++ = 0; /*%< "." */
- ns_put16(T_OPT, cp); /*%< TYPE */
+ *cp++ = 0; /*%< "." */
+ ns_put16(ns_t_opt, cp); /*%< TYPE */
cp += INT16SZ;
if (anslen > 0xffff)
anslen = 0xffff; /* limit to 16bit value */
- ns_put16(anslen & 0xffff, cp); /*%< CLASS = UDP payload size */
+ ns_put16(anslen & 0xffff, cp); /*%< CLASS = UDP payload size */
cp += INT16SZ;
- *cp++ = NOERROR; /*%< extended RCODE */
- *cp++ = 0; /*%< EDNS version */
+ *cp++ = NOERROR; /*%< extended RCODE */
+ *cp++ = 0; /*%< EDNS version */
+
if (statp->options & RES_USE_DNSSEC) {
#ifdef DEBUG
if (statp->options & RES_DEBUG)
@@ -246,12 +244,60 @@ res_nopt(res_state statp,
}
ns_put16(flags, cp);
cp += INT16SZ;
- ns_put16(0, cp); /*%< RDLEN */
+
+ ns_put16(0U, cp); /*%< RDLEN */
cp += INT16SZ;
+
hp->arcount = htons(ntohs(hp->arcount) + 1);
return (cp - buf);
}
+
+/*
+ * Construct variable data (RDATA) block for OPT psuedo-RR, append it
+ * to the buffer, then update the RDLEN field (previously set to zero by
+ * res_nopt()) with the new RDATA length.
+ */
+int
+res_nopt_rdata(res_state statp,
+ int n0, /*%< current offset in buffer */
+ u_char *buf, /*%< buffer to put query */
+ int buflen, /*%< size of buffer */
+ u_char *rdata, /*%< ptr to start of opt rdata */
+ u_short code, /*%< OPTION-CODE */
+ u_short len, /*%< OPTION-LENGTH */
+ u_char *data) /*%< OPTION_DATA */
+{
+ register u_char *cp, *ep;
+
+#ifdef DEBUG
+ if ((statp->options & RES_DEBUG) != 0U)
+ printf(";; res_nopt_rdata()\n");
+#endif
+
+ cp = buf + n0;
+ ep = buf + buflen;
+
+ if ((ep - cp) < (4 + len))
+ return (-1);
+
+ if (rdata < (buf + 2) || rdata >= ep)
+ return (-1);
+
+ ns_put16(code, cp);
+ cp += INT16SZ;
+
+ ns_put16(len, cp);
+ cp += INT16SZ;
+
+ memcpy(cp, data, len);
+ cp += len;
+
+ len = cp - rdata;
+ ns_put16(len, rdata - 2); /* Update RDLEN field */
+
+ return (cp - buf);
+}
#endif
/*! \file */
Modified: projects/arpv2_merge_1/lib/libc/resolv/res_query.c
==============================================================================
--- projects/arpv2_merge_1/lib/libc/resolv/res_query.c Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/lib/libc/resolv/res_query.c Mon Dec 15 04:20:42 2008 (r186115)
@@ -66,7 +66,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_query.c,v 1.7.18.1 2005/04/27 05:01:11 sra Exp $";
+static const char rcsid[] = "$Id: res_query.c,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -115,8 +115,9 @@ res_nquery(res_state statp,
{
u_char buf[MAXPACKET];
HEADER *hp = (HEADER *) answer;
- int n;
u_int oflags;
+ u_char *rdata;
+ int n;
oflags = statp->_flags;
@@ -131,8 +132,14 @@ again:
buf, sizeof(buf));
#ifdef RES_USE_EDNS0
if (n > 0 && (statp->_flags & RES_F_EDNS0ERR) == 0 &&
- (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U)
+ (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC|RES_NSID))) {
n = res_nopt(statp, n, buf, sizeof(buf), anslen);
+ rdata = &buf[n];
+ if (n > 0 && (statp->options & RES_NSID) != 0U) {
+ n = res_nopt_rdata(statp, n, buf, sizeof(buf), rdata,
+ NS_OPT_NSID, 0, NULL);
+ }
+ }
#endif
if (n <= 0) {
#ifdef DEBUG
@@ -142,6 +149,7 @@ again:
RES_SET_H_ERRNO(statp, NO_RECOVERY);
return (n);
}
+
n = res_nsend(statp, buf, n, answer, anslen);
if (n < 0) {
#ifdef RES_USE_EDNS0
Modified: projects/arpv2_merge_1/lib/libc/resolv/res_send.c
==============================================================================
--- projects/arpv2_merge_1/lib/libc/resolv/res_send.c Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/lib/libc/resolv/res_send.c Mon Dec 15 04:20:42 2008 (r186115)
@@ -66,7 +66,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_send.c,v 1.9.18.8 2006/10/16 23:00:58 marka Exp $";
+static const char rcsid[] = "$Id: res_send.c,v 1.9.18.10 2008/01/27 02:06:26 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -302,7 +302,7 @@ int
res_nsend(res_state statp,
const u_char *buf, int buflen, u_char *ans, int anssiz)
{
- int gotsomewhere, terrno, try, v_circuit, resplen, ns, n;
+ int gotsomewhere, terrno, tries, v_circuit, resplen, ns, n;
#ifdef USE_KQUEUE
int kq;
#endif
@@ -420,7 +420,7 @@ res_nsend(res_state statp,
/*
* Send request, RETRY times, or until successful.
*/
- for (try = 0; try < statp->retry; try++) {
+ for (tries = 0; tries < statp->retry; tries++) {
for (ns = 0; ns < statp->nscount; ns++) {
struct sockaddr *nsap;
int nsaplen;
@@ -471,7 +471,7 @@ res_nsend(res_state statp,
if (v_circuit) {
/* Use VC; at most one attempt per server. */
- try = statp->retry;
+ tries = statp->retry;
n = send_vc(statp, buf, buflen, ans, anssiz, &terrno,
ns);
if (n < 0)
@@ -486,7 +486,7 @@ res_nsend(res_state statp,
kq,
#endif
buf, buflen, ans, anssiz, &terrno,
- ns, try, &v_circuit, &gotsomewhere);
+ ns, tries, &v_circuit, &gotsomewhere);
if (n < 0)
goto fail;
if (n == 0)
@@ -632,6 +632,9 @@ send_vc(res_state statp,
u_short len;
u_char *cp;
void *tmp;
+#ifdef SO_NOSIGPIPE
+ int on = 1;
+#endif
nsap = get_nsaddr(statp, ns);
nsaplen = get_salen(nsap);
@@ -679,6 +682,17 @@ send_vc(res_state statp,
return (-1);
}
}
+#ifdef SO_NOSIGPIPE
+ /*
+ * Disable generation of SIGPIPE when writing to a closed
+ * socket. Write should return -1 and set errno to EPIPE
+ * instead.
+ *
+ * Push on even if setsockopt(SO_NOSIGPIPE) fails.
+ */
+ (void)_setsockopt(statp->_vcsock, SOL_SOCKET, SO_NOSIGPIPE, &on,
+ sizeof(on));
+#endif
errno = 0;
if (_connect(statp->_vcsock, nsap, nsaplen) < 0) {
*terrno = errno;
@@ -811,7 +825,7 @@ send_dg(res_state statp,
int kq,
#endif
const u_char *buf, int buflen, u_char *ans,
- int anssiz, int *terrno, int ns, int try, int *v_circuit,
+ int anssiz, int *terrno, int ns, int tries, int *v_circuit,
int *gotsomewhere)
{
const HEADER *hp = (const HEADER *) buf;
@@ -915,7 +929,7 @@ send_dg(res_state statp,
/*
* Wait for reply.
*/
- seconds = (statp->retrans << try);
+ seconds = (statp->retrans << tries);
if (ns > 0)
seconds /= statp->nscount;
if (seconds <= 0)
Modified: projects/arpv2_merge_1/sbin/atacontrol/atacontrol.8
==============================================================================
--- projects/arpv2_merge_1/sbin/atacontrol/atacontrol.8 Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/sbin/atacontrol/atacontrol.8 Mon Dec 15 04:20:42 2008 (r186115)
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 25, 2008
+.Dd December 14, 2008
.Dt ATACONTROL 8
.Os
.Sh NAME
@@ -63,6 +63,7 @@
.Nm
.Ic mode
.Ar device
+.Op Ar mode
.Nm
.Ic info
.Ar channel
@@ -94,7 +95,7 @@ The
.Ar channel
argument is the ATA channel device (e.g., ata0) on which to operate.
The following commands are supported:
-.Bl -tag -width "rebuild"
+.Bl -tag -width ".Ic addspare"
.It Ic attach
Attach an ATA
.Ar channel .
@@ -162,9 +163,13 @@ Rebuild a RAID1 array on a RAID capable
.It Ic status
Get the status of an ATA RAID.
.It Ic mode
-Without the mode argument, the current transfer modes of the
+Without the
+.Ar mode
+argument, the current transfer mode of the
device are printed.
-If the mode argument is given, the ATA driver
+If the
+.Ar mode
+argument is given, the ATA driver
is asked to change the transfer mode to the one given.
The ATA driver
will reject modes that are not supported by the hardware.
@@ -190,13 +195,12 @@ and
.Cm UDMA6
(alias
.Cm UDMA133 ) .
-The device name and manufacture/version strings are shown.
.It Ic cap
Show detailed info about the device on
.Ar device .
.It Ic spindown
Set or report timeout after which the
-.Ar device
+.Ar device
will be spun down.
To arm the timeout the device needs at least one more request after
setting the timeout.
@@ -205,6 +209,7 @@ No further actions are needed in this ca
.It Ic info
Show info about the attached devices on the
.Ar channel .
+The device name and manufacture/version strings are shown.
.It Ic list
Show info about all attached devices on all active controllers.
.El
@@ -312,7 +317,7 @@ If the system has a pure software array
RAID controller, then shut the system down, make sure that the disk
that was still working is moved to the bootable position (channel 0
or whatever the BIOS allows the system to boot from) and the blank disk
-is placed in the secondary position, then boot the system into
+is placed in the secondary position, then boot the system into
single-user mode and issue the command:
.Pp
.Dl "atacontrol addspare ar0 ad6"
Modified: projects/arpv2_merge_1/sbin/devd/devd.cc
==============================================================================
--- projects/arpv2_merge_1/sbin/devd/devd.cc Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/sbin/devd/devd.cc Mon Dec 15 04:20:42 2008 (r186115)
@@ -307,7 +307,7 @@ void
config::parse_one_file(const char *fn)
{
if (Dflag)
- printf("Parsing %s\n", fn);
+ fprintf(stderr, "Parsing %s\n", fn);
yyin = fopen(fn, "r");
if (yyin == NULL)
err(1, "Cannot open config file %s", fn);
@@ -325,7 +325,7 @@ config::parse_files_in_dir(const char *d
char path[PATH_MAX];
if (Dflag)
- printf("Parsing files in %s\n", dirname);
+ fprintf(stderr, "Parsing files in %s\n", dirname);
dirp = opendir(dirname);
if (dirp == NULL)
return;
Modified: projects/arpv2_merge_1/sbin/devd/devd.conf.5
==============================================================================
--- projects/arpv2_merge_1/sbin/devd/devd.conf.5 Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/sbin/devd/devd.conf.5 Mon Dec 15 04:20:42 2008 (r186115)
@@ -110,7 +110,7 @@ statement.
.It Ic directory Qq Ar /some/path ;
Adds the given directory to the list of directories from which
.Xr devd 8
-will read
+will read all files named "*.conf" as further
configuration files.
Any number of
.Ic directory
Modified: projects/arpv2_merge_1/sbin/ifconfig/ifieee80211.c
==============================================================================
--- projects/arpv2_merge_1/sbin/ifconfig/ifieee80211.c Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/sbin/ifconfig/ifieee80211.c Mon Dec 15 04:20:42 2008 (r186115)
@@ -425,7 +425,7 @@ setregdomain_cb(int s, void *arg)
struct ieee80211_devcaps_req dc;
struct regdata *rdp = getregdata();
- if (rd->country != 0) {
+ if (rd->country != NO_COUNTRY) {
const struct country *cc;
/*
* Check current country seting to make sure it's
@@ -456,7 +456,7 @@ setregdomain_cb(int s, void *arg)
errx(1, "country %s (%s) is not usable with "
"regdomain %d", cc->isoname, cc->name,
rd->regdomain);
- else if (rp->cc != 0 && rp->cc != cc)
+ else if (rp->cc != NULL && rp->cc != cc)
errx(1, "country %s (%s) is not usable with "
"regdomain %s", cc->isoname, cc->name,
rp->name);
@@ -664,30 +664,38 @@ getchannelflags(const char *val, int fre
}
static void
-set80211channel(const char *val, int d, int s, const struct afswtch *rafp)
+getchannel(int s, struct ieee80211_channel *chan, const char *val)
{
- struct ieee80211_channel chan;
-
- memset(&chan, 0, sizeof(chan));
- if (!isanyarg(val)) {
- int v, flags;
- char *ep;
+ int v, flags;
+ char *eptr;
- getchaninfo(s);
- v = strtol(val, &ep, 10);
- if (val[0] == '\0' || val == ep || errno == ERANGE ||
- /* channel may be suffixed with nothing, :flag, or /width */
- (ep[0] != '\0' && ep[0] != ':' && ep[0] != '/'))
- errx(1, "invalid channel specification");
- flags = getchannelflags(val, v);
- if (v > 255) { /* treat as frequency */
- mapfreq(&chan, v, flags);
- } else {
- mapchan(&chan, v, flags);
- }
+ memset(chan, 0, sizeof(*chan));
+ if (isanyarg(val)) {
+ chan->ic_freq = IEEE80211_CHAN_ANY;
+ return;
+ }
+ getchaninfo(s);
+ errno = 0;
+ v = strtol(val, &eptr, 10);
+ if (val[0] == '\0' || val == eptr || errno == ERANGE ||
+ /* channel may be suffixed with nothing, :flag, or /width */
+ (eptr[0] != '\0' && eptr[0] != ':' && eptr[0] != '/'))
+ errx(1, "invalid channel specification%s",
+ errno == ERANGE ? " (out of range)" : "");
+ flags = getchannelflags(val, v);
+ if (v > 255) { /* treat as frequency */
+ mapfreq(chan, v, flags);
} else {
- chan.ic_freq = IEEE80211_CHAN_ANY;
+ mapchan(chan, v, flags);
}
+}
+
+static void
+set80211channel(const char *val, int d, int s, const struct afswtch *rafp)
+{
+ struct ieee80211_channel chan;
+
+ getchannel(s, &chan, val);
set80211(s, IEEE80211_IOC_CURCHAN, 0, sizeof(chan), &chan);
}
@@ -695,17 +703,8 @@ static void
set80211chanswitch(const char *val, int d, int s, const struct afswtch *rafp)
{
struct ieee80211_chanswitch_req csr;
- int v, flags;
- memset(&csr, 0, sizeof(csr));
- getchaninfo(s);
- v = atoi(val);
- flags = getchannelflags(val, v);
- if (v > 255) { /* treat as frequency */
- mapfreq(&csr.csa_chan, v, flags);
- } else {
- mapchan(&csr.csa_chan, v, flags);
- }
+ getchannel(s, &csr.csa_chan, val);
csr.csa_mode = 1;
csr.csa_count = 5;
set80211(s, IEEE80211_IOC_CHANSWITCH, 0, sizeof(csr), &csr);
@@ -1770,14 +1769,21 @@ regdomain_addchans(struct ieee80211req_c
printf("%u: skip, flags 0x%x not available\n", freq, chanFlags);
continue;
}
+ /*
+ * NB: don't enforce 1/2 and 1/4 rate channels being
+ * specified in the device's calibration list for
+ * 900MHz cards because most are not self-identifying.
+ */
if ((flags & IEEE80211_CHAN_HALF) &&
- (chanFlags & IEEE80211_CHAN_HALF) == 0) {
+ ((chanFlags & IEEE80211_CHAN_HALF) == 0 &&
+ (flags & IEEE80211_CHAN_GSM) == 0)) {
if (verbose)
printf("%u: skip, device does not support half-rate channels\n", freq);
continue;
}
if ((flags & IEEE80211_CHAN_QUARTER) &&
- (chanFlags & IEEE80211_CHAN_QUARTER) == 0) {
+ ((chanFlags & IEEE80211_CHAN_HALF) == 0 &&
+ (flags & IEEE80211_CHAN_GSM) == 0)) {
if (verbose)
printf("%u: skip, device does not support quarter-rate channels\n", freq);
continue;
@@ -1951,8 +1957,12 @@ DECL_CMD_FUNC(set80211regdomain, val, d)
rd = lib80211_regdomain_findbyname(rdp, val);
if (rd == NULL) {
- rd = lib80211_regdomain_findbysku(rdp, atoi(val));
- if (rd == NULL)
+ char *eptr;
+ long sku = strtol(val, &eptr, 0);
+
+ if (eptr != val)
+ rd = lib80211_regdomain_findbysku(rdp, sku);
+ if (eptr == val || rd == NULL)
errx(1, "unknown regdomain %s", val);
}
getregdomain(s);
@@ -1975,8 +1985,12 @@ DECL_CMD_FUNC(set80211country, val, d)
cc = lib80211_country_findbyname(rdp, val);
if (cc == NULL) {
- cc = lib80211_country_findbycc(rdp, atoi(val));
- if (cc == NULL)
+ char *eptr;
+ long code = strtol(val, &eptr, 0);
+
+ if (eptr != val)
+ cc = lib80211_country_findbycc(rdp, code);
+ if (eptr == val || cc == NULL)
errx(1, "unknown ISO country code %s", val);
}
getregdomain(s);
@@ -3534,8 +3548,12 @@ get80211opmode(int s)
(void) strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name));
if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0) {
- if (ifmr.ifm_current & IFM_IEEE80211_ADHOC)
- return IEEE80211_M_IBSS; /* XXX ahdemo */
+ if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) {
+ if (ifmr.ifm_current & IFM_FLAG0)
+ return IEEE80211_M_AHDEMO;
+ else
+ return IEEE80211_M_IBSS;
+ }
if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP)
return IEEE80211_M_HOSTAP;
if (ifmr.ifm_current & IFM_IEEE80211_MONITOR)
@@ -4244,6 +4262,7 @@ end:
}
}
}
+
if (get80211val(s, IEEE80211_IOC_BEACON_INTERVAL, &val) != -1) {
/* XXX default define not visible */
if (val != 100 || verbose)
Modified: projects/arpv2_merge_1/sbin/ifconfig/regdomain.c
==============================================================================
--- projects/arpv2_merge_1/sbin/ifconfig/regdomain.c Mon Dec 15 04:18:44 2008 (r186114)
+++ projects/arpv2_merge_1/sbin/ifconfig/regdomain.c Mon Dec 15 04:20:42 2008 (r186115)
@@ -48,6 +48,7 @@ static const char rcsid[] = "$FreeBSD$";
#define MAXLEVEL 20
struct mystate {
+ XML_Parser parser;
struct regdata *rdp;
struct regdomain *rd; /* current domain */
struct netband *netband; /* current netband */
@@ -107,7 +108,8 @@ start_element(void *data, const char *na
}
if (iseq(name, "netband") && mt->curband == NULL && mt->rd != NULL) {
if (mode == NULL) {
- /* XXX complain */
+ warnx("no mode for netband at line %ld",
+ XML_GetCurrentLineNumber(mt->parser));
return;
}
if (iseq(mode, "11b"))
@@ -120,12 +122,16 @@ start_element(void *data, const char *na
mt->curband = &mt->rd->bands_11ng;
else if (iseq(mode, "11na"))
mt->curband = &mt->rd->bands_11na;
- /* XXX else complain */
+ else
+ warnx("unknown mode \"%s\" at line %ld",
+ __DECONST(char *, mode),
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list