diff --git a/UPDATING b/UPDATING index eefee86981d4..a23506b60831 100644 --- a/UPDATING +++ b/UPDATING @@ -22,6 +22,23 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW: to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20081219: + With __FreeBSD_version 800060 the makefs tool is part of + the base system (it was a port). + +20081216: + The afdata and ifnet locks have been changed from mutexes to + rwlocks, network modules will need to be re-compiled. + +20081214: + __FreeBSD_version 800059 incorporates the new arp-v2 rewrite. + RTF_CLONING, RTF_LLINFO and RTF_WASCLONED flags are eliminated. + The new code reduced struct rtentry{} by 16 bytes on 32-bit + architecture and 40 bytes on 64-bit architecture. The userland + applications "arp" and "ndp" have been updated accordingly. + The output from "netstat -r" shows only routing entries and + none of the L2 information. + 20081130: __FreeBSD_version 800057 marks the switchover from the binary ath hal to source code. Users must add the line: diff --git a/contrib/bsnmp/snmp_mibII/mibII.c b/contrib/bsnmp/snmp_mibII/mibII.c index 96bd366e10a4..83e2317665b3 100644 --- a/contrib/bsnmp/snmp_mibII/mibII.c +++ b/contrib/bsnmp/snmp_mibII/mibII.c @@ -48,8 +48,7 @@ static void *route_fd; /* if-index allocator */ static uint32_t next_if_index = 1; -/* re-fetch arp table */ -static int update_arp; +/* currently fetching the arp table */ static int in_update_arp; /* OR registrations */ @@ -910,36 +909,6 @@ mib_find_ifa(struct in_addr addr) return (NULL); } -/* - * Process a new ARP entry - */ -static void -process_arp(const struct rt_msghdr *rtm, const struct sockaddr_dl *sdl, - const struct sockaddr_in *sa) -{ - struct mibif *ifp; - struct mibarp *at; - - /* IP arp table entry */ - if (sdl->sdl_alen == 0) { - update_arp = 1; - return; - } - if ((ifp = mib_find_if_sys(sdl->sdl_index)) == NULL) - return; - /* have a valid entry */ - if ((at = mib_find_arp(ifp, sa->sin_addr)) == NULL && - (at = mib_arp_create(ifp, sa->sin_addr, - sdl->sdl_data + sdl->sdl_nlen, sdl->sdl_alen)) == NULL) - return; - - if (rtm->rtm_rmx.rmx_expire == 0) - at->flags |= MIBARP_PERM; - else - at->flags &= ~MIBARP_PERM; - at->flags |= MIBARP_FOUND; -} - /* * Handle a routing socket message. */ @@ -1080,46 +1049,12 @@ handle_rtmsg(struct rt_msghdr *rtm) } break; #endif - case RTM_GET: - mib_extract_addrs(rtm->rtm_addrs, (u_char *)(rtm + 1), addrs); - if (rtm->rtm_flags & RTF_LLINFO) { - if (addrs[RTAX_DST] == NULL || - addrs[RTAX_GATEWAY] == NULL || - addrs[RTAX_DST]->sa_family != AF_INET || - addrs[RTAX_GATEWAY]->sa_family != AF_LINK) - break; - process_arp(rtm, - (struct sockaddr_dl *)(void *)addrs[RTAX_GATEWAY], - (struct sockaddr_in *)(void *)addrs[RTAX_DST]); - } else { - if (rtm->rtm_errno == 0 && (rtm->rtm_flags & RTF_UP)) - mib_sroute_process(rtm, addrs[RTAX_GATEWAY], - addrs[RTAX_DST], addrs[RTAX_NETMASK]); - } - break; - case RTM_ADD: - mib_extract_addrs(rtm->rtm_addrs, (u_char *)(rtm + 1), addrs); - if (rtm->rtm_flags & RTF_LLINFO) { - if (addrs[RTAX_DST] == NULL || - addrs[RTAX_GATEWAY] == NULL || - addrs[RTAX_DST]->sa_family != AF_INET || - addrs[RTAX_GATEWAY]->sa_family != AF_LINK) - break; - process_arp(rtm, - (struct sockaddr_dl *)(void *)addrs[RTAX_GATEWAY], - (struct sockaddr_in *)(void *)addrs[RTAX_DST]); - } else { - if (rtm->rtm_errno == 0 && (rtm->rtm_flags & RTF_UP)) - mib_sroute_process(rtm, addrs[RTAX_GATEWAY], - addrs[RTAX_DST], addrs[RTAX_NETMASK]); - } - break; - case RTM_DELETE: mib_extract_addrs(rtm->rtm_addrs, (u_char *)(rtm + 1), addrs); - if (rtm->rtm_errno == 0 && !(rtm->rtm_flags & RTF_LLINFO)) + + if (rtm->rtm_errno == 0 && (rtm->rtm_flags & RTF_UP)) mib_sroute_process(rtm, addrs[RTAX_GATEWAY], addrs[RTAX_DST], addrs[RTAX_NETMASK]); break; @@ -1289,7 +1224,8 @@ update_ifa_info(void) /* * Update arp table - */ + * +*/ void mib_arp_update(void) { @@ -1305,11 +1241,11 @@ mib_arp_update(void) TAILQ_FOREACH(at, &mibarp_list, link) at->flags &= ~MIBARP_FOUND; - if ((buf = mib_fetch_rtab(AF_INET, NET_RT_FLAGS, RTF_LLINFO, &needed)) == NULL) { + if ((buf = mib_fetch_rtab(AF_INET, NET_RT_FLAGS, 0, &needed)) == NULL) { in_update_arp = 0; return; } - + next = buf; while (next < buf + needed) { rtm = (struct rt_msghdr *)(void *)next; @@ -1326,7 +1262,6 @@ mib_arp_update(void) at = at1; } mibarpticks = get_ticks(); - update_arp = 0; in_update_arp = 0; } @@ -1634,8 +1569,8 @@ mibII_idle(void) mib_arp_update(); mib_iflist_bad = 0; } - if (update_arp) - mib_arp_update(); + + mib_arp_update(); } diff --git a/contrib/bsnmp/snmp_mibII/mibII_route.c b/contrib/bsnmp/snmp_mibII/mibII_route.c index e17497d44ec9..b11c4223645e 100644 --- a/contrib/bsnmp/snmp_mibII/mibII_route.c +++ b/contrib/bsnmp/snmp_mibII/mibII_route.c @@ -186,8 +186,7 @@ mib_sroute_process(struct rt_msghdr *rtm, struct sockaddr *gw, memcpy(r->index, key.index, sizeof(r->index)); r->ifindex = (ifp == NULL) ? 0 : ifp->index; - r->type = (rtm->rtm_flags & RTF_LLINFO) ? 3 : - (rtm->rtm_flags & RTF_REJECT) ? 2 : 4; + r->type = (rtm->rtm_flags & RTF_REJECT) ? 2 : 4; /* cannot really know, what protocol it runs */ r->proto = (rtm->rtm_flags & RTF_LOCAL) ? 2 : diff --git a/contrib/ipfilter/ipsend/44arp.c b/contrib/ipfilter/ipsend/44arp.c index 6ee4f1b58f87..5c07fb6f0890 100644 --- a/contrib/ipfilter/ipsend/44arp.c +++ b/contrib/ipfilter/ipsend/44arp.c @@ -88,7 +88,12 @@ char *addr, *eaddr; mib[2] = 0; mib[3] = AF_INET; mib[4] = NET_RT_FLAGS; +#ifdef RTF_LLINFO mib[5] = RTF_LLINFO; +#else + mib[5] = 0; +#endif + if (sysctl(mib, 6, NULL, &needed, NULL, 0) == -1) { perror("route-sysctl-estimate"); diff --git a/contrib/netcat/FREEBSD-vendor b/contrib/netcat/FREEBSD-vendor index 8feb50ef64e3..6e31d26c32e2 100644 --- a/contrib/netcat/FREEBSD-vendor +++ b/contrib/netcat/FREEBSD-vendor @@ -1,7 +1,7 @@ # $FreeBSD$ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ -Version: 4.3 +Version: 4.4 VendorTag: OPENBSD -VersionTag: OPENBSD_4_3 +VersionTag: OPENBSD_4_4 License: BSD diff --git a/contrib/netcat/nc.1 b/contrib/netcat/nc.1 index 02e11b75233c..480196a785ae 100644 --- a/contrib/netcat/nc.1 +++ b/contrib/netcat/nc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.45 2007/05/31 19:20:13 jmc Exp $ +.\" $OpenBSD: nc.1,v 1.47 2008/05/06 16:21:03 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd $Mdocdate$ +.Dd $Mdocdate: May 6 2008 $ .Dt NC 1 .Os .Sh NAME @@ -36,9 +36,12 @@ .Sh SYNOPSIS .Nm nc .Bk -words -.Op Fl 46DdEhklnOorStUuvz +.Op Fl 46DdEhklnorStUuvz .Op Fl e Ar IPsec_policy +.Op Fl I Ar length .Op Fl i Ar interval +.Op Fl -no-tcpopt +.Op Fl O Ar length .Op Fl P Ar proxy_username .Op Fl p Ar source_port .Op Fl s Ar source_ip_address @@ -118,6 +121,8 @@ each direction is needed. Prints out .Nm help. +.It Fl I Ar length +Specifies the size of the TCP receive buffer. .It Fl i Ar interval Specifies a delay time interval between lines of text sent and received. Also causes a delay time between connections to multiple ports. @@ -146,10 +151,13 @@ option are ignored. .It Fl n Do not do any DNS or service lookups on any specified addresses, hostnames or ports. -.It Fl O +.It Fl -no-tcpopt Disables the use of TCP options on the socket, by setting the boolean TCP_NOOPT socket option. +.It Fl O Ar length +Specifies the size of the TCP send buffer. +When .It Fl o .Dq Once-only mode . By default, diff --git a/contrib/netcat/netcat.c b/contrib/netcat/netcat.c index 4bad8f23b704..77ee6bd64eac 100644 --- a/contrib/netcat/netcat.c +++ b/contrib/netcat/netcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.89 2007/02/20 14:11:17 jmc Exp $ */ +/* $OpenBSD: netcat.c,v 1.91 2008/05/09 09:00:11 markus Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -50,6 +50,7 @@ #include #include +#include #include #include #include @@ -78,7 +79,7 @@ int kflag; /* More than one connect */ int lflag; /* Bind to local port */ int nflag; /* Don't do name look up */ int oflag; /* Once only: stop on EOF */ -int Oflag; /* Do not use TCP options */ +int FreeBSD_Oflag; /* Do not use TCP options */ char *Pflag; /* Proxy username */ char *pflag; /* Localport flag */ int rflag; /* Random ports flag */ @@ -89,6 +90,8 @@ int vflag; /* Verbosity */ int xflag; /* Socks proxy */ int zflag; /* Port Scan Flag */ int Dflag; /* sodebug */ +int Iflag; /* TCP receive buffer size */ +int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ @@ -129,6 +132,10 @@ main(int argc, char *argv[]) char *proxy; const char *errstr, *proxyhost = "", *proxyport = NULL; struct addrinfo proxyhints; + struct option longopts[] = { + { "no-tcpopt", no_argument, &FreeBSD_Oflag, 1 }, + { NULL, 0, NULL, 0 } + }; ret = 1; ipsec_count = 0; @@ -138,8 +145,9 @@ main(int argc, char *argv[]) uport = NULL; sv = NULL; - while ((ch = getopt(argc, argv, - "46e:DEdhi:jklnoOP:p:rSs:tT:Uuvw:X:x:z")) != -1) { + while ((ch = getopt_long(argc, argv, + "46e:DEdhi:jklnoI:O:P:p:rSs:tT:Uuvw:X:x:z", + longopts, NULL)) != -1) { switch (ch) { case '4': family = AF_INET; @@ -203,9 +211,6 @@ main(int argc, char *argv[]) case 'o': oflag = 1; break; - case 'O': - Oflag = 1; - break; case 'P': Pflag = optarg; break; @@ -244,12 +249,28 @@ main(int argc, char *argv[]) case 'D': Dflag = 1; break; + case 'I': + Iflag = strtonum(optarg, 1, 65536 << 14, &errstr); + if (errstr != NULL) + errx(1, "TCP receive window %s: %s", + errstr, optarg); + break; + case 'O': + Oflag = strtonum(optarg, 1, 65536 << 14, &errstr); + if (errstr != NULL) { + if (strcmp(errstr, "invalid") != 0) + errx(1, "TCP send window %s: %s", + errstr, optarg); + } + break; case 'S': Sflag = 1; break; case 'T': Tflag = parse_iptos(optarg); break; + case 0: + break; default: usage(1); } @@ -512,7 +533,7 @@ int remote_connect(const char *host, const char *port, struct addrinfo hints) { struct addrinfo *res, *res0; - int s, error; + int s, error, on = 1; if ((error = getaddrinfo(host, port, &hints, &res))) errx(1, "getaddrinfo: %s", gai_strerror(error)); @@ -533,6 +554,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints) if (sflag || pflag) { struct addrinfo ahints, *ares; +#ifdef SO_BINDANY + /* try SO_BINDANY, but don't insist */ + setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); +#endif memset(&ahints, 0, sizeof(struct addrinfo)); ahints.ai_family = res0->ai_family; ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; @@ -604,9 +629,9 @@ local_listen(char *host, char *port, struct addrinfo hints) if (ipsec_policy[1] != NULL) add_ipsec_policy(s, ipsec_policy[1]); #endif - if (Oflag) { + if (FreeBSD_Oflag) { if (setsockopt(s, IPPROTO_TCP, TCP_NOOPT, - &Oflag, sizeof(Oflag)) == -1) + &FreeBSD_Oflag, sizeof(FreeBSD_Oflag)) == -1) err(1, "disable TCP options"); } @@ -838,9 +863,19 @@ set_common_sockopts(int s) &Tflag, sizeof(Tflag)) == -1) err(1, "set IP ToS"); } + if (Iflag) { + if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, + &Iflag, sizeof(Iflag)) == -1) + err(1, "set TCP receive buffer size"); + } if (Oflag) { - if (setsockopt(s, IPPROTO_TCP, TCP_NOOPT, + if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &Oflag, sizeof(Oflag)) == -1) + err(1, "set TCP send buffer size"); + } + if (FreeBSD_Oflag) { + if (setsockopt(s, IPPROTO_TCP, TCP_NOOPT, + &FreeBSD_Oflag, sizeof(FreeBSD_Oflag)) == -1) err(1, "disable TCP options"); } } @@ -878,11 +913,13 @@ help(void) #endif fprintf(stderr, "\ \t-h This help text\n\ + \t-I length TCP receive buffer length\n\ \t-i secs\t Delay interval for lines sent, ports scanned\n\ \t-k Keep inbound sockets open for multiple connects\n\ \t-l Listen mode, for inbound connects\n\ \t-n Suppress name/port resolutions\n\ - \t-O Disable TCP options\n\ + \t--no-tcpopt Disable TCP options\n\ + \t-O length TCP send buffer length\n\ \t-o Terminate on EOF on input\n\ \t-P proxyuser\tUsername for proxy authentication\n\ \t-p port\t Specify local port for remote connects\n\ @@ -931,10 +968,11 @@ void usage(int ret) { #ifdef IPSEC - fprintf(stderr, "usage: nc [-46DdEhklnOorStUuvz] [-e policy] [-i interval] [-P proxy_username] [-p source_port]\n"); + fprintf(stderr, "usage: nc [-46DdEhklnorStUuvz] [-e policy] [-I receive_buffer_len] [-i interval]\n"); #else - fprintf(stderr, "usage: nc [-46DdhklnOorStUuvz] [-i interval] [-P proxy_username] [-p source_port]\n"); + fprintf(stderr, "usage: nc [-46DdhklnorStUuvz] [-I receive_buffer_len] [-i interval]\n"); #endif + fprintf(stderr, "\t [-O send_buffer_len] [-P proxy_username] [-p source_port]\n"); fprintf(stderr, "\t [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol]\n"); fprintf(stderr, "\t [-x proxy_address[:port]] [hostname] [port[s]]\n"); if (ret) diff --git a/etc/Makefile b/etc/Makefile index 4fe764958b30..b7c82201a513 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -162,6 +162,7 @@ distribution: ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install + ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install diff --git a/etc/devd.conf b/etc/devd.conf index 601e5886bbee..2b12af0dd8ca 100644 --- a/etc/devd.conf +++ b/etc/devd.conf @@ -277,29 +277,6 @@ notify 0 { action "mixer vol +10"; }; -# The next blocks enable volume hotkeys that can be found on the Asus EeePC -# The four keys above the keyboard notify 0x1a through to 0x1d respectively -notify 0 { - match "system" "ACPI"; - match "subsystem" "ASUS-Eee"; - match "notify" "0x13"; - action "mixer 0"; -}; - -notify 0 { - match "system" "ACPI"; - match "subsystem" "ASUS-Eee"; - match "notify" "0x14"; - action "mixer vol -10"; -}; - -notify 0 { - match "system" "ACPI"; - match "subsystem" "ASUS-Eee"; - match "notify" "0x15"; - action "mixer vol +10"; -}; - /* EXAMPLES TO END OF FILE # The following might be an example of something that a vendor might diff --git a/etc/devd/Makefile b/etc/devd/Makefile new file mode 100644 index 000000000000..f2bb18449178 --- /dev/null +++ b/etc/devd/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +FILES= asus.conf + +NO_OBJ= +FILESDIR= /etc/devd +FILESMODE= 644 + +.include diff --git a/etc/devd/asus.conf b/etc/devd/asus.conf new file mode 100644 index 000000000000..7671bd1159c0 --- /dev/null +++ b/etc/devd/asus.conf @@ -0,0 +1,52 @@ +# $FreeBSD$ +# +# ASUS specific devd events + +# The next blocks enable volume hotkeys that can be found on the Asus EeePC +notify 0 { + match "system" "ACPI"; + match "subsystem" "ASUS-Eee"; + match "notify" "0x13"; + action "mixer 0"; +}; + +notify 0 { + match "system" "ACPI"; + match "subsystem" "ASUS-Eee"; + match "notify" "0x14"; + action "mixer vol -10"; +}; + +notify 0 { + match "system" "ACPI"; + match "subsystem" "ASUS-Eee"; + match "notify" "0x15"; + action "mixer vol +10"; +}; + +# Enable user hotkeys that can be found on the Asus EeePC +# The four keys above the keyboard notify 0x1a through to 0x1d respectively +#notify 0 { +# match "system" "ACPI"; +# match "subsystem" "ASUS-Eee"; +# match "notify" "0x1a"; +# action ""; +#}; +#notify 0 { +# match "system" "ACPI"; +# match "subsystem" "ASUS-Eee"; +# match "notify" "0x1b"; +# action ""; +#}; +#notify 0 { +# match "system" "ACPI"; +# match "subsystem" "ASUS-Eee"; +# match "notify" "0x1c"; +# action ""; +#}; +#notify 0 { +# match "system" "ACPI"; +# match "subsystem" "ASUS-Eee"; +# match "notify" "0x1d"; +# action ""; +#}; diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 2bbd28c862fd..ce8a4562d820 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -28,6 +28,8 @@ .. defaults .. + devd + .. gnats .. gss diff --git a/etc/rc.d/defaultroute b/etc/rc.d/defaultroute index 876d682b3f28..536cb42c209f 100755 --- a/etc/rc.d/defaultroute +++ b/etc/rc.d/defaultroute @@ -30,7 +30,7 @@ defaultroute_start() defif=`get_default_if -inet` if [ -n "${defif}" ]; then if [ ${delay} -ne ${if_up_delay} ]; then - echo "($defif)" + echo -n "($defif)" fi break fi @@ -42,6 +42,8 @@ defaultroute_start() sleep 1 delay=`expr $delay - 1` done + + echo } load_rc_config $name diff --git a/etc/regdomain.xml b/etc/regdomain.xml index 81031aa09222..95e83bd3547f 100644 --- a/etc/regdomain.xml +++ b/etc/regdomain.xml @@ -39,7 +39,7 @@ --> DEBUG - 0 + 0x1ff @@ -1080,6 +1080,75 @@ + + + SR9 + 0x0298 + + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + + + XR9 + 0x299 + + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + + + GZ901 + 0x29a + + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + + + @@ -1201,6 +1270,9 @@ 320 Guatemala + + 5002 ZComax GZ-901 + 340 Honduras @@ -1396,6 +1468,12 @@ 792 Turkey + + 5000 Ubiquiti SR9 + + + 5001 Ubiquiti XR9 + 804 Ukraine @@ -1426,6 +1504,10 @@ 716 Zimbabwe + + + 0 Debug +