CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Thu Feb 8 07:53:47 UTC 2018 Modified Files: src/sys/dev/pci: if_et.c Log Message: update for GCC 6: - fix an array bounds violation and pass the right address to ether_crc32_be(). (i assume this actually makes et(4) multicast work.) To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/if_et.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_et.c diff -u src/sys/dev/pci/if_et.c:1.15 src/sys/dev/pci/if_et.c:1.16 --- src/sys/dev/pci/if_et.c:1.15 Sat Jul 29 01:47:48 2017 +++ src/sys/dev/pci/if_et.c Thu Feb 8 07:53:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_et.c,v 1.15 2017/07/29 01:47:48 riastradh Exp $ */ +/* $NetBSD: if_et.c,v 1.16 2018/02/08 07:53:47 mrg Exp $ */ /* $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.15 2017/07/29 01:47:48 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.16 2018/02/08 07:53:47 mrg Exp $"); #include "opt_inet.h" #include "vlan.h" @@ -1224,8 +1224,7 @@ et_setmulti(struct et_softc *sc) addr[i] &= enm->enm_addrlo[i]; } - h = ether_crc32_be(LLADDR((struct sockaddr_dl *)addr), - ETHER_ADDR_LEN); + h = ether_crc32_be(addr, ETHER_ADDR_LEN); h = (h & 0x3f80) >> 23; hp = &hash[0];
CVS commit: src/sys/dev/nand
Module Name:src Committed By: mrg Date: Thu Feb 8 07:48:19 UTC 2018 Modified Files: src/sys/dev/nand: nand_bbt.c Log Message: update for GCC 6: - nand_bbt_block_mark() has a left-shift of negative value issue. this change avoids it, but reviewers indicate this function has other problems. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nand/nand_bbt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/nand/nand_bbt.c diff -u src/sys/dev/nand/nand_bbt.c:1.7 src/sys/dev/nand/nand_bbt.c:1.8 --- src/sys/dev/nand/nand_bbt.c:1.7 Tue Oct 22 01:01:27 2013 +++ src/sys/dev/nand/nand_bbt.c Thu Feb 8 07:48:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nand_bbt.c,v 1.7 2013/10/22 01:01:27 htodd Exp $ */ +/* $NetBSD: nand_bbt.c,v 1.8 2018/02/08 07:48:19 mrg Exp $ */ /*- * Copyright (c) 2011 Department of Software Engineering, @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nand_bbt.c,v 1.7 2013/10/22 01:01:27 htodd Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nand_bbt.c,v 1.8 2018/02/08 07:48:19 mrg Exp $"); #include #include @@ -208,7 +208,7 @@ nand_bbt_block_mark(device_t self, flash __USE(chip); KASSERT(block < chip->nc_size / chip->nc_block_size); - clean = (~0x03 << ((block % 4) * 2)); + clean = (0xfc << ((block % 4) * 2)); marker = (marker << ((block % 4) * 2)); /* set byte containing the 2 bit marker for this block */
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Thu Feb 8 07:11:20 UTC 2018 Modified Files: src/sys/netinet: udp_usrreq.c Log Message: Style, and remove printfs. To generate a diff of this commit: cvs rdiff -u -r1.237 -r1.238 src/sys/netinet/udp_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/udp_usrreq.c diff -u src/sys/netinet/udp_usrreq.c:1.237 src/sys/netinet/udp_usrreq.c:1.238 --- src/sys/netinet/udp_usrreq.c:1.237 Thu Feb 8 06:50:38 2018 +++ src/sys/netinet/udp_usrreq.c Thu Feb 8 07:11:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.237 2018/02/08 06:50:38 maxv Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.238 2018/02/08 07:11:20 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.237 2018/02/08 06:50:38 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.238 2018/02/08 07:11:20 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -124,44 +124,44 @@ __KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c #ifdef INET6 #include #endif -#endif /* IPSEC */ +#endif #ifdef IPKDB #include #endif -int udpcksum = 1; -int udp_do_loopback_cksum = 0; +int udpcksum = 1; +int udp_do_loopback_cksum = 0; -struct inpcbtable udbtable; +struct inpcbtable udbtable; percpu_t *udpstat_percpu; #ifdef INET #ifdef IPSEC static int udp4_espinudp (struct mbuf **, int, struct sockaddr *, - struct socket *); +struct socket *); #endif static void udp4_sendup (struct mbuf *, int, struct sockaddr *, - struct socket *); +struct socket *); static int udp4_realinput (struct sockaddr_in *, struct sockaddr_in *, - struct mbuf **, int); +struct mbuf **, int); static int udp4_input_checksum(struct mbuf *, const struct udphdr *, int, int); #endif #ifdef INET -static void udp_notify (struct inpcb *, int); +static void udp_notify (struct inpcb *, int); #endif #ifndef UDBHASHSIZE #define UDBHASHSIZE 128 #endif -int udbhashsize = UDBHASHSIZE; +int udbhashsize = UDBHASHSIZE; /* * For send - really max datagram size; for receive - 40 1K datagrams. */ -static int udp_sendspace = 9216; -static int udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in)); +static int udp_sendspace = 9216; +static int udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in)); #ifdef MBUFTRACE struct mowner udp_mowner = MOWNER_INIT("udp", ""); @@ -229,7 +229,6 @@ udp_init(void) /* * Checksum extended UDP header and data. */ - int udp_input_checksum(int af, struct mbuf *m, const struct udphdr *uh, int iphlen, int len) @@ -257,7 +256,6 @@ udp_input_checksum(int af, struct mbuf * /* * Checksum extended UDP header and data. */ - static int udp4_input_checksum(struct mbuf *m, const struct udphdr *uh, int iphlen, int len) @@ -351,6 +349,7 @@ udp_input(struct mbuf *m, ...) UDP_STATINC(UDP_STAT_HDROPS); return; } + /* * Enforce alignment requirements that are violated in * some cases, see kern/50766 for details. @@ -441,8 +440,8 @@ udp_input(struct mbuf *m, ...) UDP_STATINC(UDP_STAT_NOPORT); #ifdef IPKDB if (checkipkdb(&ip->ip_src, uh->uh_sport, uh->uh_dport, -m, iphlen + sizeof(struct udphdr), -m->m_pkthdr.len - iphlen - sizeof(struct udphdr))) { + m, iphlen + sizeof(struct udphdr), + m->m_pkthdr.len - iphlen - sizeof(struct udphdr))) { /* * It was a debugger connect packet, * just drop it now @@ -467,7 +466,7 @@ badcsum: #ifdef INET static void udp4_sendup(struct mbuf *m, int off /* offset of data portion */, - struct sockaddr *src, struct socket *so) +struct sockaddr *src, struct socket *so) { struct mbuf *opts = NULL; struct mbuf *n; @@ -487,18 +486,17 @@ udp4_sendup(struct mbuf *m, int off /* o 0, 0); return; } -#endif /*IPSEC*/ +#endif if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) { - if (inp->inp_flags & INP_CONTROLOPTS - || SOOPT_TIMESTAMP(so->so_options)) { + if (inp->inp_flags & INP_CONTROLOPTS || + SOOPT_TIMESTAMP(so->so_options)) { struct ip *ip = mtod(n, struct ip *); ip_savecontrol(inp, &opts, ip, n); } m_adj(n, off); - if (sbappendaddr(&so->so_rcv, src, n, -opts) == 0) { + if (sbappendaddr(&so->so_rcv, src, n, opts) == 0) { m_freem(n); if (opts) m_freem(opts); @@ -513,7 +511,7 @@ udp4_sendup(struct mbuf *m, int off /* o #ifdef INET static int udp4_realinput(struct sockaddr_in *src, struct sockaddr_in *dst, - struct mbuf **mp, int off /* offset of udphdr */) +struct mbuf **mp, int off /* offset of udphdr */) { u_int16_t *sport, *dport; int rcvcnt; @@ -576,7 +574,7 @@ udp4_realinput(struct sockaddr_in *src, } udp4_sendup(m, off, (struct sockaddr *)src, -inp->inp_socket); + inp->inp_socket); rcvcnt++; /* @@ -609,21 +607,19 @@ udp4_realinput(struct sockaddr_in *src,
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Thu Feb 8 06:50:38 UTC 2018 Modified Files: src/sys/netinet: udp_usrreq.c Log Message: Fix three pretty bad mistakes in NAT-T: * If we got a keepalive packet, we need to call m_freem, not m_free. Here the next mbufs in the chain are not freed. Seems easy to remotely DoS the system by sending fragmented keepalives in a loop. * If !ipsec_used, free the mbuf. * In udp_input, we need to update 'uh', because udp4_realinput may have modified the chain. Perhaps we also need to re-enforce alignment, so add an XXX. To generate a diff of this commit: cvs rdiff -u -r1.236 -r1.237 src/sys/netinet/udp_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/udp_usrreq.c diff -u src/sys/netinet/udp_usrreq.c:1.236 src/sys/netinet/udp_usrreq.c:1.237 --- src/sys/netinet/udp_usrreq.c:1.236 Mon Dec 11 05:47:18 2017 +++ src/sys/netinet/udp_usrreq.c Thu Feb 8 06:50:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.236 2017/12/11 05:47:18 ryo Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.237 2018/02/08 06:50:38 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.236 2017/12/11 05:47:18 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.237 2018/02/08 06:50:38 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -405,7 +405,15 @@ udp_input(struct mbuf *m, ...) */ return; } + ip = mtod(m, struct ip *); + IP6_EXTHDR_GET(uh, struct udphdr *, m, iphlen, sizeof(struct udphdr)); + if (uh == NULL) { + UDP_STATINC(UDP_STAT_HDROPS); + return; + } + /* XXX Re-enforce alignment? */ + #ifdef INET6 if (IN_MULTICAST(ip->ip_dst.s_addr) || n == 0) { struct sockaddr_in6 src6, dst6; @@ -1279,7 +1287,7 @@ udp4_espinudp(struct mbuf **mp, int off, /* Ignore keepalive packets */ if ((len == 1) && (*(unsigned char *)data == 0xff)) { - m_free(m); + m_freem(m); *mp = NULL; /* avoid any further processiong by caller ... */ return 1; } @@ -1360,7 +1368,8 @@ udp4_espinudp(struct mbuf **mp, int off, if (ipsec_used) ipsec4_common_input(m, iphdrlen, IPPROTO_ESP); - /* XXX: else */ + else + m_freem(m); /* We handled it, it shouldn't be handled by UDP */ *mp = NULL; /* avoid free by caller ... */
CVS commit: src/distrib/sets
Module Name:src Committed By: christos Date: Thu Feb 8 03:27:51 UTC 2018 Modified Files: src/distrib/sets: mkvars.mk sets.subr src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi shl.mi src/distrib/sets/lists/misc: mi src/distrib/sets/lists/tests: mi Log Message: add openssl to the list of selectable variables for sets and fix the sets. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/mkvars.mk cvs rdiff -u -r1.182 -r1.183 src/distrib/sets/sets.subr cvs rdiff -u -r1.830 -r1.831 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2176 -r1.2177 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.240 -r1.241 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.191 -r1.192 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.205 -r1.206 src/distrib/sets/lists/misc/mi cvs rdiff -u -r1.772 -r1.773 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/mkvars.mk diff -u src/distrib/sets/mkvars.mk:1.33 src/distrib/sets/mkvars.mk:1.34 --- src/distrib/sets/mkvars.mk:1.33 Sun Oct 8 11:05:19 2017 +++ src/distrib/sets/mkvars.mk Wed Feb 7 22:27:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mkvars.mk,v 1.33 2017/10/08 15:05:19 christos Exp $ +# $NetBSD: mkvars.mk,v 1.34 2018/02/08 03:27:50 christos Exp $ MKEXTRAVARS= \ MACHINE \ @@ -9,6 +9,7 @@ MKEXTRAVARS= \ HAVE_XORG_SERVER_VER \ HAVE_BINUTILS \ HAVE_LIBGCC_EH \ + HAVE_OPENSSL \ HAVE_SSP \ OBJECT_FMT \ TOOLCHAIN_MISSING \ Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.182 src/distrib/sets/sets.subr:1.183 --- src/distrib/sets/sets.subr:1.182 Wed Jan 10 13:15:18 2018 +++ src/distrib/sets/sets.subr Wed Feb 7 22:27:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.182 2018/01/10 18:15:18 uwe Exp $ +# $NetBSD: sets.subr,v 1.183 2018/02/08 03:27:50 christos Exp $ # # @@ -20,6 +20,7 @@ # HAVE_GCC # HAVE_GDB # HAVE_SSP +# HAVE_OPENSSL # TOOLCHAIN_MISSING # OBJECT_FMT # as well as: @@ -179,7 +180,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.182 2018/01/10 18:15:18 uwe Exp $ +# # $NetBSD: sets.subr,v 1.183 2018/02/08 03:27:50 christos Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -212,6 +213,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g # binutils= = value of ${HAVE_BINUTILS} # gcc= = value of ${HAVE_GCC} # gdb= = value of ${HAVE_GDB} +# openssl= = value of ${HAVE_OPENSSL} # xorg_server_ver= = value of ${HAVE_XORG_SERVER_VER} # #2. The USE_: @@ -302,6 +304,9 @@ list_set_files() if ("gdb" in wanted) wanted["gdb=" "'"${HAVE_GDB}"'"] = 1 } + if ("openssl" in wanted) { +wanted["openssl=" "'"${HAVE_OPENSSL}"'"] = 1 + } if ("xorg_server_ver" in wanted) { wanted["xorg_server_ver=" "'"${HAVE_XORG_SERVER_VER}"'"] = 1 } Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.830 src/distrib/sets/lists/base/shl.mi:1.831 --- src/distrib/sets/lists/base/shl.mi:1.830 Tue Feb 6 04:41:55 2018 +++ src/distrib/sets/lists/base/shl.mi Wed Feb 7 22:27:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.830 2018/02/06 09:41:55 mrg Exp $ +# $NetBSD: shl.mi,v 1.831 2018/02/08 03:27:50 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -23,8 +23,10 @@ ./lib/libcrypt.so.1base-sys-shlib dynamicroot ./lib/libcrypt.so.1.0base-sys-shlib dynamicroot ./lib/libcrypto.sobase-crypto-shlib dynamicroot -./lib/libcrypto.so.12base-crypto-shlib dynamicroot -./lib/libcrypto.so.12.0base-crypto-shlib dynamicroot +./lib/libcrypto.so.12base-crypto-shlib dynamicroot,openssl=10 +./lib/libcrypto.so.12.0base-crypto-shlib dynamicroot,openssl=10 +./lib/libcrypto.so.13base-crypto-shlib dynamicroot,openssl=11 +./lib/libcrypto.so.13.0base-crypto-shlib dynamicroot,openssl=11 ./lib/libdevmapper.sobase-lvm-shlib dynamicroot,lvm ./lib/libdevmapper.so.1base-lvm-shlib dynamicroot,lvm ./lib/libdevmapper.so.1.0 base-lvm-shlib dynamicroot,lvm @@ -227,8 +229,10 @@ ./usr/lib/libcrypt.so.1base-sys-shlib compatfile ./usr/lib/libcrypt.so.1.0 base-sys-shlib compatfile ./usr/lib/libcrypto.sobase-crypto-shlib compatfile -./usr/lib/libcrypto.so.12 base-crypto-shlib compatfile -./usr/lib/libcrypto.so.12.0 base-crypto-shlib compatfile +./usr/lib/libcrypto.so.12 base-crypto-shlib compatfile,openssl=10 +./usr/lib/libcrypto.so.12.0 base-crypto-shlib compatfile,openssl=10 +./usr/lib/libcrypto.so.13 base-crypto-shlib compatfile,openssl=11 +./usr/lib/libcrypto.so.13.0 base-crypto-shlib compatfile,openssl=11 ./
CVS commit: src/share
Module Name:src Committed By: pgoyette Date: Thu Feb 8 03:18:38 UTC 2018 Modified Files: src/share/man/man7: ascii.7 src/share/misc: ascii Log Message: Revert previous changes due to popular demand. Instead, add a note at the bottom of each document to provide the original ASCII characters' names. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/share/man/man7/ascii.7 cvs rdiff -u -r1.3 -r1.4 src/share/misc/ascii Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/ascii.7 diff -u src/share/man/man7/ascii.7:1.11 src/share/man/man7/ascii.7:1.12 --- src/share/man/man7/ascii.7:1.11 Thu Feb 8 02:51:57 2018 +++ src/share/man/man7/ascii.7 Thu Feb 8 03:18:37 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ascii.7,v 1.11 2018/02/08 02:51:57 pgoyette Exp $ +.\" $NetBSD: ascii.7,v 1.12 2018/02/08 03:18:37 pgoyette Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ The set: .Bd -literal -offset left 000 nul 001 soh 002 stx 003 etx 004 eot 005 enq 006 ack 007 bel -010 bs 011 ht 012 lf 013 vt 014 ff 015 cr 016 so 017 si +010 bs 011 ht 012 nl 013 vt 014 np 015 cr 016 so 017 si 020 dle 021 dc1 022 dc2 023 dc3 024 dc4 025 nak 026 syn 027 etb 030 can 031 em 032 sub 033 esc 034 fs 035 gs 036 rs 037 us 040 sp 041 ! 042 " 043 # 044 $ 045 % 046 & 047 ' @@ -65,7 +65,7 @@ The set: .Bd -literal -offset left 00 nul 01 soh 02 stx 03 etx 04 eot 05 enq 06 ack 07 bel -08 bs09 ht0a lf0b vt0c ff0d cr0e so0f si +08 bs09 ht0a nl0b vt0c np0d cr0e so0f si 10 dle 11 dc1 12 dc2 13 dc3 14 dc4 15 nak 16 syn 17 etb 18 can 19 em1a sub 1b esc 1c fs1d gs1e rs1f us 20 sp21 !22 "23 #24 $25 %26 &27 ' @@ -87,7 +87,7 @@ The set: .Bd -literal -offset left 0 nul1 soh2 stx3 etx4 eot5 enq6 ack7 bel - 8 bs 9 ht10 lf11 vt12 ff13 cr14 so15 si + 8 bs 9 ht10 nl11 vt12 np13 cr14 so15 si 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb 24 can 25 em26 sub 27 esc 28 fs29 gs30 rs31 us 32 sp33 !34 "35 #36 $37 %38 &39 ' @@ -103,6 +103,16 @@ set: 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del .Ed +.Pp +Note that the +.Dv nl +and +.Dv np +characters in the original ASCII specification are +.Dv lf +and +.Dv ff +respectively. .Sh FILES .Bl -tag -width /usr/share/misc/ascii -compact .It Pa /usr/share/misc/ascii Index: src/share/misc/ascii diff -u src/share/misc/ascii:1.3 src/share/misc/ascii:1.4 --- src/share/misc/ascii:1.3 Thu Feb 8 02:51:57 2018 +++ src/share/misc/ascii Thu Feb 8 03:18:37 2018 @@ -48,3 +48,7 @@ |104 h |105 i |106 j |107 k |108 l |109 m |110 n |111 o | |112 p |113 q |114 r |115 s |116 t |117 u |118 v |119 w | |120 x |121 y |122 z |123 { |124 | |125 } |126 ~ |127 del| + +Note that the nl and np characters in the original ASCII specification +are lf and ff respectively. +
CVS commit: src/share
Module Name:src Committed By: pgoyette Date: Thu Feb 8 02:51:57 UTC 2018 Modified Files: src/share/man/man7: ascii.7 src/share/misc: ascii Log Message: While here, also update 014 - it's name is "ff" ("form feed"), and not "np" ("new page"). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/man/man7/ascii.7 cvs rdiff -u -r1.2 -r1.3 src/share/misc/ascii Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/ascii.7 diff -u src/share/man/man7/ascii.7:1.10 src/share/man/man7/ascii.7:1.11 --- src/share/man/man7/ascii.7:1.10 Thu Feb 8 02:30:08 2018 +++ src/share/man/man7/ascii.7 Thu Feb 8 02:51:57 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ascii.7,v 1.10 2018/02/08 02:30:08 pgoyette Exp $ +.\" $NetBSD: ascii.7,v 1.11 2018/02/08 02:51:57 pgoyette Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ The set: .Bd -literal -offset left 000 nul 001 soh 002 stx 003 etx 004 eot 005 enq 006 ack 007 bel -010 bs 011 ht 012 lf 013 vt 014 np 015 cr 016 so 017 si +010 bs 011 ht 012 lf 013 vt 014 ff 015 cr 016 so 017 si 020 dle 021 dc1 022 dc2 023 dc3 024 dc4 025 nak 026 syn 027 etb 030 can 031 em 032 sub 033 esc 034 fs 035 gs 036 rs 037 us 040 sp 041 ! 042 " 043 # 044 $ 045 % 046 & 047 ' @@ -65,7 +65,7 @@ The set: .Bd -literal -offset left 00 nul 01 soh 02 stx 03 etx 04 eot 05 enq 06 ack 07 bel -08 bs09 ht0a lf0b vt0c np0d cr0e so0f si +08 bs09 ht0a lf0b vt0c ff0d cr0e so0f si 10 dle 11 dc1 12 dc2 13 dc3 14 dc4 15 nak 16 syn 17 etb 18 can 19 em1a sub 1b esc 1c fs1d gs1e rs1f us 20 sp21 !22 "23 #24 $25 %26 &27 ' @@ -87,7 +87,7 @@ The set: .Bd -literal -offset left 0 nul1 soh2 stx3 etx4 eot5 enq6 ack7 bel - 8 bs 9 ht10 lf11 vt12 np13 cr14 so15 si + 8 bs 9 ht10 lf11 vt12 ff13 cr14 so15 si 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb 24 can 25 em26 sub 27 esc 28 fs29 gs30 rs31 us 32 sp33 !34 "35 #36 $37 %38 &39 ' Index: src/share/misc/ascii diff -u src/share/misc/ascii:1.2 src/share/misc/ascii:1.3 --- src/share/misc/ascii:1.2 Thu Feb 8 02:37:43 2018 +++ src/share/misc/ascii Thu Feb 8 02:51:57 2018 @@ -1,5 +1,5 @@ |000 nul|001 soh|002 stx|003 etx|004 eot|005 enq|006 ack|007 bel| -|010 bs |011 ht |012 lf |013 vt |014 np |015 cr |016 so |017 si | +|010 bs |011 ht |012 lf |013 vt |014 ff |015 cr |016 so |017 si | |020 dle|021 dc1|022 dc2|023 dc3|024 dc4|025 nak|026 syn|027 etb| |030 can|031 em |032 sub|033 esc|034 fs |035 gs |036 rs |037 us | |040 sp |041 ! |042 " |043 # |044 $ |045 % |046 & |047 ' | @@ -16,7 +16,7 @@ |170 x |171 y |172 z |173 { |174 | |175 } |176 ~ |177 del| | 00 nul| 01 soh| 02 stx| 03 etx| 04 eot| 05 enq| 06 ack| 07 bel| -| 08 bs | 09 ht | 0a lf | 0b vt | 0c np | 0d cr | 0e so | 0f si | +| 08 bs | 09 ht | 0a lf | 0b vt | 0c ff | 0d cr | 0e so | 0f si | | 10 dle| 11 dc1| 12 dc2| 13 dc3| 14 dc4| 15 nak| 16 syn| 17 etb| | 18 can| 19 em | 1a sub| 1b esc| 1c fs | 1d gs | 1e rs | 1f us | | 20 sp | 21 ! | 22 " | 23 # | 24 $ | 25 % | 26 & | 27 ' | @@ -33,7 +33,7 @@ | 78 x | 79 y | 7a z | 7b { | 7c | | 7d } | 7e ~ | 7f del| | 0 nul| 1 soh| 2 stx| 3 etx| 4 eot| 5 enq| 6 ack| 7 bel| -| 8 bs | 9 ht | 10 lf | 11 vt | 12 np | 13 cr | 14 so | 15 si | +| 8 bs | 9 ht | 10 lf | 11 vt | 12 ff | 13 cr | 14 so | 15 si | | 16 dle| 17 dc1| 18 dc2| 19 dc3| 20 dc4| 21 nak| 22 syn| 23 etb| | 24 can| 25 em | 26 sub| 27 esc| 28 fs | 29 gs | 30 rs | 31 us | | 32 sp | 33 ! | 34 " | 35 # | 36 $ | 37 % | 38 & | 39 ' |
CVS commit: src/share/misc
Module Name:src Committed By: pgoyette Date: Thu Feb 8 02:37:43 UTC 2018 Modified Files: src/share/misc: ascii Log Message: Since this is the ASCII charactger set, use the ASCII name for the 012 character - "lf" for "line feed", not "nl" for "new line". Follow-on from PR misc/52989 (from Eitab Adler) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/share/misc/ascii Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/ascii diff -u src/share/misc/ascii:1.1.1.1 src/share/misc/ascii:1.2 --- src/share/misc/ascii:1.1.1.1 Sun Mar 21 09:45:37 1993 +++ src/share/misc/ascii Thu Feb 8 02:37:43 2018 @@ -1,5 +1,5 @@ |000 nul|001 soh|002 stx|003 etx|004 eot|005 enq|006 ack|007 bel| -|010 bs |011 ht |012 nl |013 vt |014 np |015 cr |016 so |017 si | +|010 bs |011 ht |012 lf |013 vt |014 np |015 cr |016 so |017 si | |020 dle|021 dc1|022 dc2|023 dc3|024 dc4|025 nak|026 syn|027 etb| |030 can|031 em |032 sub|033 esc|034 fs |035 gs |036 rs |037 us | |040 sp |041 ! |042 " |043 # |044 $ |045 % |046 & |047 ' | @@ -16,7 +16,7 @@ |170 x |171 y |172 z |173 { |174 | |175 } |176 ~ |177 del| | 00 nul| 01 soh| 02 stx| 03 etx| 04 eot| 05 enq| 06 ack| 07 bel| -| 08 bs | 09 ht | 0a nl | 0b vt | 0c np | 0d cr | 0e so | 0f si | +| 08 bs | 09 ht | 0a lf | 0b vt | 0c np | 0d cr | 0e so | 0f si | | 10 dle| 11 dc1| 12 dc2| 13 dc3| 14 dc4| 15 nak| 16 syn| 17 etb| | 18 can| 19 em | 1a sub| 1b esc| 1c fs | 1d gs | 1e rs | 1f us | | 20 sp | 21 ! | 22 " | 23 # | 24 $ | 25 % | 26 & | 27 ' | @@ -33,7 +33,7 @@ | 78 x | 79 y | 7a z | 7b { | 7c | | 7d } | 7e ~ | 7f del| | 0 nul| 1 soh| 2 stx| 3 etx| 4 eot| 5 enq| 6 ack| 7 bel| -| 8 bs | 9 ht | 10 nl | 11 vt | 12 np | 13 cr | 14 so | 15 si | +| 8 bs | 9 ht | 10 lf | 11 vt | 12 np | 13 cr | 14 so | 15 si | | 16 dle| 17 dc1| 18 dc2| 19 dc3| 20 dc4| 21 nak| 22 syn| 23 etb| | 24 can| 25 em | 26 sub| 27 esc| 28 fs | 29 gs | 30 rs | 31 us | | 32 sp | 33 ! | 34 " | 35 # | 36 $ | 37 % | 38 & | 39 ' |
CVS commit: src/share/man/man7
Module Name:src Committed By: pgoyette Date: Thu Feb 8 02:30:08 UTC 2018 Modified Files: src/share/man/man7: ascii.7 Log Message: Bump date for previous To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/share/man/man7/ascii.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/ascii.7 diff -u src/share/man/man7/ascii.7:1.9 src/share/man/man7/ascii.7:1.10 --- src/share/man/man7/ascii.7:1.9 Thu Feb 8 02:29:37 2018 +++ src/share/man/man7/ascii.7 Thu Feb 8 02:30:08 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ascii.7,v 1.9 2018/02/08 02:29:37 pgoyette Exp $ +.\" $NetBSD: ascii.7,v 1.10 2018/02/08 02:30:08 pgoyette Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)ascii.7 8.1 (Berkeley) 6/5/93 .\" -.Dd June 5, 1993 +.Dd February 8, 2017 .Dt ASCII 7 .Os .Sh NAME
CVS commit: src/share/man/man7
Module Name:src Committed By: pgoyette Date: Thu Feb 8 02:29:37 UTC 2018 Modified Files: src/share/man/man7: ascii.7 Log Message: Since this is describing the ASCII character set, use the correct ASCII abbreviation for character 012. All references I can find which seem to be even remotely authoritative and/or definitive use "lf" (for "line feed") rather than "nl" (for "new line"). See https://www.ascii-code.com and https://en.wikipedia.org/wiki/ASCII >From Eitan Adler in PR misc/52989 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man7/ascii.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/ascii.7 diff -u src/share/man/man7/ascii.7:1.8 src/share/man/man7/ascii.7:1.9 --- src/share/man/man7/ascii.7:1.8 Mon Jul 3 21:30:59 2017 +++ src/share/man/man7/ascii.7 Thu Feb 8 02:29:37 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ascii.7,v 1.8 2017/07/03 21:30:59 wiz Exp $ +.\" $NetBSD: ascii.7,v 1.9 2018/02/08 02:29:37 pgoyette Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ The set: .Bd -literal -offset left 000 nul 001 soh 002 stx 003 etx 004 eot 005 enq 006 ack 007 bel -010 bs 011 ht 012 nl 013 vt 014 np 015 cr 016 so 017 si +010 bs 011 ht 012 lf 013 vt 014 np 015 cr 016 so 017 si 020 dle 021 dc1 022 dc2 023 dc3 024 dc4 025 nak 026 syn 027 etb 030 can 031 em 032 sub 033 esc 034 fs 035 gs 036 rs 037 us 040 sp 041 ! 042 " 043 # 044 $ 045 % 046 & 047 ' @@ -65,7 +65,7 @@ The set: .Bd -literal -offset left 00 nul 01 soh 02 stx 03 etx 04 eot 05 enq 06 ack 07 bel -08 bs09 ht0a nl0b vt0c np0d cr0e so0f si +08 bs09 ht0a lf0b vt0c np0d cr0e so0f si 10 dle 11 dc1 12 dc2 13 dc3 14 dc4 15 nak 16 syn 17 etb 18 can 19 em1a sub 1b esc 1c fs1d gs1e rs1f us 20 sp21 !22 "23 #24 $25 %26 &27 ' @@ -87,7 +87,7 @@ The set: .Bd -literal -offset left 0 nul1 soh2 stx3 etx4 eot5 enq6 ack7 bel - 8 bs 9 ht10 nl11 vt12 np13 cr14 so15 si + 8 bs 9 ht10 lf11 vt12 np13 cr14 so15 si 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb 24 can 25 em26 sub 27 esc 28 fs29 gs30 rs31 us 32 sp33 !34 "35 #36 $37 %38 &39 '
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Thu Feb 8 00:10:26 UTC 2018 Removed Files: src/sys/arch/arm/rockchip: files.rockchip obio.c obio_com.c rockchip_board.c rockchip_cpufreq.c rockchip_crureg.h rockchip_dma.c rockchip_dwcmmc.c rockchip_dwctmr.c rockchip_dwctwo.c rockchip_emac.c rockchip_emacreg.h rockchip_i2c.c rockchip_i2creg.h rockchip_intr.h rockchip_reg.h rockchip_timer.c rockchip_timerreg.h rockchip_var.h src/sys/arch/evbarm/conf: ROCKCHIP files.rockchip mk.rockchip std.rockchip src/sys/arch/evbarm/rockchip: genassym.cf platform.h rockchip_machdep.c rockchip_start.S Log Message: Move Rockchip port to the attic. It is not very useful. To generate a diff of this commit: cvs rdiff -u -r1.11 -r0 src/sys/arch/arm/rockchip/files.rockchip cvs rdiff -u -r1.19 -r0 src/sys/arch/arm/rockchip/obio.c cvs rdiff -u -r1.3 -r0 src/sys/arch/arm/rockchip/obio_com.c \ src/sys/arch/arm/rockchip/rockchip_cpufreq.c cvs rdiff -u -r1.14 -r0 src/sys/arch/arm/rockchip/rockchip_board.c cvs rdiff -u -r1.8 -r0 src/sys/arch/arm/rockchip/rockchip_crureg.h cvs rdiff -u -r1.1 -r0 src/sys/arch/arm/rockchip/rockchip_dma.c \ src/sys/arch/arm/rockchip/rockchip_dwctmr.c \ src/sys/arch/arm/rockchip/rockchip_emacreg.h \ src/sys/arch/arm/rockchip/rockchip_intr.h \ src/sys/arch/arm/rockchip/rockchip_timerreg.h cvs rdiff -u -r1.6 -r0 src/sys/arch/arm/rockchip/rockchip_dwcmmc.c \ src/sys/arch/arm/rockchip/rockchip_dwctwo.c cvs rdiff -u -r1.17 -r0 src/sys/arch/arm/rockchip/rockchip_emac.c cvs rdiff -u -r1.7 -r0 src/sys/arch/arm/rockchip/rockchip_i2c.c cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/rockchip/rockchip_i2creg.h \ src/sys/arch/arm/rockchip/rockchip_timer.c cvs rdiff -u -r1.5 -r0 src/sys/arch/arm/rockchip/rockchip_reg.h cvs rdiff -u -r1.13 -r0 src/sys/arch/arm/rockchip/rockchip_var.h cvs rdiff -u -r1.21 -r0 src/sys/arch/evbarm/conf/ROCKCHIP cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/conf/files.rockchip cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/mk.rockchip cvs rdiff -u -r1.3 -r0 src/sys/arch/evbarm/conf/std.rockchip cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/rockchip/genassym.cf \ src/sys/arch/evbarm/rockchip/platform.h cvs rdiff -u -r1.23 -r0 src/sys/arch/evbarm/rockchip/rockchip_machdep.c cvs rdiff -u -r1.4 -r0 src/sys/arch/evbarm/rockchip/rockchip_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libradius
Module Name:src Committed By: christos Date: Wed Feb 7 22:51:31 UTC 2018 Modified Files: src/lib/libradius: Makefile Log Message: Oops forgot one openssl version name change To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libradius/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libradius/Makefile diff -u src/lib/libradius/Makefile:1.14 src/lib/libradius/Makefile:1.15 --- src/lib/libradius/Makefile:1.14 Mon Feb 5 06:58:13 2018 +++ src/lib/libradius/Makefile Wed Feb 7 17:51:31 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2018/02/05 11:58:13 christos Exp $ +# $NetBSD: Makefile,v 1.15 2018/02/07 22:51:31 christos Exp $ USE_FORT?= yes # network protocol library @@ -10,7 +10,7 @@ LINTFLAGS+= -Sw LIB= radius CPPFLAGS+= -I. -CPPFLAGS+= -DOPENSSL_VERSION_NUMBER=0x1010L +CPPFLAGS+= -DOPENSSL_API_COMPAT=0x1010L CPPFLAGS+= -DWITH_SSL LIBDPLIBS+=crypto ${.CURDIR}/../../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maya Date: Wed Feb 7 22:49:32 UTC 2018 Modified Files: src/sys/arch/x86/x86: identcpu.c Log Message: stopgap fix: restrict XSAVEOPT to Intel CPUs The current code causes floating point miscalculations on AMD Ryzen. PR port-amd64/52966: amd64 FPU handling broken on AMD To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/x86/x86/identcpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.67 src/sys/arch/x86/x86/identcpu.c:1.68 --- src/sys/arch/x86/x86/identcpu.c:1.67 Sat Nov 11 11:00:46 2017 +++ src/sys/arch/x86/x86/identcpu.c Wed Feb 7 22:49:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.67 2017/11/11 11:00:46 maxv Exp $ */ +/* $NetBSD: identcpu.c,v 1.68 2018/02/07 22:49:32 maya Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.67 2017/11/11 11:00:46 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.68 2018/02/07 22:49:32 maya Exp $"); #include "opt_xen.h" @@ -761,7 +761,8 @@ cpu_probe_fpu(struct cpu_info *ci) /* xsaveopt ought to be faster than xsave */ x86_cpuid2(0xd, 1, descs); - if (descs[0] & CPUID_PES1_XSAVEOPT) + if ((descs[0] & CPUID_PES1_XSAVEOPT) && + (cpu_vendor == CPUVENDOR_INTEL)) /* XXX PR 52966 */ x86_fpu_save = FPU_SAVE_XSAVEOPT; /* Get features and maximum size of the save area */
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Wed Feb 7 20:42:17 UTC 2018 Modified Files: src/sys/arch/arm/cortex: gic.c Log Message: PR# port-evbarm/49468: Cortex GIC assertion triggered on Allwinner A80 SoC The priority level is changed by writing to GICC_PMR with interrupts disabled. However, interrupts are enabled/disabled downstream of the GICC at the CPU. When raising priority level, there is a window between the time that interrupts are disabled and the GICC_PMR register is written. If an interrupt occurs at a previously allowed priority before GICC_PMR is changed, the CPU will receive the signal when interrupts are re-enabled. At this time, GICC_PMR is now the new priority level, so reads of GICC_IAR will report a spurious IRQ. Move the "old_ipl != IPL_HIGH" test until after we have confirmed that there is at least one pending IRQ. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/cortex/gic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/cortex/gic.c diff -u src/sys/arch/arm/cortex/gic.c:1.31 src/sys/arch/arm/cortex/gic.c:1.32 --- src/sys/arch/arm/cortex/gic.c:1.31 Fri Jul 14 06:33:26 2017 +++ src/sys/arch/arm/cortex/gic.c Wed Feb 7 20:42:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gic.c,v 1.31 2017/07/14 06:33:26 skrll Exp $ */ +/* $NetBSD: gic.c,v 1.32 2018/02/07 20:42:17 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.31 2017/07/14 06:33:26 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.32 2018/02/07 20:42:17 jmcneill Exp $"); #include #include @@ -259,9 +259,6 @@ armgic_irq_handler(void *tf) ci->ci_data.cpu_nintr++; - KASSERTMSG(old_ipl != IPL_HIGH, "old_ipl %d pmr %#x hppir %#x", - old_ipl, gicc_read(sc, GICC_PMR), gicc_read(sc, GICC_HPPIR)); - for (;;) { uint32_t iar = gicc_read(sc, GICC_IAR); uint32_t irq = __SHIFTOUT(iar, GICC_IAR_IRQ); @@ -277,6 +274,9 @@ armgic_irq_handler(void *tf) } } + KASSERTMSG(old_ipl != IPL_HIGH, "old_ipl %d pmr %#x hppir %#x", + old_ipl, gicc_read(sc, GICC_PMR), gicc_read(sc, GICC_HPPIR)); + //const uint32_t cpuid = __SHIFTOUT(iar, GICC_IAR_CPUID_MASK); struct intrsource * const is = sc->sc_pic.pic_sources[irq]; KASSERT(is != &armgic_dummy_source); @@ -318,7 +318,6 @@ armgic_irq_handler(void *tf) /* * Now handle any pending ints. */ - KASSERT(old_ipl != IPL_HIGH); pic_do_pending_ints(I32_bit, old_ipl, tf); KASSERTMSG(ci->ci_cpl == old_ipl, "ci_cpl %d old_ipl %d", ci->ci_cpl, old_ipl); KASSERT(old_mtx_count == ci->ci_mtx_count);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: prlw1 Date: Wed Feb 7 15:55:58 UTC 2018 Modified Files: src/sys/dev/usb: xhci.c Log Message: xhci.c: avoid unused variable in non-DIAGNOSTIC build To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.85 src/sys/dev/usb/xhci.c:1.86 --- src/sys/dev/usb/xhci.c:1.85 Thu Feb 1 09:55:37 2018 +++ src/sys/dev/usb/xhci.c Wed Feb 7 15:55:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.85 2018/02/01 09:55:37 msaitoh Exp $ */ +/* $NetBSD: xhci.c,v 1.86 2018/02/07 15:55:58 prlw1 Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.85 2018/02/01 09:55:37 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.86 2018/02/07 15:55:58 prlw1 Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -3658,7 +3658,7 @@ xhci_root_intr_start(struct usbd_xfer *x static void xhci_root_intr_abort(struct usbd_xfer *xfer) { - struct xhci_softc * const sc = XHCI_XFER2SC(xfer); + struct xhci_softc * const sc __diagused = XHCI_XFER2SC(xfer); XHCIHIST_FUNC(); XHCIHIST_CALLED();
CVS commit: src/sys/kern
Module Name:src Committed By: manu Date: Wed Feb 7 15:51:35 UTC 2018 Modified Files: src/sys/kern: subr_tftproot.c Log Message: Fix md(4) double attachment in TFTPROOT option The mdattach() call in tftproot_dhcpboot() has probably always been useless, but it seems it became harmful, as it causes 7.1.1 to deadlock during boot. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/kern/subr_tftproot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_tftproot.c diff -u src/sys/kern/subr_tftproot.c:1.19 src/sys/kern/subr_tftproot.c:1.20 --- src/sys/kern/subr_tftproot.c:1.19 Mon Oct 31 15:27:24 2016 +++ src/sys/kern/subr_tftproot.c Wed Feb 7 15:51:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_tftproot.c,v 1.19 2016/10/31 15:27:24 maxv Exp $ */ +/* $NetBSD: subr_tftproot.c,v 1.20 2018/02/07 15:51:35 manu Exp $ */ /*- * Copyright (c) 2007 Emmanuel Dreyfus, all rights reserved. @@ -39,7 +39,7 @@ #include "opt_md.h" #include -__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.19 2016/10/31 15:27:24 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.20 2018/02/07 15:51:35 manu Exp $"); #include #include @@ -65,8 +65,6 @@ __KERNEL_RCSID(0, "$NetBSD: subr_tftproo #include #include -extern void mdattach(int); - /* * Copied from */ @@ -333,7 +331,6 @@ tftproot_getfile(struct tftproot_handle DPRINTF(("%s():%d RAMdisk loaded: %ld@%p\n", __func__, __LINE__, trh->trh_len, trh->trh_base)); md_root_setconf(trh->trh_base, trh->trh_len); - mdattach(0); error = 0; out:
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: bouyer Date: Wed Feb 7 14:42:07 UTC 2018 Modified Files: src/sys/dev/sdmmc: sdmmc_mem.c Log Message: Fix uninitialized variable use: if there is an error, or if we are using a SPI controller, sdmmc_mem_send_op_cond() doens't assign a value to *ocrp, but it is used unconditionally in sdmmc_mem_enable() to see if we can switch to low voltage. In sdmmc_mem_send_op_cond(), if the new ocr is not returned by the card for whatever reason, set *ocrp to the orig value. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/dev/sdmmc/sdmmc_mem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.63 src/sys/dev/sdmmc/sdmmc_mem.c:1.64 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.63 Tue Sep 12 13:43:37 2017 +++ src/sys/dev/sdmmc/sdmmc_mem.c Wed Feb 7 14:42:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.63 2017/09/12 13:43:37 jmcneill Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.64 2018/02/07 14:42:07 bouyer Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -45,7 +45,7 @@ /* Routines for SD/MMC memory cards. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.63 2017/09/12 13:43:37 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.64 2018/02/07 14:42:07 bouyer Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -644,10 +644,14 @@ sdmmc_mem_send_op_cond(struct sdmmc_soft error = ETIMEDOUT; sdmmc_delay(1); } - if (error == 0 && - ocrp != NULL && - !ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE)) - *ocrp = MMC_R3(cmd.c_resp); + if (ocrp != NULL) { + if (error == 0 && + !ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE)) { + *ocrp = MMC_R3(cmd.c_resp); + } else { + *ocrp = ocr; + } + } DPRINTF(("%s: sdmmc_mem_send_op_cond: error=%d, ocr=%#x\n", SDMMCDEVNAME(sc), error, MMC_R3(cmd.c_resp))); return error;
CVS commit: src/lib/libkvm
Module Name:src Committed By: maxv Date: Wed Feb 7 14:03:18 UTC 2018 Modified Files: src/lib/libkvm: kvm.c Log Message: Keep /dev/ksyms open in _kvm_open(). This way /dev/ksyms can be put into $g_kmem without breaking the tools that need kmem+ksyms. Discussed on tech-kern@ three weeks ago. The original issue was reported by maya@, the patch was written by Tom Ivar Helbekkmo, ok christos@. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/lib/libkvm/kvm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libkvm/kvm.c diff -u src/lib/libkvm/kvm.c:1.102 src/lib/libkvm/kvm.c:1.103 --- src/lib/libkvm/kvm.c:1.102 Tue Mar 29 06:51:40 2016 +++ src/lib/libkvm/kvm.c Wed Feb 7 14:03:18 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kvm.c,v 1.102 2016/03/29 06:51:40 mrg Exp $ */ +/* $NetBSD: kvm.c,v 1.103 2018/02/07 14:03:18 maxv Exp $ */ /*- * Copyright (c) 1989, 1992, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)kvm.c 8.2 (Berkeley) 2/13/94"; #else -__RCSID("$NetBSD: kvm.c,v 1.102 2016/03/29 06:51:40 mrg Exp $"); +__RCSID("$NetBSD: kvm.c,v 1.103 2018/02/07 14:03:18 maxv Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -322,15 +322,6 @@ _kvm_open(kvm_t *kd, const char *uf, con strlcpy(kd->kernelname, uf, sizeof(kd->kernelname)); } else { strlcpy(kd->kernelname, _PATH_KSYMS, sizeof(kd->kernelname)); - /* - * We're here because /dev/ksyms was opened - * successfully. However, we don't want to keep it - * open, so we close it now. Later, we will open - * it again, since it will be the only case where - * kd->nlfd is negative. - */ - close(kd->nlfd); - kd->nlfd = -1; } if ((kd->pmfd = open(mf, flag | O_CLOEXEC, 0)) < 0) { @@ -769,33 +760,16 @@ kvm_close(kvm_t *kd) int kvm_nlist(kvm_t *kd, struct nlist *nl) { - int rv, nlfd; - - /* - * kd->nlfd might be negative when we get here, and in that - * case that means that we're using /dev/ksyms. - * So open it again, just for the time we retrieve the list. - */ - if (kd->nlfd < 0) { - nlfd = open(_PATH_KSYMS, O_RDONLY | O_CLOEXEC, 0); - if (nlfd < 0) { - _kvm_err(kd, 0, "failed to open %s", _PATH_KSYMS); - return (nlfd); - } - } else - nlfd = kd->nlfd; + int rv; /* * Call the nlist(3) routines to retrieve the given namelist. */ - rv = __fdnlist(nlfd, nl); + rv = __fdnlist(kd->nlfd, nl); if (rv == -1) _kvm_err(kd, 0, "bad namelist"); - if (kd->nlfd < 0) - close(nlfd); - return (rv); }
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Wed Feb 7 13:22:42 UTC 2018 Modified Files: src/sys/netinet: ip_mroute.c Log Message: Style and constify. To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/sys/netinet/ip_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/ip_mroute.c diff -u src/sys/netinet/ip_mroute.c:1.152 src/sys/netinet/ip_mroute.c:1.153 --- src/sys/netinet/ip_mroute.c:1.152 Wed Feb 7 12:15:32 2018 +++ src/sys/netinet/ip_mroute.c Wed Feb 7 13:22:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_mroute.c,v 1.152 2018/02/07 12:15:32 maxv Exp $ */ +/* $NetBSD: ip_mroute.c,v 1.153 2018/02/07 13:22:41 maxv Exp $ */ /* * Copyright (c) 1992, 1993 @@ -93,7 +93,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.152 2018/02/07 12:15:32 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.153 2018/02/07 13:22:41 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -254,7 +254,7 @@ static struct mbuf *pim_register_prepare #define ENCAP_PROTO IPPROTO_IPIP /* prototype IP hdr for encapsulated packets */ -struct ip multicast_encap_iphdr = { +static const struct ip multicast_encap_iphdr = { .ip_hl = sizeof(struct ip) >> 2, .ip_v = IPVERSION, .ip_len = sizeof(struct ip), @@ -777,7 +777,7 @@ add_vif(struct vifctl *vifcp) * local interface (e.g. it could be 127.0.0.2), we don't * check its address. */ - ifp = NULL; + ifp = NULL; } else #endif { @@ -1137,8 +1137,7 @@ add_mfc(struct sockopt *sopt) } } if (rt == NULL) { /* no upcall, so make a new entry */ - rt = (struct mfc *)malloc(sizeof(*rt), M_MRTABLE, - M_NOWAIT); + rt = malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT); if (rt == NULL) { splx(s); return ENOBUFS; @@ -1294,8 +1293,7 @@ ip_mforward(struct mbuf *m, struct ifnet log(LOG_ERR, "ip_mforward: received source-routed packet from %x\n", ntohl(ip->ip_src.s_addr)); - - return 1; + return EOPNOTSUPP; } /* @@ -1323,19 +1321,18 @@ ip_mforward(struct mbuf *m, struct ifnet return ip_mdq(m, ifp, rt); } else { /* - * If we don't have a route for packet's origin, - * Make a copy of the packet & send message to routing daemon + * If we don't have a route for packet's origin, make a copy + * of the packet and send message to routing daemon. */ struct mbuf *mb0; struct rtdetq *rte; u_int32_t hash; - int hlen = ip->ip_hl << 2; + const int hlen = ip->ip_hl << 2; #ifdef UPCALL_TIMING struct timeval tp; - microtime(&tp); -#endif /* UPCALL_TIMING */ +#endif ++mrtstat.mrts_mfc_misses; @@ -1350,8 +1347,7 @@ ip_mforward(struct mbuf *m, struct ifnet * just going to fail anyway. Make sure to pullup the header so * that other people can't step on it. */ - rte = (struct rtdetq *)malloc(sizeof(*rte), M_MRTABLE, - M_NOWAIT); + rte = malloc(sizeof(*rte), M_MRTABLE, M_NOWAIT); if (rte == NULL) { splx(s); return ENOBUFS; @@ -1389,8 +1385,7 @@ ip_mforward(struct mbuf *m, struct ifnet goto non_fatal; /* no upcall, so make a new entry */ - rt = (struct mfc *)malloc(sizeof(*rt), M_MRTABLE, - M_NOWAIT); + rt = malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT); if (rt == NULL) goto fail; @@ -1481,7 +1476,7 @@ ip_mforward(struct mbuf *m, struct ifnet rte->ifp = ifp; #ifdef UPCALL_TIMING rte->t = tp; -#endif /* UPCALL_TIMING */ +#endif splx(s); @@ -1489,7 +1484,6 @@ ip_mforward(struct mbuf *m, struct ifnet } } - /*ARGSUSED*/ static void expire_upcalls(void *v) @@ -1542,28 +1536,26 @@ expire_upcalls(void *v) } /* + * Macro to send packet on vif. + */ +#define MC_SEND(ip, vifp, m) do { \ + if ((vifp)->v_flags & VIFF_TUNNEL)\ + encap_send((ip), (vifp), (m));\ + else\ + phyint_send((ip), (vifp), (m));\ +} while (/*CONSTCOND*/ 0) + +/* * Packet forwarding routine once entry in the cache is made */ static int ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt) { - struct ip *ip = mtod(m, struct ip *); + struct ip *ip = mtod(m, struct ip *); vifi_t vifi; struct vif *vifp; struct sockaddr_in sin; - int plen = ntohs(ip->ip_len) - (ip->ip_hl << 2); - -/* - * Macro to send packet on vif. Since RSVP packets don't get counted on - * input, they shouldn't get counted on output, so statistics keeping is - * separate. - */ -#define MC_SEND(ip, vifp, m) do { \ - if ((vifp)->v_flags & VIFF_TUNNEL)\ - encap_send((ip), (vifp), (m));\ - else\ - phyint_send((ip), (vifp), (m));\ -} while (/*CONSTCOND*/ 0) + const int plen = ntohs(ip->ip_len) - (ip->ip_hl << 2); /* * Don't forward if it didn't arrive from the parent vif for its origin. @@ -1577,6 +1569,7 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp vifi >= numvifs ? 0 : viftable[vifi].v_ifp); ++mrtstat.mrts_wrong_if; ++rt->mfc
CVS commit: src/tests/lib/libc/hash
Module Name:src Committed By: christos Date: Wed Feb 7 13:18:33 UTC 2018 Modified Files: src/tests/lib/libc/hash: t_hmac.c Log Message: md2 has been deprecated in OpenSSL-1.1 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/hash/t_hmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/hash/t_hmac.c diff -u src/tests/lib/libc/hash/t_hmac.c:1.1 src/tests/lib/libc/hash/t_hmac.c:1.2 --- src/tests/lib/libc/hash/t_hmac.c:1.1 Sat Jul 2 10:52:09 2016 +++ src/tests/lib/libc/hash/t_hmac.c Wed Feb 7 08:18:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: t_hmac.c,v 1.1 2016/07/02 14:52:09 christos Exp $ */ +/* $NetBSD: t_hmac.c,v 1.2 2018/02/07 13:18:33 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_hmac.c,v 1.1 2016/07/02 14:52:09 christos Exp $"); +__RCSID("$NetBSD: t_hmac.c,v 1.2 2018/02/07 13:18:33 christos Exp $"); #include #include @@ -49,7 +49,9 @@ test(void) int stop; void *e1; const void *evps[] = { +#if OPENSSL_VERSION_NUMBER < 0x1010L EVP_md2(), +#endif EVP_md4(), EVP_md5(), EVP_ripemd160(), @@ -60,7 +62,9 @@ test(void) EVP_sha512(), }; const char *names[] = { +#if OPENSSL_VERSION_NUMBER < 0x1010L "md2", +#endif "md4", "md5", "rmd160",
CVS commit: src/usr.sbin/racoon
Module Name:src Committed By: christos Date: Wed Feb 7 13:16:50 UTC 2018 Modified Files: src/usr.sbin/racoon: Makefile Log Message: needs the OpenSSL-1.1 api to build To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/racoon/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/racoon/Makefile diff -u src/usr.sbin/racoon/Makefile:1.30 src/usr.sbin/racoon/Makefile:1.31 --- src/usr.sbin/racoon/Makefile:1.30 Sun May 21 10:20:45 2017 +++ src/usr.sbin/racoon/Makefile Wed Feb 7 08:16:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2017/05/21 14:20:45 riastradh Exp $ +# $NetBSD: Makefile,v 1.31 2018/02/07 13:16:50 christos Exp $ WARNS?= 0 # XXX third-party program, many issues NOCLANGERROR= # defined @@ -30,6 +30,7 @@ CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libipse CPPFLAGS+= -DIPSEC_DEBUG -DHAVE_CONFIG_H -DENABLE_WILDCARD_MATCH CPPFLAGS+= -DADMINPORTDIR=\"/var/run\" CPPFLAGS+= -DSYSCONFDIR=\"/etc/racoon\" +CPPFLAGS+= -DOPENSSL_API_COMPAT=0x1010L LDADD+= -ll -ly -lipsec -lutil DPADD+= ${LIBL} ${LIBY} ${LIBCRYPTO} ${LIBUTIL}
CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/dh
Module Name:src Committed By: christos Date: Wed Feb 7 13:16:25 UTC 2018 Modified Files: src/crypto/external/bsd/openssl.old/dist/crypto/dh: dh.h Log Message: add set0_key needed by racoon To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h diff -u src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.7 src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.8 --- src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h:1.7 Tue Feb 6 14:58:30 2018 +++ src/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h Wed Feb 7 08:16:25 2018 @@ -397,6 +397,20 @@ DH_get0_key(const DH *dh, const BIGNUM * *priv_key = dh->priv_key; } +static inline int +DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) +{ + if (pub_key) { + BN_free(dh->pub_key); + dh->pub_key = pub_key; + } + if (priv_key) { + BN_free(dh->priv_key); + dh->priv_key = priv_key; + } + return 1; +} + static inline void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Wed Feb 7 12:15:32 UTC 2018 Modified Files: src/sys/netinet: ip_mroute.c Log Message: More style. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/sys/netinet/ip_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/ip_mroute.c diff -u src/sys/netinet/ip_mroute.c:1.151 src/sys/netinet/ip_mroute.c:1.152 --- src/sys/netinet/ip_mroute.c:1.151 Wed Feb 7 12:09:55 2018 +++ src/sys/netinet/ip_mroute.c Wed Feb 7 12:15:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_mroute.c,v 1.151 2018/02/07 12:09:55 maxv Exp $ */ +/* $NetBSD: ip_mroute.c,v 1.152 2018/02/07 12:15:32 maxv Exp $ */ /* * Copyright (c) 1992, 1993 @@ -93,7 +93,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.151 2018/02/07 12:09:55 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.152 2018/02/07 12:15:32 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2428,49 +2428,51 @@ bw_meter_prepare_upcall(struct bw_meter static void bw_upcalls_send(void) { -struct mbuf *m; -int len = bw_upcalls_n * sizeof(bw_upcalls[0]); -struct sockaddr_in k_igmpsrc = { - .sin_len = sizeof(k_igmpsrc), - .sin_family = AF_INET, -}; -static struct igmpmsg igmpmsg = { 0, /* unused1 */ - 0, /* unused2 */ - IGMPMSG_BW_UPCALL,/* im_msgtype */ - 0, /* im_mbz */ - 0, /* im_vif */ - 0, /* unused3 */ - { 0 }, /* im_src */ - { 0 } }; /* im_dst */ + struct mbuf *m; + int len = bw_upcalls_n * sizeof(bw_upcalls[0]); + struct sockaddr_in k_igmpsrc = { + .sin_len = sizeof(k_igmpsrc), + .sin_family = AF_INET, + }; + static struct igmpmsg igmpmsg = { + 0, /* unused1 */ + 0, /* unused2 */ + IGMPMSG_BW_UPCALL,/* im_msgtype */ + 0, /* im_mbz */ + 0, /* im_vif */ + 0, /* unused3 */ + { 0 }, /* im_src */ + { 0 } /* im_dst */ + }; -if (bw_upcalls_n == 0) - return; /* No pending upcalls */ + if (bw_upcalls_n == 0) + return; /* No pending upcalls */ -bw_upcalls_n = 0; + bw_upcalls_n = 0; -/* - * Allocate a new mbuf, initialize it with the header and - * the payload for the pending calls. - */ -MGETHDR(m, M_DONTWAIT, MT_HEADER); -if (m == NULL) { - log(LOG_WARNING, "bw_upcalls_send: cannot allocate mbuf\n"); - return; -} + /* + * Allocate a new mbuf, initialize it with the header and + * the payload for the pending calls. + */ + MGETHDR(m, M_DONTWAIT, MT_HEADER); + if (m == NULL) { + log(LOG_WARNING, "bw_upcalls_send: cannot allocate mbuf\n"); + return; + } -m->m_len = m->m_pkthdr.len = 0; -m_copyback(m, 0, sizeof(struct igmpmsg), (void *)&igmpmsg); -m_copyback(m, sizeof(struct igmpmsg), len, (void *)&bw_upcalls[0]); + m->m_len = m->m_pkthdr.len = 0; + m_copyback(m, 0, sizeof(struct igmpmsg), (void *)&igmpmsg); + m_copyback(m, sizeof(struct igmpmsg), len, (void *)&bw_upcalls[0]); -/* - * Send the upcalls - * XXX do we need to set the address in k_igmpsrc ? - */ -mrtstat.mrts_upcalls++; -if (socket_send(ip_mrouter, m, &k_igmpsrc) < 0) { - log(LOG_WARNING, "bw_upcalls_send: ip_mrouter socket queue full\n"); - ++mrtstat.mrts_upq_sockfull; -} + /* + * Send the upcalls + * XXX do we need to set the address in k_igmpsrc ? + */ + mrtstat.mrts_upcalls++; + if (socket_send(ip_mrouter, m, &k_igmpsrc) < 0) { + log(LOG_WARNING, "bw_upcalls_send: ip_mrouter socket queue full\n"); + ++mrtstat.mrts_upq_sockfull; + } } /* @@ -2479,11 +2481,10 @@ bw_upcalls_send(void) #define BW_METER_TIMEHASH(bw_meter, hash)\ do {\ struct timeval next_timeval = (bw_meter)->bm_start_time; \ - \ - BW_TIMEVALADD(&next_timeval, &(bw_meter)->bm_threshold.b_time); \ + BW_TIMEVALADD(&next_timeval, &(bw_meter)->bm_threshold.b_time); \ (hash) = next_timeval.tv_sec; \ if (next_timeval.tv_usec) \ - (hash)++; /* XXX: make sure we don't timeout early */ \ + (hash)++; /* XXX: make sure we don't timeout early */ \ (hash) %= BW_METER_BUCKETS; \ } while (/*CONSTCOND*/ 0) @@ -2494,26 +2495,26 @@ bw_upcalls_send(void) static void schedule_bw_meter(struct bw_meter *x, struct timeval *nowp) { -int time_hash; + int time_hash; -if (!(x->bm_flags & BW_METER_LEQ)) - return; /* XXX: we schedule timers only for "<=" entries */ + if (!(x->bm_flags & BW_METER_LEQ)) + return; /* XXX: we schedule timers only for "<=" entries */ -/* - * Reset the bw_meter entry - */ -x->bm_start_time = *nowp; -x->bm_measured.b_packets = 0; -x->bm_measured.b_bytes = 0; -x->bm_flags &= ~BW_METER_UPCALL_DELIVERED; + /* + * Reset the bw_meter entry + */ + x->bm_start_time = *nowp; + x->bm_measured.b_packets = 0; + x->bm_measured.b_bytes = 0; + x->bm_flags &= ~BW_METER_UPCALL_DELIVERED; -/* - * Co
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Wed Feb 7 12:09:55 UTC 2018 Modified Files: src/sys/netinet: ip_mroute.c Log Message: Remove parentheses in return statements. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/netinet/ip_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/ip_mroute.c diff -u src/sys/netinet/ip_mroute.c:1.150 src/sys/netinet/ip_mroute.c:1.151 --- src/sys/netinet/ip_mroute.c:1.150 Wed Feb 7 12:04:50 2018 +++ src/sys/netinet/ip_mroute.c Wed Feb 7 12:09:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_mroute.c,v 1.150 2018/02/07 12:04:50 maxv Exp $ */ +/* $NetBSD: ip_mroute.c,v 1.151 2018/02/07 12:09:55 maxv Exp $ */ /* * Copyright (c) 1992, 1993 @@ -93,7 +93,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.150 2018/02/07 12:04:50 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.151 2018/02/07 12:09:55 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -678,7 +678,7 @@ ip_mrouter_done(void) if (mrtdebug) log(LOG_DEBUG, "ip_mrouter_done\n"); - return (0); + return 0; } void @@ -714,7 +714,7 @@ static int set_assert(int i) { pim_assert = !!i; - return (0); + return 0; } /* @@ -735,18 +735,18 @@ set_api_config(struct sockopt *sopt) */ error = sockopt_get(sopt, &apival, sizeof(apival)); if (error) - return (error); + return error; if (numvifs > 0) - return (EPERM); + return EPERM; if (pim_assert) - return (EPERM); + return EPERM; for (i = 0; i < MFCTBLSIZ; i++) { if (LIST_FIRST(&mfchashtbl[i]) != NULL) - return (EPERM); + return EPERM; } mrt_api_config = apival & mrt_api_support; - return (0); + return 0; } /* @@ -761,13 +761,13 @@ add_vif(struct vifctl *vifcp) struct sockaddr_in sin; if (vifcp->vifc_vifi >= MAXVIFS) - return (EINVAL); + return EINVAL; if (in_nullhost(vifcp->vifc_lcl_addr)) - return (EADDRNOTAVAIL); + return EADDRNOTAVAIL; vifp = &viftable[vifcp->vifc_vifi]; if (!in_nullhost(vifp->v_lcl_addr)) - return (EADDRINUSE); + return EADDRINUSE; /* Find the interface with an address in AF_INET family. */ #ifdef PIM @@ -798,7 +798,7 @@ add_vif(struct vifctl *vifcp) if (vifcp->vifc_flags & VIFF_TUNNEL) { if (vifcp->vifc_flags & VIFF_SRCRT) { log(LOG_ERR, "source routed tunnels not supported\n"); - return (EOPNOTSUPP); + return EOPNOTSUPP; } /* attach this vif to decapsulator dispatch table */ @@ -816,7 +816,7 @@ add_vif(struct vifctl *vifcp) vif_encapcheck, &vif_encapsw, vifp); encap_lock_exit(); if (!vifp->v_encap_cookie) - return (EINVAL); + return EINVAL; /* Create a fake encapsulation interface. */ ifp = malloc(sizeof(*ifp), M_MRTABLE, M_WAITOK|M_ZERO); @@ -843,13 +843,13 @@ add_vif(struct vifctl *vifcp) } else { /* Make sure the interface supports multicast. */ if ((ifp->if_flags & IFF_MULTICAST) == 0) - return (EOPNOTSUPP); + return EOPNOTSUPP; /* Enable promiscuous reception of all IP multicasts. */ sockaddr_in_init(&sin, &zeroin_addr, 0); error = if_mcast_op(ifp, SIOCADDMULTI, sintosa(&sin)); if (error) - return (error); + return error; } s = splsoftnet(); @@ -892,7 +892,7 @@ add_vif(struct vifctl *vifcp) vifcp->vifc_threshold, vifcp->vifc_rate_limit); - return (0); + return 0; } void @@ -943,11 +943,11 @@ del_vif(vifi_t *vifip) int s; if (*vifip >= numvifs) - return (EINVAL); + return EINVAL; vifp = &viftable[*vifip]; if (in_nullhost(vifp->v_lcl_addr)) - return (EADDRNOTAVAIL); + return EADDRNOTAVAIL; s = splsoftnet(); @@ -964,7 +964,7 @@ del_vif(vifi_t *vifip) if (mrtdebug) log(LOG_DEBUG, "del_vif %d, numvifs %d\n", *vifip, numvifs); - return (0); + return 0; } /* @@ -1050,7 +1050,7 @@ add_mfc(struct sockopt *sopt) error = sockopt_get(sopt, mfccp, sizeof(struct mfcctl)); if (error) - return (error); + return error; s = splsoftnet(); rt = mfc_find(&mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp); @@ -1066,7 +1066,7 @@ add_mfc(struct sockopt *sopt) update_mfc_params(rt, mfccp); splx(s); - return (0); + return 0; } /* @@ -1141,7 +1141,7 @@ add_mfc(struct sockopt *sopt) M_NOWAIT); if (rt == NULL) { splx(s); -return (ENOBUFS); +return ENOBUFS; } init_mfc_params(rt, mfccp); @@ -1155,7 +1155,7 @@ add_mfc(struct sockopt *sopt) } splx(s); - return (0); + return 0; } #ifdef UPCALL_TIMING @@ -1208,7 +1208,7 @@ del_mfc(struct sockopt *sopt) /* Try with the size of mfcctl2. */ error = sockopt_get(sopt, mfccp, sizeof(struct mfcctl2)); if (error) - return (error); + return error; } if (mrtdebug & DEBUG_MFC) @@ -1221,7 +1221,7 @@ del_mfc(struct sockopt *sopt) rt = mfc_find(&mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp); if (rt == NULL) { splx(s); - return (EADDRNOTAVA
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Wed Feb 7 12:04:50 UTC 2018 Modified Files: src/sys/netinet: ip_mroute.c Log Message: Style and remove unused macros. More to come. To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/netinet/ip_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/ip_mroute.c diff -u src/sys/netinet/ip_mroute.c:1.149 src/sys/netinet/ip_mroute.c:1.150 --- src/sys/netinet/ip_mroute.c:1.149 Wed Feb 7 11:42:57 2018 +++ src/sys/netinet/ip_mroute.c Wed Feb 7 12:04:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_mroute.c,v 1.149 2018/02/07 11:42:57 maxv Exp $ */ +/* $NetBSD: ip_mroute.c,v 1.150 2018/02/07 12:04:50 maxv Exp $ */ /* * Copyright (c) 1992, 1993 @@ -93,7 +93,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.149 2018/02/07 11:42:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.150 2018/02/07 12:04:50 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -156,9 +156,6 @@ __KERNEL_RCSID(0, "$NetBSD: ip_mroute.c, struct socket *ip_mrouter = NULL; int ip_mrtproto = IGMP_DVMRP;/* for netstat only */ -#define NO_RTE_FOUND 0x1 -#define RTE_FOUND 0x2 - #define MFCHASH(a, g) \ a).s_addr >> 20) ^ ((a).s_addr >> 10) ^ (a).s_addr ^ \ ((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr) & mfchash) @@ -168,7 +165,7 @@ u_long mfchash; u_char nexpire[MFCTBLSIZ]; struct vif viftable[MAXVIFS]; struct mrtstat mrtstat; -u_int mrtdebug = 0; /* debug level */ +u_int mrtdebug = 0; /* debug level */ #define DEBUG_MFC 0x02 #define DEBUG_FORWARD 0x04 #define DEBUG_EXPIRE 0x08 @@ -177,7 +174,7 @@ u_int mrtdebug = 0; /* debug level * #define VIFI_INVALID ((vifi_t) -1) -u_int tbfdebug = 0; /* tbf debug level */ +u_int tbfdebug = 0; /* tbf debug level */ /* vif attachment using sys/netinet/ip_encap.c */ static void vif_input(struct mbuf *, int, int, void *); @@ -245,28 +242,16 @@ static void expire_bw_meter_process(void #ifdef PIM static int pim_register_send(struct ip *, struct vif *, - struct mbuf *, struct mfc *); +struct mbuf *, struct mfc *); static int pim_register_send_rp(struct ip *, struct vif *, - struct mbuf *, struct mfc *); +struct mbuf *, struct mfc *); static int pim_register_send_upcall(struct ip *, struct vif *, - struct mbuf *, struct mfc *); +struct mbuf *, struct mfc *); static struct mbuf *pim_register_prepare(struct ip *, struct mbuf *); #endif -/* - * 'Interfaces' associated with decapsulator (so we can tell - * packets that went through it from ones that get reflected - * by a broken gateway). These interfaces are never linked into - * the system ifnet list & no routes point to them. I.e., packets - * can't be sent this way. They only exist as a placeholder for - * multicast source verification. - */ -#if 0 -struct ifnet multicast_decap_if[MAXVIFS]; -#endif - #define ENCAP_TTL 64 -#define ENCAP_PROTO IPPROTO_IPIP /* 4 */ +#define ENCAP_PROTO IPPROTO_IPIP /* prototype IP hdr for encapsulated packets */ struct ip multicast_encap_iphdr = { @@ -307,10 +292,9 @@ struct pimstat pimstat; * data packet: * * struct pim_encap_hdr { - *struct ip ip; - *struct pim_encap_pimhdr pim; + * struct ip ip; + * struct pim_encap_pimhdr pim; * } - * */ struct pim_encap_pimhdr { @@ -385,7 +369,7 @@ mfc_find(struct in_addr *o, struct in_ad break; } - return (rt); + return rt; } /* @@ -485,7 +469,7 @@ ip_mrouter_set(struct socket *so, struct break; } } - return (error); + return error; } /* @@ -519,7 +503,7 @@ ip_mrouter_get(struct socket *so, struct break; } } - return (error); + return error; } /* @@ -545,7 +529,7 @@ mrt_ioctl(struct socket *so, u_long cmd, break; } - return (error); + return error; } /* @@ -562,14 +546,14 @@ get_sg_cnt(struct sioc_sg_req *req) if (rt == NULL) { splx(s); req->pktcnt = req->bytecnt = req->wrong_if = 0x; - return (EADDRNOTAVAIL); + return EADDRNOTAVAIL; } req->pktcnt = rt->mfc_pkt_cnt; req->bytecnt = rt->mfc_byte_cnt; req->wrong_if = rt->mfc_wrong_if; splx(s); - return (0); + return 0; } /* @@ -581,14 +565,14 @@ get_vif_cnt(struct sioc_vif_req *req) vifi_t vifi = req->vifi; if (vifi >= numvifs) - return (EINVAL); + return EINVAL; req->icount = viftable[vifi].v_pkt_in; req->ocount = viftable[vifi].v_pkt_out; req->ibytes = viftable[vifi].v_bytes_in; req->obytes = viftable[vifi].v_bytes_out; - return (0); + return 0; } /* @@ -604,13 +588,13 @@ ip_mrouter_init(struct socket *so, int v if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_IGMP) - return (EOPNOTSUPP); + return EOPNOTSUPP; if (v != 1) - return (EINVAL); + return EINVAL; if (ip_mrouter != NULL) - return (EADDRINUSE); + return EADDRINUSE; ip_mro
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Wed Feb 7 11:42:58 UTC 2018 Modified Files: src/sys/netinet: igmp.c ip_mroute.c ip_mroute.h Log Message: Remove RSVP_ISI, that's mostly dead code. FreeBSD and OpenBSD too removed it; FreeBSD kept some pieces but they are mostly no-opts. Sent on tech-net@, no comment. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/netinet/igmp.c cvs rdiff -u -r1.148 -r1.149 src/sys/netinet/ip_mroute.c cvs rdiff -u -r1.31 -r1.32 src/sys/netinet/ip_mroute.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/igmp.c diff -u src/sys/netinet/igmp.c:1.65 src/sys/netinet/igmp.c:1.66 --- src/sys/netinet/igmp.c:1.65 Fri Nov 17 07:37:12 2017 +++ src/sys/netinet/igmp.c Wed Feb 7 11:42:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: igmp.c,v 1.65 2017/11/17 07:37:12 ozaki-r Exp $ */ +/* $NetBSD: igmp.c,v 1.66 2018/02/07 11:42:58 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.65 2017/11/17 07:37:12 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.66 2018/02/07 11:42:58 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_mrouting.h" @@ -632,9 +632,7 @@ igmp_sendpkt(struct in_multi *inm, int t imo.imo_multicast_if_index = if_get_index(inm->inm_ifp); imo.imo_multicast_ttl = 1; -#ifdef RSVP_ISI - imo.imo_multicast_vif = -1; -#endif + /* * Request loopback of the report if we are acting as a multicast * router, so that the process-level routing demon can hear it. Index: src/sys/netinet/ip_mroute.c diff -u src/sys/netinet/ip_mroute.c:1.148 src/sys/netinet/ip_mroute.c:1.149 --- src/sys/netinet/ip_mroute.c:1.148 Wed Nov 15 10:42:41 2017 +++ src/sys/netinet/ip_mroute.c Wed Feb 7 11:42:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_mroute.c,v 1.148 2017/11/15 10:42:41 knakahara Exp $ */ +/* $NetBSD: ip_mroute.c,v 1.149 2018/02/07 11:42:57 maxv Exp $ */ /* * Copyright (c) 1992, 1993 @@ -93,7 +93,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.148 2017/11/15 10:42:41 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.149 2018/02/07 11:42:57 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -178,14 +178,6 @@ u_int mrtdebug = 0; /* debug level * #define VIFI_INVALID ((vifi_t) -1) u_int tbfdebug = 0; /* tbf debug level */ -#ifdef RSVP_ISI -u_int rsvpdebug = 0; /* rsvp debug level */ -#define RSVP_DPRINTF(a) do if (rsvpdebug) printf a; while (/*CONSTCOND*/0) -extern struct socket *ip_rsvpd; -extern int rsvp_on; -#else -#define RSVP_DPRINTF(a) do {} while (/*CONSTCOND*/0) -#endif /* RSVP_ISI */ /* vif attachment using sys/netinet/ip_encap.c */ static void vif_input(struct mbuf *, int, int, void *); @@ -224,11 +216,7 @@ static int del_mfc(struct sockopt *); static int set_api_config(struct sockopt *); /* chose API capabilities */ static int socket_send(struct socket *, struct mbuf *, struct sockaddr_in *); static void expire_upcalls(void *); -#ifdef RSVP_ISI -static int ip_mdq(struct mbuf *, struct ifnet *, struct mfc *, vifi_t); -#else static int ip_mdq(struct mbuf *, struct ifnet *, struct mfc *); -#endif static void phyint_send(struct ip *, struct vif *, struct mbuf *); static void encap_send(struct ip *, struct vif *, struct mbuf *); static void tbf_control(struct vif *, struct mbuf *, struct ip *, u_int32_t); @@ -905,11 +893,6 @@ add_vif(struct vifctl *vifcp) callout_init(&vifp->v_repq_ch, 0); -#ifdef RSVP_ISI - vifp->v_rsvp_on = 0; - vifp->v_rsvpd = NULL; -#endif /* RSVP_ISI */ - splx(s); /* Adjust numvifs up if the vifi is higher than numvifs. */ @@ -1135,11 +1118,7 @@ add_mfc(struct sockopt *sopt) for (; rte != NULL; rte = nrte) { nrte = rte->next; if (rte->ifp) { -#ifdef RSVP_ISI - ip_mdq(rte->m, rte->ifp, rt, -1); -#else ip_mdq(rte->m, rte->ifp, rt); -#endif /* RSVP_ISI */ } m_freem(rte->m); #ifdef UPCALL_TIMING @@ -1302,11 +1281,7 @@ socket_send(struct socket *s, struct mbu #define TUNNEL_LEN 12 /* # bytes of IP option for tunnel encapsulation */ int -#ifdef RSVP_ISI -ip_mforward(struct mbuf *m, struct ifnet *ifp, struct ip_moptions *imo) -#else ip_mforward(struct mbuf *m, struct ifnet *ifp) -#endif /* RSVP_ISI */ { struct ip *ip = mtod(m, struct ip *); struct mfc *rt; @@ -1344,27 +1319,6 @@ ip_mforward(struct mbuf *m, struct ifnet */ m->m_pkthdr.csum_flags = 0; -#ifdef RSVP_ISI - if (imo && ((vifi = imo->imo_multicast_vif) < numvifs)) { - if (ip->ip_ttl < MAXTTL) - ip->ip_ttl++; /* compensate for -1 in *_send routines */ - if (ip->ip_p == IPPROTO_RSVP) { - struct vif *vifp = viftable + vifi; - RSVP_DPRINTF(("%s: Sending IPPROTO_RSVP from %x to %x" - " on vif %d (%s%s)\n", __func__, - ntohl(ip->ip_src), ntohl(ip->ip_dst), vifi, - (vifp->v_flags & VIFF_TUNNEL) ? "t
CVS commit: src/lib/libc
Module Name:src Committed By: pgoyette Date: Wed Feb 7 11:16:06 UTC 2018 Modified Files: src/lib/libc/gen: getgrent.3 getpwent.3 src/lib/libc/net: resolver.3 src/lib/libc/stdlib: ptsname.3 src/lib/libc/time: ctime.3 getdate.3 src/lib/libc/yp: ypclnt.3 Log Message: Fix typos, as reported by Eitan Adler. Update dates. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libc/gen/getgrent.3 cvs rdiff -u -r1.39 -r1.40 src/lib/libc/gen/getpwent.3 cvs rdiff -u -r1.33 -r1.34 src/lib/libc/net/resolver.3 cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdlib/ptsname.3 cvs rdiff -u -r1.56 -r1.57 src/lib/libc/time/ctime.3 cvs rdiff -u -r1.8 -r1.9 src/lib/libc/time/getdate.3 cvs rdiff -u -r1.28 -r1.29 src/lib/libc/yp/ypclnt.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/getgrent.3 diff -u src/lib/libc/gen/getgrent.3:1.31 src/lib/libc/gen/getgrent.3:1.32 --- src/lib/libc/gen/getgrent.3:1.31 Thu Apr 28 16:34:01 2011 +++ src/lib/libc/gen/getgrent.3 Wed Feb 7 11:16:05 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: getgrent.3,v 1.31 2011/04/28 16:34:01 wiz Exp $ +.\" $NetBSD: getgrent.3,v 1.32 2018/02/07 11:16:05 pgoyette Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)getgrent.3 8.2 (Berkeley) 4/19/94 .\" -.Dd April 30, 2008 +.Dd February 7, 2018 .Dt GETGRENT 3 .Os .Sh NAME @@ -187,8 +187,8 @@ and return a valid pointer to a group structure on success and a .Dv NULL -pointer if the entry was not found or an error occured. -If an error occured, the global variable +pointer if the entry was not found or an error occurred. +If an error occurred, the global variable .Dv errno is set to indicate the nature of the failure. .Pp Index: src/lib/libc/gen/getpwent.3 diff -u src/lib/libc/gen/getpwent.3:1.39 src/lib/libc/gen/getpwent.3:1.40 --- src/lib/libc/gen/getpwent.3:1.39 Mon Dec 26 10:16:43 2016 +++ src/lib/libc/gen/getpwent.3 Wed Feb 7 11:16:05 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: getpwent.3,v 1.39 2016/12/26 10:16:43 abhinav Exp $ +.\" $NetBSD: getpwent.3,v 1.40 2018/02/07 11:16:05 pgoyette Exp $ .\" .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)getpwent.3 8.2 (Berkeley) 12/11/93 .\" -.Dd April 30, 2008 +.Dd February 7, 2018 .Dt GETPWENT 3 .Os .Sh NAME @@ -210,8 +210,8 @@ and return a valid pointer to a passwd structure on success and a .Dv NULL -pointer if the entry was not found or an error occured. -If an error occured, the global variable +pointer if the entry was not found or an error occurred. +If an error occurred, the global variable .Dv errno is set to indicate the nature of the failure. The Index: src/lib/libc/net/resolver.3 diff -u src/lib/libc/net/resolver.3:1.33 src/lib/libc/net/resolver.3:1.34 --- src/lib/libc/net/resolver.3:1.33 Mon Oct 30 15:46:38 2017 +++ src/lib/libc/net/resolver.3 Wed Feb 7 11:16:05 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: resolver.3,v 1.33 2017/10/30 15:46:38 wiz Exp $ +.\" $NetBSD: resolver.3,v 1.34 2018/02/07 11:16:05 pgoyette Exp $ .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -33,7 +33,7 @@ .\" @(#)resolver.3 6.5 (Berkeley) 6/23/90 .\" Id: resolver.man3,v 1.2 2009/01/21 00:12:34 each Exp .\" -.Dd December 18, 2016 +.Dd February 7, 2018 .Dt RESOLVER 3 .Os .Sh NAME @@ -200,7 +200,7 @@ The functions .Fn res_close .\" and .\" .Fn herror -are deprecated and are supplied for compatability with old source +are deprecated and are supplied for compatibility with old source code. They use global configuration and state information that is kept in the structure @@ -532,7 +532,7 @@ The function .Fn fp_resstat prints out the active flag bits in .Fa statp->options -preceeded by the text ";; res options:" on +preceded by the text ";; res options:" on .Fa file . .Pp The functions Index: src/lib/libc/stdlib/ptsname.3 diff -u src/lib/libc/stdlib/ptsname.3:1.11 src/lib/libc/stdlib/ptsname.3:1.12 --- src/lib/libc/stdlib/ptsname.3:1.11 Sat Sep 9 12:28:19 2017 +++ src/lib/libc/stdlib/ptsname.3 Wed Feb 7 11:16:05 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ptsname.3,v 1.11 2017/09/09 12:28:19 kamil Exp $ +.\" $NetBSD: ptsname.3,v 1.12 2018/02/07 11:16:05 pgoyette Exp $ .\" .\" Copyright (c) 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 9, 2017 +.Dd February 7, 2018 .Dt PTSNAME 3 .Os .Sh NAME @@ -92,7 +92,7 @@ and returns If an error occurs .Fn ptsname_r will return -an error number number indicating what went wrong. +an error number indicati
CVS commit: src/sys/netinet6
Module Name:src Committed By: maxv Date: Wed Feb 7 10:52:20 UTC 2018 Modified Files: src/sys/netinet6: in6_proto.c Log Message: Style, and localify IPV6FORWARDING. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/netinet6/in6_proto.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/in6_proto.c diff -u src/sys/netinet6/in6_proto.c:1.120 src/sys/netinet6/in6_proto.c:1.121 --- src/sys/netinet6/in6_proto.c:1.120 Wed Feb 7 10:21:59 2018 +++ src/sys/netinet6/in6_proto.c Wed Feb 7 10:52:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_proto.c,v 1.120 2018/02/07 10:21:59 maxv Exp $ */ +/* $NetBSD: in6_proto.c,v 1.121 2018/02/07 10:52:20 maxv Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.120 2018/02/07 10:21:59 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.121 2018/02/07 10:52:20 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -124,8 +124,7 @@ __KERNEL_RCSID(0, "$NetBSD: in6_proto.c, #include #include #include -#endif /* IPSEC */ - +#endif #include "carp.h" #if NCARP > 0 @@ -553,51 +552,44 @@ sockaddr_in6_cmp(const struct sockaddr * /* * Internet configuration info */ -#ifndef IPV6FORWARDING #ifdef GATEWAY6 -#define IPV6FORWARDING 1 /* forward IP6 packets not for us */ +#define IPV6FORWARDING 1 /* forward IP6 packets not for us */ #else -#define IPV6FORWARDING 0 /* don't forward IP6 packets not for us */ -#endif /* GATEWAY6 */ -#endif /* !IPV6FORWARDING */ - -int ip6_forwarding = IPV6FORWARDING; /* act as router? */ -int ip6_sendredirects = 1; -int ip6_defhlim = IPV6_DEFHLIM; -int ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS; -int ip6_accept_rtadv = 0; /* "IPV6FORWARDING ? 0 : 1" is dangerous */ -int ip6_maxfragpackets = 200; -int ip6_maxfrags = 200; -int ip6_log_interval = 5; -int ip6_hdrnestlimit = 15; /* appropriate? */ -int ip6_dad_count = 1; /* DupAddrDetectionTransmits */ -int ip6_auto_flowlabel = 1; -int ip6_use_deprecated = 1; /* allow deprecated addr (RFC2462 5.5.4) */ -int ip6_rr_prune = 5; /* router renumbering prefix - * walk list every 5 sec. */ -int ip6_mcast_pmtu = 0; /* enable pMTU discovery for multicast? */ -int ip6_v6only = 1; -int ip6_neighborgcthresh = 2048; /* Threshold # of NDP entries for GC */ -int ip6_maxifprefixes = 16; /* Max acceptable prefixes via RA per IF */ -int ip6_maxifdefrouters = 16; /* Max acceptable def routers via RA */ -int ip6_maxdynroutes = 4096; /* Max # of routes created via redirect */ - -int ip6_keepfaith = 0; -time_t ip6_log_time = 0; -int ip6_rtadv_maxroutes = 100; /* (arbitrary) initial maximum number of -* routes via rtadv expected to be -* significantly larger than common use. -* if you need to count: 3 extra initial -* routes, plus 1 per interface after the -* first one, then one per non-linklocal -* prefix */ +#define IPV6FORWARDING 0 /* don't forward IP6 packets not for us */ +#endif + +int ip6_forwarding = IPV6FORWARDING; /* act as router? */ +int ip6_sendredirects = 1; +int ip6_defhlim = IPV6_DEFHLIM; +int ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS; +int ip6_accept_rtadv = 0; +int ip6_maxfragpackets = 200; +int ip6_maxfrags = 200; +int ip6_log_interval = 5; +int ip6_hdrnestlimit = 15; +int ip6_dad_count = 1; /* DupAddrDetectionTransmits */ +int ip6_auto_flowlabel = 1; +int ip6_use_deprecated = 1; /* allow deprecated addr (RFC2462 5.5.4) */ +int ip6_rr_prune = 5; /* router renumbering prefix + * walk list every 5 sec. */ +int ip6_mcast_pmtu = 0; /* enable pMTU discovery for multicast? */ +int ip6_v6only = 1; +int ip6_neighborgcthresh = 2048; /* Threshold # of NDP entries for GC */ +int ip6_maxifprefixes = 16; /* Max acceptable prefixes via RA per IF */ +int ip6_maxifdefrouters = 16; /* Max acceptable def routers via RA */ +int ip6_maxdynroutes = 4096; /* Max # of routes created via redirect */ + +int ip6_keepfaith = 0; +time_t ip6_log_time = 0; +int ip6_rtadv_maxroutes = 100; /* (arbitrary) initial maximum number of +* routes via rtadv expected to be +* significantly larger than common use. +* if you need to count: 3 extra initial +* routes, plus 1 per interface after the +* first one, then one per non-linklocal +* prefix */ /* icmp6 */ -/* - * BSDI4 defines these variables in in_proto.c... - * XXX: what if we don't define INET? Should we define pmtu6_expire - * or so? (jin...@k
CVS commit: src/sys/netinet6
Module Name:src Committed By: maxv Date: Wed Feb 7 10:22:00 UTC 2018 Modified Files: src/sys/netinet6: in6_proto.c Log Message: Change ip6_hdrnestlimit to be 15 instead of 50. I couldn't find any reference in RFCs about what a correct limit should be, but FreeBSD already uses 15. If an IPv6 packet has 50 options, there is clearly something wrong with it. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/netinet6/in6_proto.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/in6_proto.c diff -u src/sys/netinet6/in6_proto.c:1.119 src/sys/netinet6/in6_proto.c:1.120 --- src/sys/netinet6/in6_proto.c:1.119 Wed Sep 27 10:05:05 2017 +++ src/sys/netinet6/in6_proto.c Wed Feb 7 10:21:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_proto.c,v 1.119 2017/09/27 10:05:05 ozaki-r Exp $ */ +/* $NetBSD: in6_proto.c,v 1.120 2018/02/07 10:21:59 maxv Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.119 2017/09/27 10:05:05 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.120 2018/02/07 10:21:59 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -569,7 +569,7 @@ int ip6_accept_rtadv = 0; /* "IPV6FORWAR int ip6_maxfragpackets = 200; int ip6_maxfrags = 200; int ip6_log_interval = 5; -int ip6_hdrnestlimit = 50; /* appropriate? */ +int ip6_hdrnestlimit = 15; /* appropriate? */ int ip6_dad_count = 1; /* DupAddrDetectionTransmits */ int ip6_auto_flowlabel = 1; int ip6_use_deprecated = 1; /* allow deprecated addr (RFC2462 5.5.4) */
CVS commit: src/lib/libc/atomic
Module Name:src Committed By: martin Date: Wed Feb 7 09:59:56 UTC 2018 Modified Files: src/lib/libc/atomic: atomic_ops.3 Log Message: Bump date for previous To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/atomic/atomic_ops.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/atomic/atomic_ops.3 diff -u src/lib/libc/atomic/atomic_ops.3:1.6 src/lib/libc/atomic/atomic_ops.3:1.7 --- src/lib/libc/atomic/atomic_ops.3:1.6 Wed Feb 7 09:55:35 2018 +++ src/lib/libc/atomic/atomic_ops.3 Wed Feb 7 09:59:56 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: atomic_ops.3,v 1.6 2018/02/07 09:55:35 martin Exp $ +.\" $NetBSD: atomic_ops.3,v 1.7 2018/02/07 09:59:56 martin Exp $ .\" .\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 14, 2010 +.Dd February 7, 2018 .Dt ATOMIC_OPS 3 .Os .Sh NAME
CVS commit: src/lib/libc/atomic
Module Name:src Committed By: martin Date: Wed Feb 7 09:55:35 UTC 2018 Modified Files: src/lib/libc/atomic: atomic_ops.3 Log Message: Fix typo, from Eitan Adler. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/atomic/atomic_ops.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/atomic/atomic_ops.3 diff -u src/lib/libc/atomic/atomic_ops.3:1.5 src/lib/libc/atomic/atomic_ops.3:1.6 --- src/lib/libc/atomic/atomic_ops.3:1.5 Wed Apr 14 08:49:49 2010 +++ src/lib/libc/atomic/atomic_ops.3 Wed Feb 7 09:55:35 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: atomic_ops.3,v 1.5 2010/04/14 08:49:49 jruoho Exp $ +.\" $NetBSD: atomic_ops.3,v 1.6 2018/02/07 09:55:35 martin Exp $ .\" .\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -98,7 +98,7 @@ completes. If hardware CAS is not available, the store may not reach global visibility until some time after the atomic operation has completed. However, in all cases a subsequent atomic operation on the same memory cell -will be delayed until the result of any preceeding operation has reached +will be delayed until the result of any preceding operation has reached global visibility. .Pp Atomic operations are strongly ordered with respect to each other.
CVS commit: src/sys/netinet6
Module Name:src Committed By: maxv Date: Wed Feb 7 09:53:09 UTC 2018 Modified Files: src/sys/netinet6: frag6.c Log Message: Rename back to ip6af_mff. It was actually clearer than ip6af_more. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/netinet6/frag6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/frag6.c diff -u src/sys/netinet6/frag6.c:1.65 src/sys/netinet6/frag6.c:1.66 --- src/sys/netinet6/frag6.c:1.65 Tue Jan 30 14:49:25 2018 +++ src/sys/netinet6/frag6.c Wed Feb 7 09:53:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frag6.c,v 1.65 2018/01/30 14:49:25 maxv Exp $ */ +/* $NetBSD: frag6.c,v 1.66 2018/02/07 09:53:08 maxv Exp $ */ /* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.65 2018/01/30 14:49:25 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.66 2018/02/07 09:53:08 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -90,7 +90,7 @@ struct ip6asfrag { int ip6af_offset; /* offset in ip6af_m to next header */ int ip6af_frglen; /* fragmentable part length */ int ip6af_off; /* fragment offset */ - bool ip6af_more; /* more fragment bit in frag off */ + bool ip6af_mff; /* more fragment bit in frag off */ }; @@ -356,7 +356,7 @@ frag6_input(struct mbuf **mp, int *offp, ip6af->ip6af_len = ip6->ip6_plen; ip6af->ip6af_nxt = ip6->ip6_nxt; ip6af->ip6af_hlim = ip6->ip6_hlim; - ip6af->ip6af_more = (ip6f->ip6f_offlg & IP6F_MORE_FRAG) != 0; + ip6af->ip6af_mff = (ip6f->ip6f_offlg & IP6F_MORE_FRAG) != 0; ip6af->ip6af_off = fragoff; ip6af->ip6af_frglen = frgpartlen; ip6af->ip6af_offset = offset; @@ -415,7 +415,7 @@ insert: } next += af6->ip6af_frglen; } - if (af6->ip6af_up->ip6af_more) { + if (af6->ip6af_up->ip6af_mff) { mutex_exit(&frag6_lock); goto done; }
CVS commit: src/sys/ufs/chfs
Module Name:src Committed By: ozaki-r Date: Wed Feb 7 08:50:13 UTC 2018 Modified Files: src/sys/ufs/chfs: ebh.c Log Message: Remove unnecessary assertions KASSERT(!rw_lock_held()) just before rw_destroy() is useless because rw_destroy does more strict check and provides better information on failure. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/ufs/chfs/ebh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/chfs/ebh.c diff -u src/sys/ufs/chfs/ebh.c:1.6 src/sys/ufs/chfs/ebh.c:1.7 --- src/sys/ufs/chfs/ebh.c:1.6 Sat Feb 7 04:21:11 2015 +++ src/sys/ufs/chfs/ebh.c Wed Feb 7 08:50:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ebh.c,v 1.6 2015/02/07 04:21:11 christos Exp $ */ +/* $NetBSD: ebh.c,v 1.7 2018/02/07 08:50:13 ozaki-r Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -656,7 +656,6 @@ leb_read_unlock(struct chfs_ebh *ebh, in if (le->users == 0) { le = RB_REMOVE(ltree_rbtree, &ebh->ltree, le); if (le) { - KASSERT(!rw_lock_held(&le->mutex)); rw_destroy(&le->mutex); kmem_free(le, sizeof(struct chfs_ltree_entry)); @@ -713,7 +712,6 @@ leb_write_unlock(struct chfs_ebh *ebh, i if (le->users == 0) { RB_REMOVE(ltree_rbtree, &ebh->ltree, le); - KASSERT(!rw_lock_held(&le->mutex)); rw_destroy(&le->mutex); kmem_free(le, sizeof(struct chfs_ltree_entry));
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Wed Feb 7 08:12:25 UTC 2018 Modified Files: src/sys/netinet: ip_input.c Log Message: Remove null check on ip, it can't be null. (Confuses code scanners.) To generate a diff of this commit: cvs rdiff -u -r1.373 -r1.374 src/sys/netinet/ip_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/ip_input.c diff -u src/sys/netinet/ip_input.c:1.373 src/sys/netinet/ip_input.c:1.374 --- src/sys/netinet/ip_input.c:1.373 Tue Feb 6 06:36:40 2018 +++ src/sys/netinet/ip_input.c Wed Feb 7 08:12:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.373 2018/02/06 06:36:40 maxv Exp $ */ +/* $NetBSD: ip_input.c,v 1.374 2018/02/07 08:12:25 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.373 2018/02/06 06:36:40 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.374 2018/02/07 08:12:25 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -782,7 +782,7 @@ ours: * Switch out to protocol's input routine. */ #if IFA_STATS - if (ia && ip) { + if (ia) { struct in_ifaddr *_ia; /* * Keep a reference from ip_match_our_address with psref