From owner-svn-src-vendor@freebsd.org Sun May 29 02:24:53 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D9EFB52F02; Sun, 29 May 2016 02:24:53 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA431E55; Sun, 29 May 2016 02:24:52 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4T2OqOd014905; Sun, 29 May 2016 02:24:52 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4T2OqBc014904; Sun, 29 May 2016 02:24:52 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201605290224.u4T2OqBc014904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Sun, 29 May 2016 02:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r300930 - vendor/Juniper/libxo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 02:24:53 -0000 Author: phil Date: Sun May 29 02:24:51 2016 New Revision: 300930 URL: https://svnweb.freebsd.org/changeset/base/300930 Log: Update libxo's .svnignore Reviewed by: sjg (mentor) Approved by: sjg Modified: vendor/Juniper/libxo/.svnignore Modified: vendor/Juniper/libxo/.svnignore ============================================================================== --- vendor/Juniper/libxo/.svnignore Sun May 29 02:22:12 2016 (r300929) +++ vendor/Juniper/libxo/.svnignore Sun May 29 02:24:51 2016 (r300930) @@ -1,2 +1,6 @@ libxo-0.4.6 +libxo-0.4.7 +libxo-0.6.0 +libxo-0.6.1 +libxo-0.6.2 tag.sh From owner-svn-src-vendor@freebsd.org Sun May 29 01:40:22 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6363B4FF89; Sun, 29 May 2016 01:40:22 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67D0B1F85; Sun, 29 May 2016 01:40:22 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4T1eLpP095979; Sun, 29 May 2016 01:40:21 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4T1eKox095961; Sun, 29 May 2016 01:40:20 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201605290140.u4T1eKox095961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Sun, 29 May 2016 01:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r300923 - in vendor/Juniper/libxo/dist: . doc libxo tests/core tests/core/saved X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 01:40:22 -0000 Author: phil Date: Sun May 29 01:40:19 2016 New Revision: 300923 URL: https://svnweb.freebsd.org/changeset/base/300923 Log: Import libxo 0.6.2 Modified: vendor/Juniper/libxo/dist/configure.ac vendor/Juniper/libxo/dist/doc/libxo-manual.html vendor/Juniper/libxo/dist/doc/libxo.txt vendor/Juniper/libxo/dist/libxo/libxo.c vendor/Juniper/libxo/dist/libxo/xo_buf.h vendor/Juniper/libxo/dist/libxo/xo_encoder.c vendor/Juniper/libxo/dist/libxo/xo_format.5 vendor/Juniper/libxo/dist/tests/core/saved/test_03.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.H.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.HIPx.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.HP.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.J.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.JP.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.T.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.X.out vendor/Juniper/libxo/dist/tests/core/saved/test_03.XP.out vendor/Juniper/libxo/dist/tests/core/test_03.c Modified: vendor/Juniper/libxo/dist/configure.ac ============================================================================== --- vendor/Juniper/libxo/dist/configure.ac Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/configure.ac Sun May 29 01:40:19 2016 (r300923) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.6.1], [phil@juniper.net]) +AC_INIT([libxo], [0.6.2], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: vendor/Juniper/libxo/dist/doc/libxo-manual.html ============================================================================== --- vendor/Juniper/libxo/dist/doc/libxo-manual.html Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/doc/libxo-manual.html Sun May 29 01:40:19 2016 (r300923) @@ -515,7 +515,7 @@ li.indline1 { } @top-right { - content: "April 2016"; + content: "May 2016"; } @top-center { @@ -22009,7 +22009,7 @@ jQuery(function ($) { -April 15, 2016 +May 28, 2016

libxo: The Easy Way to Generate text, XML, JSON, and HTML output
libxo-manual

@@ -22739,7 +22739,7 @@ jQuery(function ($) { make make test sudo make install -

The following sections will walk thru each of these steps with additional details and options, but the above directions should be all that's needed.

+

The following sections will walk through each of these steps with additional details and options, but the above directions should be all that's needed.

Section Contents:

  • Section 1.1.2.1
  • @@ -23087,7 +23087,7 @@ jQuery(function ($) { xo_emit("{L:Free}{D::}{P: }{:free/%u} {U:Blocks}\n", free_blocks);

    When a role is not provided, the "value" role is used as the default.

    -

    Roles and modifiers can also use more verbose names, when preceeded by a comma:

    +

    Roles and modifiers can also use more verbose names, when preceded by a comma:

         EXAMPLE:
             xo_emit("{,label:Free}{,decoration::}{,padding:   }"
    @@ -23444,7 +23444,7 @@ jQuery(function ($) {
     
     
     
    -

    Roles and modifiers can also use more verbose names, when preceeded by a comma. For example, the modifier string "Lwc" (or "L,white,colon") means the field has a label role (text that describes the next field) and should be followed by a colon ('c') and a space ('w'). The modifier string "Vkq" (or ":key,quote") means the field has a value role (the default role), that it is a key for the current instance, and that the value should be quoted when encoded for JSON.

    +

    Roles and modifiers can also use more verbose names, when preceded by a comma. For example, the modifier string "Lwc" (or "L,white,colon") means the field has a label role (text that describes the next field) and should be followed by a colon ('c') and a space ('w'). The modifier string "Vkq" (or ":key,quote") means the field has a value role (the default role), that it is a key for the current instance, and that the value should be quoted when encoded for JSON.

    Section Contents:

    • Section 2.2.2.1
    • @@ -23688,7 +23688,7 @@ jQuery(function ($) {
    • a '#' character, indicating the output value should be prefixed with '0x', typically to indicate a base 16 (hex) value.
    • a minus sign ('‑'), indicating the output value should be padded on the right instead of the left.
    • a leading zero ('0') indicating the output value should be padded on the left with zeroes instead of spaces (' ').
    • -
    • one or more digits ('0' - '9') indicating the minimum width of the argument. If the width in columns of the output value is less that the minumum width, the value will be padded to reach the minimum.
    • +
    • one or more digits ('0' - '9') indicating the minimum width of the argument. If the width in columns of the output value is less than the minimum width, the value will be padded to reach the minimum.
    • a period followed by one or more digits indicating the maximum number of bytes which will be examined for a string argument, or the maximum width for a non-string argument. When handling ASCII strings this functions as the field width but for multi-byte characters, a single character may be composed of multiple bytes. xo_emit will never dereference memory beyond the given number of bytes.
    • a second period followed by one or more digits indicating the maximum width for a string argument. This modifier cannot be given for non-string arguments.
    • one or more 'h' characters, indicating shorter input data.
    • Modified: vendor/Juniper/libxo/dist/doc/libxo.txt ============================================================================== --- vendor/Juniper/libxo/dist/doc/libxo.txt Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/doc/libxo.txt Sun May 29 01:40:19 2016 (r300923) @@ -155,7 +155,7 @@ explained in detail in the rest of this make test sudo make install -The following sections will walk thru each of these steps with +The following sections will walk through each of these steps with additional details and options, but the above directions should be all that's needed. @@ -469,7 +469,7 @@ content. The roles are listed below; on When a role is not provided, the "value" role is used as the default. -Roles and modifiers can also use more verbose names, when preceeded by +Roles and modifiers can also use more verbose names, when preceded by a comma: EXAMPLE: @@ -720,7 +720,7 @@ particular output styles: | w | white | A blank (" ") is appended after the label | |---+---------------+--------------------------------------------------| -Roles and modifiers can also use more verbose names, when preceeded by +Roles and modifiers can also use more verbose names, when preceded by a comma. For example, the modifier string "Lwc" (or "L,white,colon") means the field has a label role (text that describes the next field) and should be followed by a colon ('c') and a space ('w'). The @@ -986,8 +986,8 @@ the right instead of the left. - a leading zero ('0') indicating the output value should be padded on the left with zeroes instead of spaces (' '). - one or more digits ('0' - '9') indicating the minimum width of the -argument. If the width in columns of the output value is less that -the minumum width, the value will be padded to reach the minimum. +argument. If the width in columns of the output value is less than +the minimum width, the value will be padded to reach the minimum. - a period followed by one or more digits indicating the maximum number of bytes which will be examined for a string argument, or the maximum width for a non-string argument. When handling ASCII strings this Modified: vendor/Juniper/libxo/dist/libxo/libxo.c ============================================================================== --- vendor/Juniper/libxo/dist/libxo/libxo.c Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/libxo/libxo.c Sun May 29 01:40:19 2016 (r300923) @@ -56,7 +56,7 @@ * (end of word, middle of word, etc) and many that affect characters * previously emitted. Without content, it can't hope to tell us. * But it's the only standard tool we've got, so we use it. We would - * use wcswidth() but it typically just loops thru adding the results + * use wcswidth() but it typically just loops through adding the results * of wcwidth() calls in an entirely unhelpful way. * * Even then, there are many poor implementations (macosx), so we have @@ -97,7 +97,7 @@ /* * Three styles of specifying thread-local variables are supported. - * configure.ac has the brains to run each possibility thru the + * configure.ac has the brains to run each possibility through the * compiler and see what works; we are left to define the THREAD_LOCAL * macro to the right value. Most toolchains (clang, gcc) use * "before", but some (borland) use "after" and I've heard of some @@ -988,7 +988,7 @@ xo_vsnprintf (xo_handle_t *xop, xo_buffe } /* - * Print some data thru the handle. + * Print some data through the handle. */ static int xo_printf_v (xo_handle_t *xop, const char *fmt, va_list vap) @@ -1251,7 +1251,7 @@ xo_buf_append_locale (xo_handle_t *xop, cols += xo_buf_append_locale_from_utf8(xop, xbp, cp, slen); - /* Next time thru, we'll start at the next character */ + /* Next time through, we'll start at the next character */ cp += slen - 1; sp = cp + 1; } @@ -2816,7 +2816,7 @@ xo_format_string (xo_handle_t *xop, xo_b * but if we did the work ourselves, then we need to do it. */ int delta = xfp->xf_width[XF_WIDTH_MIN] - cols; - if (!xo_buf_has_room(xbp, delta)) + if (!xo_buf_has_room(xbp, xfp->xf_width[XF_WIDTH_MIN])) goto bail; /* @@ -3328,7 +3328,7 @@ xo_do_format_field (xo_handle_t *xop, xo case XO_STYLE_XML: if (flags & XFF_TRIM_WS) columns = rc = xo_trim_ws(xbp, rc); - /* fall thru */ + /* FALLTHRU */ case XO_STYLE_HTML: rc = xo_escape_xml(xbp, rc, (flags & XFF_ATTR)); break; @@ -3687,7 +3687,7 @@ xo_buf_append_div (xo_handle_t *xop, con if (flags & XFF_ENCODE_ONLY) { /* - * Even if this is encode-only, we need to go thru the + * Even if this is encode-only, we need to go through the * work of formatting it to make sure the args are cleared * from xo_vap. */ @@ -5342,7 +5342,7 @@ xo_gettext_finish_numbering_fields (xo_h } /* - * The format string uses field numbers, so we need to whiffle thru it + * The format string uses field numbers, so we need to whiffle through it * and make sure everything's sane and lovely. */ static int @@ -6128,6 +6128,12 @@ xo_do_emit_fields (xo_handle_t *xop, xo_ XOIF_CLEAR(xop, XOIF_REORDER); + /* + * If we've got enough data, flush it. + */ + if (xo_buf_offset(&xop->xo_data) > XO_BUF_HIGH_WATER) + flush = 1; + /* If we don't have an anchor, write the text out */ if (flush && !XOIF_ISSET(xop, XOIF_ANCHOR)) { if (xo_write(xop) < 0) @@ -6988,7 +6994,7 @@ xo_do_close_leaf_list (xo_handle_t *xop, case XO_STYLE_ENCODER: rc = xo_encoder_handle(xop, XO_OP_CLOSE_LEAF_LIST, name, NULL); - /*fallthru*/ + /* FALLTHRU */ default: xo_depth_change(xop, name, -1, 0, XSS_CLOSE_LEAF_LIST, XSF_LIST); @@ -7780,9 +7786,9 @@ xo_parse_args (int argc, char **argv) } cp = argv[i] + sizeof(libxo_opt) - 1; - if (*cp == 0) { + if (*cp == '\0') { cp = argv[++i]; - if (cp == 0) { + if (cp == NULL) { xo_warnx("missing libxo option"); return -1; } @@ -7879,7 +7885,7 @@ xo_set_version_h (xo_handle_t *xop, cons } /* - * Set the version number for the API content being carried thru + * Set the version number for the API content being carried through * the xo handle. */ void Modified: vendor/Juniper/libxo/dist/libxo/xo_buf.h ============================================================================== --- vendor/Juniper/libxo/dist/libxo/xo_buf.h Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/libxo/xo_buf.h Sun May 29 01:40:19 2016 (r300923) @@ -19,8 +19,8 @@ #ifndef XO_BUF_H #define XO_BUF_H -#define XO_BUFSIZ (8*1024) /* Initial buffer size */ - +#define XO_BUFSIZ (8*1024) /* Initial buffer size */ +#define XO_BUF_HIGH_WATER (XO_BUFSIZ - 512) /* When to auto-flush */ /* * xo_buffer_t: a memory buffer that can be grown as needed. We * use them for building format strings and output data. Modified: vendor/Juniper/libxo/dist/libxo/xo_encoder.c ============================================================================== --- vendor/Juniper/libxo/dist/libxo/xo_encoder.c Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/libxo/xo_encoder.c Sun May 29 01:40:19 2016 (r300923) @@ -313,7 +313,7 @@ xo_encoder_init (xo_handle_t *xop, const /* * A couple of function varieties here, to allow for multiple - * use cases. This varient is for when the main program knows + * use cases. This variant is for when the main program knows * its own encoder needs. */ xo_handle_t * Modified: vendor/Juniper/libxo/dist/libxo/xo_format.5 ============================================================================== --- vendor/Juniper/libxo/dist/libxo/xo_format.5 Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/libxo/xo_format.5 Sun May 29 01:40:19 2016 (r300923) @@ -116,7 +116,7 @@ The roles are listed below; only one rol .Pp When a role is not provided, the "value" role is used as the default. .Pp -Roles and modifiers can also use more verbose names, when preceeded by +Roles and modifiers can also use more verbose names, when preceded by a comma: .Bd -literal -offset indent EXAMPLE: @@ -380,7 +380,7 @@ The modifier string "Vkq" means the field has a value role, that it is a key for the current instance, and that the value should be quoted when encoded for JSON. .Pp -Roles and modifiers can also use more verbose names, when preceeded by +Roles and modifiers can also use more verbose names, when preceded by a comma. For example, the modifier string "Lwc" (or "L,white,colon") means the field has a label role (text that describes the next field) Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.E.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.E.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.E.out Sun May 29 01:40:19 2016 (r300923) @@ -1,6 +1,18 @@ op create: [] [] op open_container: [employees] [] op open_list: [employee] [] +op close_list: [employee] [] +op string: [extra] [] +op open_list: [memory] [] +op open_instance: [memory] [] +op string: [type] [name] +op content: [in-use] [12345] +op content: [memory-use] [54321] +op string: [high-use] [-] +op content: [requests] [32145] +op close_instance: [memory] [] +op close_list: [memory] [] +op open_list: [employee] [] op open_instance: [employee] [] op string: [first-name] [Terry] op string: [last-name] [Jones] Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.H.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.H.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.H.out Sun May 29 01:40:19 2016 (r300923) @@ -1 +1 @@ -
      Terry
      Jones
      works in dept #
      660
      Leslie
      Patterson
      works in dept #
      341
      Ashley
      Smith
      works in dept #
      1440
      \ No newline at end of file +
      [
      ]
      Type
      InUse
      MemUse
      HighUse
      Requests
      Size(s)
      name
      12345
      54321
      K
      -
      32145
      Terry
      Jones
      works in dept #
      660
      Leslie
      Patterson
      works in dept #
      341
      Ashley
      Smith
      works in dept #
      1440
      done
      \ No newline at end of file Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.HIPx.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.HIPx.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.HIPx.out Sun May 29 01:40:19 2016 (r300923) @@ -1,4 +1,35 @@
      +
      [
      +
      +
      ]
      +
      +
      +
      Type
      +
      +
      InUse
      +
      +
      MemUse
      +
      +
      HighUse
      +
      +
      Requests
      +
      +
      Size(s)
      +
      +
      +
      name
      +
      +
      12345
      +
      +
      54321
      +
      K
      +
      +
      -
      +
      +
      32145
      +
      +
      +
      Terry
      Jones
      @@ -19,3 +50,6 @@
      works in dept #
      1440
      +
      +
      done
      +
      Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.HP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.HP.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.HP.out Sun May 29 01:40:19 2016 (r300923) @@ -1,4 +1,35 @@
      +
      [
      +
      +
      ]
      +
      +
      +
      Type
      +
      +
      InUse
      +
      +
      MemUse
      +
      +
      HighUse
      +
      +
      Requests
      +
      +
      Size(s)
      +
      +
      +
      name
      +
      +
      12345
      +
      +
      54321
      +
      K
      +
      +
      -
      +
      +
      32145
      +
      +
      +
      Terry
      Jones
      @@ -19,3 +50,6 @@
      works in dept #
      1440
      +
      +
      done
      +
      Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.J.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.J.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.J.out Sun May 29 01:40:19 2016 (r300923) @@ -1,2 +1,2 @@ -{"employees": {"employee": [{"first-name":"Terry","last-name":"Jones","department":660}, {"first-name":"Leslie","last-name":"Patterson","department":341}, {"first-name":"Ashley","last-name":"Smith","department":1440}]} +{"employees": {"employee": [],"extra":"", "memory": [{"type":"name","in-use":12345,"memory-use":54321,"high-use":"-","requests":32145}], "employee": [{"first-name":"Terry","last-name":"Jones","department":660}, {"first-name":"Leslie","last-name":"Patterson","department":341}, {"first-name":"Ashley","last-name":"Smith","department":1440}]} } Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.JP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.JP.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.JP.out Sun May 29 01:40:19 2016 (r300923) @@ -1,6 +1,18 @@ { "employees": { "employee": [ + ], + "extra": "", + "memory": [ + { + "type": "name", + "in-use": 12345, + "memory-use": 54321, + "high-use": "-", + "requests": 32145 + } + ], + "employee": [ { "first-name": "Terry", "last-name": "Jones", Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.T.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.T.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.T.out Sun May 29 01:40:19 2016 (r300923) @@ -1,3 +1,7 @@ +[] + Type InUse MemUse HighUse Requests Size(s) + name 12345 54321K - 32145 Terry Jones works in dept #660 Leslie Patterson works in dept #341 Ashley Smith works in dept #1440 +done Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.X.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.X.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.X.out Sun May 29 01:40:19 2016 (r300923) @@ -1 +1 @@ -TerryJones660LesliePatterson341AshleySmith1440 \ No newline at end of file +name1234554321-32145TerryJones660LesliePatterson341AshleySmith1440 \ No newline at end of file Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_03.XP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_03.XP.out Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_03.XP.out Sun May 29 01:40:19 2016 (r300923) @@ -1,4 +1,12 @@ + + + name + 12345 + 54321 + - + 32145 + Terry Jones Modified: vendor/Juniper/libxo/dist/tests/core/test_03.c ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/test_03.c Sun May 29 01:38:12 2016 (r300922) +++ vendor/Juniper/libxo/dist/tests/core/test_03.c Sun May 29 01:40:19 2016 (r300923) @@ -25,6 +25,9 @@ int info_count = (sizeof(info) / sizeof( int main (int argc, char **argv) { + unsigned opt_count = 1; + unsigned opt_extra = 0; + struct employee { const char *e_first; const char *e_last; @@ -34,24 +37,68 @@ main (int argc, char **argv) { "Leslie", "Patterson", 341 }, { "Ashley", "Smith", 1440 }, { NULL, NULL } - }, *ep = employees; + }, *ep; argc = xo_parse_args(argc, argv); if (argc < 0) return 1; + for (argc = 1; argv[argc]; argc++) { + if (strcmp(argv[argc], "count") == 0) { + if (argv[argc + 1]) + opt_count = atoi(argv[++argc]); + } else if (strcmp(argv[argc], "extra") == 0) { + if (argv[argc + 1]) + opt_extra = atoi(argv[++argc]); + } + } + xo_set_info(NULL, info, info_count); xo_open_container("employees"); xo_open_list("employee"); - for ( ; ep->e_first; ep++) { - xo_open_instance("employee"); - xo_emit("{:first-name} {:last-name} works in dept #{:department/%u}\n", - ep->e_first, ep->e_last, ep->e_dept); - xo_close_instance("employee"); + xo_emit("[{:extra/%*s}]\n", opt_extra, ""); + + xo_emit("{T:/%13s} {T:/%5s} {T:/%6s} {T:/%7s} {T:/%8s} {T:Size(s)}\n", + "Type", "InUse", "MemUse", "HighUse", "Requests"); + xo_open_list("memory"); + xo_open_instance("memory"); + +#define PRIu64 "llu" +#define TO_ULL(_x) ((unsigned long long) _x) + xo_emit("{k:type/%13s} {:in-use/%5" PRIu64 "} " + "{:memory-use/%5" PRIu64 "}{U:K} {:high-use/%7s} " + "{:requests/%8" PRIu64 "} ", + "name", TO_ULL(12345), TO_ULL(54321), "-", TO_ULL(32145)); + + int first = 1, i; +#if 0 + xo_open_list("size"); + for (i = 0; i < 32; i++) { + if (!first) + xo_emit(","); + xo_emit("{l:size/%d}", 1 << (i + 4)); + first = 0; + } + xo_close_list("size"); +#endif + xo_close_instance("memory"); + xo_emit("\n"); + xo_close_list("memory"); + + while (opt_count-- != 0) { + for (ep = employees; ep->e_first; ep++) { + xo_open_instance("employee"); + xo_emit("{:first-name} {:last-name} works in " + "dept #{:department/%u}\n", + ep->e_first, ep->e_last, ep->e_dept); + xo_close_instance("employee"); + } } + xo_emit("done\n"); + xo_close_list("employee"); xo_close_container("employees"); From owner-svn-src-vendor@freebsd.org Sun May 29 01:40:49 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9EC7B52038; Sun, 29 May 2016 01:40:49 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DDD910D1; Sun, 29 May 2016 01:40:49 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4T1emht096049; Sun, 29 May 2016 01:40:48 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4T1emK4096048; Sun, 29 May 2016 01:40:48 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201605290140.u4T1emK4096048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Sun, 29 May 2016 01:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r300924 - vendor/Juniper/libxo/0.6.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 01:40:49 -0000 Author: phil Date: Sun May 29 01:40:48 2016 New Revision: 300924 URL: https://svnweb.freebsd.org/changeset/base/300924 Log: Tag libxo 0.6.2 Added: - copied from r300923, vendor/Juniper/libxo/dist/ Directory Properties: vendor/Juniper/libxo/0.6.2/ (props changed) From owner-svn-src-vendor@freebsd.org Sun May 29 02:22:13 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE585B52CD8; Sun, 29 May 2016 02:22:13 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B88E21BE6; Sun, 29 May 2016 02:22:13 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4T2MCuu012248; Sun, 29 May 2016 02:22:12 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4T2MCNd012247; Sun, 29 May 2016 02:22:12 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201605290222.u4T2MCNd012247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Sun, 29 May 2016 02:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r300929 - vendor/Juniper/libxo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 02:22:14 -0000 Author: phil Date: Sun May 29 02:22:12 2016 New Revision: 300929 URL: https://svnweb.freebsd.org/changeset/base/300929 Log: Update import script Reviewed by: sjg (mentor) Approved by: sjg Modified: vendor/Juniper/libxo/import.sh Modified: vendor/Juniper/libxo/import.sh ============================================================================== --- vendor/Juniper/libxo/import.sh Sun May 29 02:11:10 2016 (r300928) +++ vendor/Juniper/libxo/import.sh Sun May 29 02:22:12 2016 (r300929) @@ -13,11 +13,6 @@ # PROJECT=libxo -MAKEOBJDIRPREFIX=/tank/home/phil/work/bsd/base/head/obj/ -export MAKEOBJDIRPREFIX -EDITOR=vi -VISUAL=vi -export EDITOR VISUAL #"global" vars # Set SVN variables @@ -39,9 +34,19 @@ Cd() { info "Directory =" `pwd` } +siginfo() { + if [ ! -z "$CMD" ]; then + info "CMD is $CMD" + fi +} + +trap 'siginfo' SIGINFO +trap 'siginfo' SIGCONT + run() { desc="$1" cmd="$2" + CMD="$2" if [ "$DOC" = doc ]; then echo " == $desc" @@ -95,6 +100,7 @@ option_parsing() { -p) PROJECT=$2; shift 2;; -P) PR=$2; shift 2;; -r) REVIEWER=$2; shift 2;; + -u) UPDATE=no; shift;; -v) VERS=$2; shift 2;; -y) OKAY=yes; shift;; @@ -122,6 +128,17 @@ shift $? Cd `dirname $0` CWD=`pwd` +TOP=`echo $CWD | sed 's:/vendor/.*::'` +info "TOP = $TOP" + +Cd $TOP +HEAD=$TOP/head +info "HEAD = $HEAD" + +mkdir -p ../obj +MAKEOBJDIRPREFIX=`cd ../obj; pwd` +export MAKEOBJDIRPREFIX + if [ -z "$VENDOR_DIR" ]; then VENDOR_DIR=`echo $CWD | sed 's:.*/vendor/::'` fi @@ -131,9 +148,20 @@ fi info "CWD = $CWD" info "VENDOR_DIR = $VENDOR_DIR" info "VERS = $VERS" +DATESTAMP=`date "+%Y-%m-%d-%H-%M"` [ -z "$VERS" ] && Error "missing version argument (-v)" +run "show any local changes" "diff -rbu $CWD/dist $HEAD/contrib/libxo" + +Cd $HEAD +run "updating all" "svn update" + +if [ ! -z "$UPDATE" ]; then + run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP.before make -DNO_CLEAN MK_TESTS=no buildworld" +fi + +Cd $CWD mkdir -p ~/tars # We use the source tarball from git since it has no frills @@ -229,7 +257,7 @@ run "making list of files in existing tr "(cd dist && $RSVN list -R) | grep -v '/$' | sort > $TF.old" run "making list of files in incoming tree" \ - "(cd $BASE && find . -type f ) | cut -c 3- | $SEDNUKE | sort > $TF.new" + "(echo 'x .svnignore' ; cd $BASE && find . -type f ) | cut -c 3- | $SEDNUKE | sort > $TF.new" run "making list of deleted files" "comm -23 $TF.old $TF.new | tee $TF.rmlist" run "making list of new files" "comm -13 $TF.old $TF.new | tee $TF.addlist" @@ -260,9 +288,7 @@ run "build for real" \ # Move over and build the source tree -Cd $CWD/../../../head -HEAD=`pwd` -info "HEAD = $HEAD" +Cd $HEAD run "copying xo_config.h" "(echo '/* \$FreeBSD\$ */' ; cat $CWD/dist/build/libxo/xo_config.h ) > $HEAD/lib/libxo/xo_config.h" run "copying add.man" "(echo '.\\\" \$FreeBSD\$' ; cat $CWD/dist/build/libxo/add.man ) > $HEAD/lib/libxo/add.man" @@ -273,8 +299,7 @@ run "copying add.man" "(echo '.\\\" \$Fr #run "making build dir '$dir'" "make LIBXOSRC=$CWD/dist" #done -DATESTAMP=`date "+%Y-%m-%d-%H-%M"` -run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP make -DNO_CLEAN buildworld LIBXOSRC=$CWD/dist" +run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP make -DNO_CLEAN MK_TESTS=no buildworld LIBXOSRC=$CWD/dist" # Okay, so now it all builds!! Now we can start committing.... From owner-svn-src-vendor@freebsd.org Sun May 29 16:18:56 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C002BB53F15; Sun, 29 May 2016 16:18:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B3FD17A0; Sun, 29 May 2016 16:18:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4TGItQJ024589; Sun, 29 May 2016 16:18:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4TGItNJ024583; Sun, 29 May 2016 16:18:55 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201605291618.u4TGItNJ024583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 29 May 2016 16:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r300961 - vendor/one-true-awk/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 16:18:56 -0000 Author: pfg Date: Sun May 29 16:18:55 2016 New Revision: 300961 URL: https://svnweb.freebsd.org/changeset/base/300961 Log: one-true-awk: replace 0 with NULL for pointers Also remove a redundant semicolon. Submitted upstream already. Modified: vendor/one-true-awk/dist/b.c vendor/one-true-awk/dist/lex.c vendor/one-true-awk/dist/maketab.c vendor/one-true-awk/dist/parse.c vendor/one-true-awk/dist/run.c vendor/one-true-awk/dist/tran.c Modified: vendor/one-true-awk/dist/b.c ============================================================================== --- vendor/one-true-awk/dist/b.c Sun May 29 16:10:01 2016 (r300960) +++ vendor/one-true-awk/dist/b.c Sun May 29 16:18:55 2016 (r300961) @@ -82,11 +82,11 @@ fa *makedfa(const char *s, int anchor) / fa *pfa; static int now = 1; - if (setvec == 0) { /* first time through any RE */ + if (setvec == NULL) { /* first time through any RE */ maxsetvec = MAXLIN; setvec = (int *) malloc(maxsetvec * sizeof(int)); tmpset = (int *) malloc(maxsetvec * sizeof(int)); - if (setvec == 0 || tmpset == 0) + if (setvec == NULL || tmpset == NULL) overflo("out of space initializing makedfa"); } @@ -290,11 +290,11 @@ char *cclenter(const char *argp) /* add int i, c, c2; uschar *p = (uschar *) argp; uschar *op, *bp; - static uschar *buf = 0; + static uschar *buf = NULL; static int bufsz = 100; op = p; - if (buf == 0 && (buf = (uschar *) malloc(bufsz)) == NULL) + if (buf == NULL && (buf = (uschar *) malloc(bufsz)) == NULL) FATAL("out of space for character class [%.10s...] 1", p); bp = buf; for (i = 0; (c = *p++) != 0; ) { @@ -350,7 +350,7 @@ void cfoll(fa *f, Node *v) /* enter foll maxsetvec *= 4; setvec = (int *) realloc(setvec, maxsetvec * sizeof(int)); tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int)); - if (setvec == 0 || tmpset == 0) + if (setvec == NULL || tmpset == NULL) overflo("out of space in cfoll()"); } for (i = 0; i <= f->accept; i++) @@ -391,7 +391,7 @@ int first(Node *p) /* collects initially maxsetvec *= 4; setvec = (int *) realloc(setvec, maxsetvec * sizeof(int)); tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int)); - if (setvec == 0 || tmpset == 0) + if (setvec == NULL || tmpset == NULL) overflo("out of space in first()"); } if (type(p) == EMPTYRE) { @@ -770,7 +770,7 @@ int relex(void) /* lexical analyzer for { int c, n; int cflag; - static uschar *buf = 0; + static uschar *buf = NULL; static int bufsz = 100; uschar *bp; struct charclass *cc; @@ -795,7 +795,7 @@ int relex(void) /* lexical analyzer for rlxval = c; return CHAR; case '[': - if (buf == 0 && (buf = (uschar *) malloc(bufsz)) == NULL) + if (buf == NULL && (buf = (uschar *) malloc(bufsz)) == NULL) FATAL("out of space in reg expr %.10s..", lastre); bp = buf; if (*prestr == '^') { @@ -860,7 +860,7 @@ int cgoto(fa *f, int s, int c) maxsetvec *= 4; setvec = (int *) realloc(setvec, maxsetvec * sizeof(int)); tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int)); - if (setvec == 0 || tmpset == 0) + if (setvec == NULL || tmpset == NULL) overflo("out of space in cgoto()"); } for (i = 0; i <= f->accept; i++) @@ -882,7 +882,7 @@ int cgoto(fa *f, int s, int c) maxsetvec *= 4; setvec = (int *) realloc(setvec, maxsetvec * sizeof(int)); tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int)); - if (setvec == 0 || tmpset == 0) + if (setvec == NULL || tmpset == NULL) overflo("cgoto overflow"); } if (setvec[q[j]] == 0) { Modified: vendor/one-true-awk/dist/lex.c ============================================================================== --- vendor/one-true-awk/dist/lex.c Sun May 29 16:10:01 2016 (r300960) +++ vendor/one-true-awk/dist/lex.c Sun May 29 16:18:55 2016 (r300961) @@ -170,10 +170,10 @@ int reg = 0; /* 1 => return a REGEXPR no int yylex(void) { int c; - static char *buf = 0; + static char *buf = NULL; static int bufsize = 5; /* BUG: setting this small causes core dump! */ - if (buf == 0 && (buf = (char *) malloc(bufsize)) == NULL) + if (buf == NULL && (buf = (char *) malloc(bufsize)) == NULL) FATAL( "out of space in yylex" ); if (sc) { sc = 0; @@ -358,10 +358,10 @@ int string(void) { int c, n; char *s, *bp; - static char *buf = 0; + static char *buf = NULL; static int bufsz = 500; - if (buf == 0 && (buf = (char *) malloc(bufsz)) == NULL) + if (buf == NULL && (buf = (char *) malloc(bufsz)) == NULL) FATAL("out of space for strings"); for (bp = buf; (c = input()) != '"'; ) { if (!adjbuf(&buf, &bufsz, bp-buf+2, 500, &bp, "string")) @@ -504,11 +504,11 @@ void startreg(void) /* next call to yyle int regexpr(void) { int c; - static char *buf = 0; + static char *buf = NULL; static int bufsz = 500; char *bp; - if (buf == 0 && (buf = (char *) malloc(bufsz)) == NULL) + if (buf == NULL && (buf = (char *) malloc(bufsz)) == NULL) FATAL("out of space for rex expr"); bp = buf; for ( ; (c = input()) != '/' && c != 0; ) { @@ -539,7 +539,7 @@ char ebuf[300]; char *ep = ebuf; char yysbuf[100]; /* pushback buffer */ char *yysptr = yysbuf; -FILE *yyin = 0; +FILE *yyin = NULL; int input(void) /* get next lexical input character */ { Modified: vendor/one-true-awk/dist/maketab.c ============================================================================== --- vendor/one-true-awk/dist/maketab.c Sun May 29 16:10:01 2016 (r300960) +++ vendor/one-true-awk/dist/maketab.c Sun May 29 16:18:55 2016 (r300961) @@ -149,7 +149,7 @@ int main(int argc, char *argv[]) table[p->token-FIRSTTOKEN] = p->name; printf("\nCell *(*proctab[%d])(Node **, int) = {\n", SIZE); for (i=0; innext, n++) + for (n = 0; p != NULL; p = p->nnext, n++) if (strcmp(((Cell *)(p->narg[0]))->nval, s) == 0) return n; return -1; Modified: vendor/one-true-awk/dist/run.c ============================================================================== --- vendor/one-true-awk/dist/run.c Sun May 29 16:10:01 2016 (r300960) +++ vendor/one-true-awk/dist/run.c Sun May 29 16:18:55 2016 (r300961) @@ -499,7 +499,7 @@ Cell *awkdelete(Node **a, int n) /* a[0] x = execute(a[0]); /* Cell* for symbol table */ if (!isarr(x)) return True; - if (a[1] == 0) { /* delete the elements, not the table */ + if (a[1] == NULL) { /* delete the elements, not the table */ freesymtab(x); x->tval &= ~STR; x->tval |= ARR; @@ -583,7 +583,7 @@ Cell *matchop(Node **a, int n) /* ~ and } x = execute(a[1]); /* a[1] = target text */ s = getsval(x); - if (a[0] == 0) /* a[1] == 0: already-compiled reg expr */ + if (a[0] == NULL) /* a[1] == 0: already-compiled reg expr */ i = (*mf)((fa *) a[2], s); else { y = execute(a[2]); /* a[2] = regular expr */ @@ -699,7 +699,7 @@ Cell *gettemp(void) /* get a tempcell */ FATAL("out of space for temporaries"); for(i = 1; i < 100; i++) tmps[i-1].cnext = &tmps[i]; - tmps[i-1].cnext = 0; + tmps[i-1].cnext = NULL; } x = tmps; tmps = x->cnext; @@ -734,18 +734,18 @@ Cell *substr(Node **a, int nnn) /* subs int k, m, n; char *s; int temp; - Cell *x, *y, *z = 0; + Cell *x, *y, *z = NULL; x = execute(a[0]); y = execute(a[1]); - if (a[2] != 0) + if (a[2] != NULL) z = execute(a[2]); s = getsval(x); k = strlen(s) + 1; if (k <= 1) { tempfree(x); tempfree(y); - if (a[2] != 0) { + if (a[2] != NULL) { tempfree(z); } x = gettemp(); @@ -758,7 +758,7 @@ Cell *substr(Node **a, int nnn) /* subs else if (m > k) m = k; tempfree(y); - if (a[2] != 0) { + if (a[2] != NULL) { n = (int) getfval(z); tempfree(z); } else @@ -1172,7 +1172,7 @@ Cell *pastat(Node **a, int n) /* a[0] { { Cell *x; - if (a[0] == 0) + if (a[0] == NULL) x = execute(a[1]); else { x = execute(a[0]); @@ -1209,16 +1209,16 @@ Cell *dopa2(Node **a, int n) /* a[0], a[ Cell *split(Node **a, int nnn) /* split(a[0], a[1], a[2]); a[3] is type */ { - Cell *x = 0, *y, *ap; + Cell *x = NULL, *y, *ap; char *s, *origs; int sep; - char *t, temp, num[50], *fs = 0; + char *t, temp, num[50], *fs = NULL; int n, tempstat, arg3type; y = execute(a[0]); /* source string */ origs = s = strdup(getsval(y)); arg3type = ptoi(a[3]); - if (a[2] == 0) /* fs string */ + if (a[2] == NULL) /* fs string */ fs = *FS; else if (arg3type == STRING) { /* split(str,arr,"string") */ x = execute(a[2]); @@ -1337,7 +1337,7 @@ Cell *split(Node **a, int nnn) /* split( tempfree(ap); tempfree(y); free(origs); - if (a[2] != 0 && arg3type == STRING) { + if (a[2] != NULL && arg3type == STRING) { tempfree(x); } x = gettemp(); @@ -1369,7 +1369,7 @@ Cell *ifstat(Node **a, int n) /* if (a[0 if (istrue(x)) { tempfree(x); x = execute(a[1]); - } else if (a[2] != 0) { + } else if (a[2] != NULL) { tempfree(x); x = execute(a[2]); } @@ -1421,7 +1421,7 @@ Cell *forstat(Node **a, int n) /* for (a x = execute(a[0]); tempfree(x); for (;;) { - if (a[1]!=0) { + if (a[1]!=NULL) { x = execute(a[1]); if (!istrue(x)) return(x); else tempfree(x); @@ -1503,7 +1503,7 @@ Cell *bltin(Node **a, int n) /* builtin case FCOS: u = cos(getfval(x)); break; case FATAN: - if (nextarg == 0) { + if (nextarg == NULL) { WARNING("atan2 requires two arguments; returning 1.0"); u = 1.0; } else { @@ -1564,7 +1564,7 @@ Cell *bltin(Node **a, int n) /* builtin tempfree(x); x = gettemp(); setfval(x, u); - if (nextarg != 0) { + if (nextarg != NULL) { WARNING("warning: function has too many arguments"); for ( ; nextarg; nextarg = nextarg->nnext) execute(nextarg); @@ -1578,7 +1578,7 @@ Cell *printstat(Node **a, int n) /* prin Cell *y; FILE *fp; - if (a[1] == 0) /* a[1] is redirection operator, a[2] is file */ + if (a[1] == NULL) /* a[1] is redirection operator, a[2] is file */ fp = stdout; else fp = redirect(ptoi(a[1]), a[2]); @@ -1591,7 +1591,7 @@ Cell *printstat(Node **a, int n) /* prin else fputs(*OFS, fp); } - if (a[1] != 0) + if (a[1] != NULL) fflush(fp); if (ferror(fp)) FATAL("write error on %s", filename(fp)); @@ -1650,7 +1650,7 @@ FILE *openfile(int a, const char *us) { const char *s = us; int i, m; - FILE *fp = 0; + FILE *fp = NULL; if (*s == '\0') FATAL("null file name in print or getline"); @@ -1665,7 +1665,7 @@ FILE *openfile(int a, const char *us) return NULL; for (i=0; i < nfiles; i++) - if (files[i].fp == 0) + if (files[i].fp == NULL) break; if (i >= nfiles) { struct files *nf; @@ -1782,7 +1782,7 @@ Cell *sub(Node **a, int nnn) /* substitu FATAL("out of memory in sub"); x = execute(a[3]); /* target string */ t = getsval(x); - if (a[0] == 0) /* 0 => a[1] is already-compiled regexpr */ + if (a[0] == NULL) /* 0 => a[1] is already-compiled regexpr */ pfa = (fa *) a[1]; /* regular expression */ else { y = execute(a[1]); @@ -1822,7 +1822,7 @@ Cell *sub(Node **a, int nnn) /* substitu if (pb > buf + bufsz) FATAL("sub result2 %.30s too big; can't happen", buf); setsval(x, buf); /* BUG: should be able to avoid copy */ - result = True;; + result = True; } tempfree(x); tempfree(y); @@ -1845,7 +1845,7 @@ Cell *gsub(Node **a, int nnn) /* global num = 0; x = execute(a[3]); /* target string */ t = getsval(x); - if (a[0] == 0) /* 0 => a[1] is already-compiled regexpr */ + if (a[0] == NULL) /* 0 => a[1] is already-compiled regexpr */ pfa = (fa *) a[1]; /* regular expression */ else { y = execute(a[1]); Modified: vendor/one-true-awk/dist/tran.c ============================================================================== --- vendor/one-true-awk/dist/tran.c Sun May 29 16:10:01 2016 (r300960) +++ vendor/one-true-awk/dist/tran.c Sun May 29 16:18:55 2016 (r300961) @@ -174,7 +174,7 @@ void freesymtab(Cell *ap) /* free a symb free(cp); tp->nelem--; } - tp->tab[i] = 0; + tp->tab[i] = NULL; } if (tp->nelem != 0) WARNING("can't happen: inconsistent element count freeing %s", ap->nval); From owner-svn-src-vendor@freebsd.org Sun May 29 16:22:30 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE2B0B53057; Sun, 29 May 2016 16:22:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A466E1B40; Sun, 29 May 2016 16:22:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4TGMT16028250; Sun, 29 May 2016 16:22:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4TGMT9Z028248; Sun, 29 May 2016 16:22:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201605291622.u4TGMT9Z028248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 29 May 2016 16:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r300962 - vendor/openresolv/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 16:22:31 -0000 Author: pfg Date: Sun May 29 16:22:29 2016 New Revision: 300962 URL: https://svnweb.freebsd.org/changeset/base/300962 Log: openresolv: Minor spelling fixes Upstreamed: 12cb1c1fb10df1072116ccf472f40c1bba782fc3 Modified: vendor/openresolv/dist/resolvconf.8.in vendor/openresolv/dist/resolvconf.in Modified: vendor/openresolv/dist/resolvconf.8.in ============================================================================== --- vendor/openresolv/dist/resolvconf.8.in Sun May 29 16:18:55 2016 (r300961) +++ vendor/openresolv/dist/resolvconf.8.in Sun May 29 16:22:29 2016 (r300962) @@ -128,7 +128,7 @@ on the Here are some options for the above commands:- .Bl -tag -width indent .It Fl f -Ignore non existant interfaces. +Ignore non existent interfaces. Only really useful for deleting interfaces. .It Fl m Ar metric Set the metric of the interface when adding it, default of 0. Modified: vendor/openresolv/dist/resolvconf.in ============================================================================== --- vendor/openresolv/dist/resolvconf.in Sun May 29 16:18:55 2016 (r300961) +++ vendor/openresolv/dist/resolvconf.in Sun May 29 16:22:29 2016 (r300962) @@ -92,7 +92,7 @@ usage() -u Run updates from our current DNS information Options: - -f Ignore non existant interfaces + -f Ignore non existent interfaces -m metric Give the added DNS information a metric -p Mark the interface as private -x Mark the interface as exclusive @@ -884,7 +884,7 @@ export RESOLVCONF DOMAINS SEARCH NAMESER retval=0 # Run scripts in the same directory resolvconf is run from -# in case any scripts accidently dump files in the wrong place. +# in case any scripts accidentally dump files in the wrong place. cd "$_PWD" for script in "$LIBEXECDIR"/*; do if [ -f "$script" ]; then From owner-svn-src-vendor@freebsd.org Sun May 29 17:40:28 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B351AB5432C; Sun, 29 May 2016 17:40:28 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B49E18A3; Sun, 29 May 2016 17:40:28 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id 74epbb07UBLFm74eqbqQGo; Sun, 29 May 2016 11:37:50 -0600 X-Authority-Analysis: v=2.2 cv=W5d6blek c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=yrkiwgmsf1kA:10 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=AxjDp2VuDppg-QZVQ5MA:9 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id C6E1613752; Sun, 29 May 2016 10:37:47 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u4THblHE090936; Sun, 29 May 2016 10:37:47 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201605291737.u4THblHE090936@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Pedro F. Giffuni" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist In-Reply-To: Message from "Pedro F. Giffuni" of "Sun, 29 May 2016 16:18:55 -0000." <201605291618.u4TGItNJ024583@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 29 May 2016 10:37:47 -0700 X-CMAE-Envelope: MS4wfHAoodHcsDFMrCKvH/T+mTOh4ktDwAwLA0q8Q5BKrfS64ESZQB6dY8v07IPyLZIz4CZEvMmQdybziAdd1FfMJqqv+IQ6VbW40IFltw20pBQwsX3jBi4a eRORqNmCMF4cDk2I9BE8LenCFTByqOVCr0ffit59l1tSC4jHZqcOjluXJPCTWTd3TEHyKNudMEB6vRzOpBa4+8EBIzqDjRwUPpprmdPEfv/x2Mf5TqEVjxh3 w1uV9J9+ubAdH/+H75AFO7f3FVtAw6lseAwb5B+QnYADziOY1/GuDFT5pjk27HE7 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 17:40:28 -0000 In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. Giffuni" w rites: > Author: pfg > Date: Sun May 29 16:18:55 2016 > New Revision: 300961 > URL: https://svnweb.freebsd.org/changeset/base/300961 > > Log: > one-true-awk: replace 0 with NULL for pointers > > Also remove a redundant semicolon. > Submitted upstream already. > > Modified: > vendor/one-true-awk/dist/b.c > vendor/one-true-awk/dist/lex.c > vendor/one-true-awk/dist/maketab.c > vendor/one-true-awk/dist/parse.c > vendor/one-true-awk/dist/run.c > vendor/one-true-awk/dist/tran.c > Was this commit and r300962 obtained from the upline or vendor or were these commits local to FreeBSD only? -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-vendor@freebsd.org Sun May 29 18:02:44 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CB16B5469A for ; Sun, 29 May 2016 18:02:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm34-vm5.bullet.mail.bf1.yahoo.com (nm34-vm5.bullet.mail.bf1.yahoo.com [72.30.239.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 276ED12EA for ; Sun, 29 May 2016 18:02:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1464544956; bh=cE9AYiVasGfG1HPQbCvYeIER4FpcWTKFFWRbysg63wQ=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=l4Wun2IzFLla+mO8iVgKRgVgE6c7cf0fRpGEs5aD5lmkaGGPPtgZrTnoLJ3L+20ADUV41koR3UNbRg9YMDpTPYzqWguA7ov7TcliJ0GhSHpIpI88NPuW/c4vBbJOv9JKDgXqYpnlxleuaUyMkYz/bUBm+VEoMq7iyn1tGpu2PxcDJ+o80PpUgLD5pprJd4lsR0/n2viJqlWeFOUjCxF+2FVv9cLQhZhUDMktdYxq/Nsta8zeg5NsH6znEZocDwo9HSx2RwArJt/09o4dTQS59bf7ggunzic78d+G544zDrf8lxEOM/4aE5+lgQ5gG92qHvahc04YQBTRPmBAZstb1Q== Received: from [98.139.170.179] by nm34.bullet.mail.bf1.yahoo.com with NNFMP; 29 May 2016 18:02:36 -0000 Received: from [68.142.230.72] by tm22.bullet.mail.bf1.yahoo.com with NNFMP; 29 May 2016 18:02:36 -0000 Received: from [127.0.0.1] by smtp229.mail.bf1.yahoo.com with NNFMP; 29 May 2016 18:02:36 -0000 X-Yahoo-Newman-Id: 95575.70434.bm@smtp229.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: dEPMDtcVM1ntxfu16yN9Ng5WypogCiznQ7kBvm0t2QC6Wu2 OgNmMOiuLs6pDl0m1eHZKuSExb.hsv3.C_VPN6I1V9LcO7XRFvy9mJu0Nxa8 xL8mr7TgDvNC8gDrW_MSckWUDD9miQRpQ3B9lq1pB5EtAZaDV1anAI5T21cO Zrx.jKlIQEfQbafZZxNv2tNYmuZ.shB_UBQc3VEyrmJzs9oo51Pl8YuvaGYM _Cij6tJkXDF8hT98a7Te7qwhEFGc2wkf2wW5mFlpo4A8dU69QE6aCK9uAzTO qq1PVxgTVY1vNb.GB89j6fIWR0haJ1P10w6jX8kpORZhp93Pjn2.YozVVcE4 uJ7B_yPsLC993RFmchj0QJpBjc94nalO1UecnFD41vJEFKHcgeq0PdFA3C9l v0zWdRZTd79xF6aE5IYdt5hC5xSNtkXsRZcALoslb30HoelowLXVGxKnpHi5 mjqeG2ulLGdLei_ORLyMBYEYNfnhH_ggVen258DOFXc1HJvZh3daZg4s1B0g BwMU4tovNNYDOZ2QGmXHTUxGEM4j4jv.n X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist To: Cy Schubert References: <201605291737.u4THblHE090936@slippy.cwsent.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org From: Pedro Giffuni Message-ID: <574B2EAC.3010908@FreeBSD.org> Date: Sun, 29 May 2016 13:02:20 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201605291737.u4THblHE090936@slippy.cwsent.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 18:02:44 -0000 On 29/05/2016 12:37, Cy Schubert wrote: > In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. > Giffuni" w > rites: >> Author: pfg >> Date: Sun May 29 16:18:55 2016 >> New Revision: 300961 >> URL: https://svnweb.freebsd.org/changeset/base/300961 >> >> Log: >> one-true-awk: replace 0 with NULL for pointers >> >> Also remove a redundant semicolon. >> Submitted upstream already. >> >> Modified: >> vendor/one-true-awk/dist/b.c >> vendor/one-true-awk/dist/lex.c >> vendor/one-true-awk/dist/maketab.c >> vendor/one-true-awk/dist/parse.c >> vendor/one-true-awk/dist/run.c >> vendor/one-true-awk/dist/tran.c >> > Was this commit and r300962 obtained from the upline or vendor or were > these commits local to FreeBSD only? > > There is no public awk public repository AFAICT, but bwk acknowledged the submission. The change to openresolv was merged to the public repository. Pedro. From owner-svn-src-vendor@freebsd.org Sun May 29 18:18:00 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EA33B54981; Sun, 29 May 2016 18:18:00 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B934B1AF0; Sun, 29 May 2016 18:17:59 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id 75HabeMWIwW8H75HbbBB3M; Sun, 29 May 2016 12:17:52 -0600 X-Authority-Analysis: v=2.2 cv=ZrKvEJzG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=yrkiwgmsf1kA:10 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=kJsLFcyY_H0TLal0RDUA:9 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id D597413751; Sun, 29 May 2016 11:17:49 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u4TIHnN7040344; Sun, 29 May 2016 11:17:49 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201605291817.u4TIHnN7040344@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Pedro Giffuni cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist In-Reply-To: Message from Pedro Giffuni of "Sun, 29 May 2016 13:02:20 -0500." <574B2EAC.3010908@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 29 May 2016 11:17:49 -0700 X-CMAE-Envelope: MS4wfDFuRcC0htg8yFeag8vJLnLcd5LCFhpLtWCUXhMHzHWEgGLpTxqS9KuMYTt/EJ5mloLApXmPYFy9aFGowdD/2Gdh91M0BeEq0Au7lLG59K+CSUzMfEl2 Rm69T+ACQ5nHXRBDCragziLVmx11ctHGIk5tMIWynyVved0qcK7Ld1WQncvYvHTs+j4wznBCMI/C1kM+0T1e6G/T7dWiJpO1UbaWxpL01jYtscEXmodqQw7X NU0n5oKOV/44/BrrEI2lpXBRB/Xf2gDJS9SKrPckFNMSYpYkhTuEXJXZeejZ5Y+R X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 18:18:00 -0000 In message <574B2EAC.3010908@FreeBSD.org>, Pedro Giffuni writes: > > > > On 29/05/2016 12:37, Cy Schubert wrote: > > In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. > > Giffuni" w > > rites: > >> Author: pfg > >> Date: Sun May 29 16:18:55 2016 > >> New Revision: 300961 > >> URL: https://svnweb.freebsd.org/changeset/base/300961 > >> > >> Log: > >> one-true-awk: replace 0 with NULL for pointers > >> > >> Also remove a redundant semicolon. > >> Submitted upstream already. > >> > >> Modified: > >> vendor/one-true-awk/dist/b.c > >> vendor/one-true-awk/dist/lex.c > >> vendor/one-true-awk/dist/maketab.c > >> vendor/one-true-awk/dist/parse.c > >> vendor/one-true-awk/dist/run.c > >> vendor/one-true-awk/dist/tran.c > >> > > Was this commit and r300962 obtained from the upline or vendor or were > > these commits local to FreeBSD only? > > > > > There is no public awk public repository AFAICT, but bwk acknowledged > the submission. > > The change to openresolv was merged to the public repository. As they've acknowledged the submissions, can you please tag the new versions of awk and openresolve with the correct upstream version numbers, please? -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-vendor@freebsd.org Sun May 29 19:06:12 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AFC6B530D2; Sun, 29 May 2016 19:06:12 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 200001005; Sun, 29 May 2016 19:06:11 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id 762KbbQbaBLFm762Lbqfwx; Sun, 29 May 2016 13:06:10 -0600 X-Authority-Analysis: v=2.2 cv=W5d6blek c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=yrkiwgmsf1kA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=dg3j_vcu91Rqpd1L6HcA:9 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 3A89313751; Sun, 29 May 2016 12:06:08 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u4TJ67AT082836; Sun, 29 May 2016 12:06:07 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201605291906.u4TJ67AT082836@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Pedro Giffuni , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist In-Reply-To: Message from Cy Schubert of "Sun, 29 May 2016 11:17:49 -0700." <201605291817.u4TIHnN7040344@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 29 May 2016 12:06:07 -0700 X-CMAE-Envelope: MS4wfJ4QudghKroVlQYD6E5Y4oKLaDSIXe6qixWJlu7+WjAruluZSb1wDZrjGxcHKCa4QsjRo1TJNyIccxWkfSBsgoJqAYkOc+X02BMQS123O2uFOfQTgiqp REHfgavg60bIuTXXPIyYzs7lxCfLkGqxc8Rkd+HzOLp+gTOYg2DB+OrPP+Ir1i2R2yhBLrvjA6I3SnUpqEDgPuhUAE1oOGtkTV4JJz+fjeRlvDBUL6Lw9oW/ V2uALGwy7jGATegWv344q3DdnuHiKqyrY1Vf2gWMn/zKfC6uZsBTjQEq+xpNS7Q9 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 19:06:12 -0000 In message <201605291817.u4TIHnN7040344@slippy.cwsent.com>, Cy Schubert writes: > In message <574B2EAC.3010908@FreeBSD.org>, Pedro Giffuni writes: > > > > > > > > On 29/05/2016 12:37, Cy Schubert wrote: > > > In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. > > > Giffuni" w > > > rites: > > >> Author: pfg > > >> Date: Sun May 29 16:18:55 2016 > > >> New Revision: 300961 > > >> URL: https://svnweb.freebsd.org/changeset/base/300961 > > >> > > >> Log: > > >> one-true-awk: replace 0 with NULL for pointers > > >> > > >> Also remove a redundant semicolon. > > >> Submitted upstream already. > > >> > > >> Modified: > > >> vendor/one-true-awk/dist/b.c > > >> vendor/one-true-awk/dist/lex.c > > >> vendor/one-true-awk/dist/maketab.c > > >> vendor/one-true-awk/dist/parse.c > > >> vendor/one-true-awk/dist/run.c > > >> vendor/one-true-awk/dist/tran.c > > >> > > > Was this commit and r300962 obtained from the upline or vendor or were > > > these commits local to FreeBSD only? > > > > > > > > There is no public awk public repository AFAICT, but bwk acknowledged > > the submission. > > > > The change to openresolv was merged to the public repository. > > As they've acknowledged the submissions, can you please tag the new > versions of awk and openresolve with the correct upstream version numbers, > please? Additionally, if there are no new version numbers, what reason is there for polluting the vendor branch with local patches to it? Is not the vendor branch for virgin code retrieved (or received) from the vendor (or upline)? -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-vendor@freebsd.org Sun May 29 19:22:26 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BA31B53611; Sun, 29 May 2016 19:22:26 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E27B21B52; Sun, 29 May 2016 19:22:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id 76HxbbV2JBLFm76Hybqj1U; Sun, 29 May 2016 13:22:19 -0600 X-Authority-Analysis: v=2.2 cv=W5d6blek c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=yrkiwgmsf1kA:10 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=QvAgiI5a5Fp75Pt56YEA:9 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 9959513751; Sun, 29 May 2016 12:22:17 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u4TJMHUZ069145; Sun, 29 May 2016 12:22:17 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201605291922.u4TJMHUZ069145@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Pedro Giffuni cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist In-Reply-To: Message from Pedro Giffuni of "Sun, 29 May 2016 14:08:59 -0500." <574B3E4B.2020501@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 29 May 2016 12:22:16 -0700 X-CMAE-Envelope: MS4wfLXPICTXZfzp8DMk99hrDZkPZ2O0bul+yoRV2QOdgBMEqy+KosBgBL7FpHfBJX3dCpfLoQoC4rIKKCex4qDzqrDQWwNsnRbnbziG8kfLsf3FHSEDlV4L 4ahT7OKGpaVrqBEy8w7FuqL3AINlq8MssIeYVnUqJIVRnp8+2w3ZDpi3rmZfR9IeIWJNCofeznf8W2VTnlNztkXx2fDFFDnOlkG19DLY+Sw8UTwTpGN1TLRn SuhnIc4GjPFrRxVQK9fhwjDtC73L6QuHGcSddP2DkXEZLCJzdGAV4DBJYC26vuIm X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 19:22:26 -0000 In message <574B3E4B.2020501@FreeBSD.org>, Pedro Giffuni writes: > On 29/05/2016 13:17, Cy Schubert wrote: > > In message <574B2EAC.3010908@FreeBSD.org>, Pedro Giffuni writes: > >> > >> > >> On 29/05/2016 12:37, Cy Schubert wrote: > >>> In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. > >>> Giffuni" w > >>> rites: > >>>> Author: pfg > >>>> Date: Sun May 29 16:18:55 2016 > >>>> New Revision: 300961 > >>>> URL: https://svnweb.freebsd.org/changeset/base/300961 > >>>> > >>>> Log: > >>>> one-true-awk: replace 0 with NULL for pointers > >>>> > >>>> Also remove a redundant semicolon. > >>>> Submitted upstream already. > >>>> > >>>> Modified: > >>>> vendor/one-true-awk/dist/b.c > >>>> vendor/one-true-awk/dist/lex.c > >>>> vendor/one-true-awk/dist/maketab.c > >>>> vendor/one-true-awk/dist/parse.c > >>>> vendor/one-true-awk/dist/run.c > >>>> vendor/one-true-awk/dist/tran.c > >>>> > >>> Was this commit and r300962 obtained from the upline or vendor or were > >>> these commits local to FreeBSD only? > >>> > >>> > >> There is no public awk public repository AFAICT, but bwk acknowledged > >> the submission. > >> > >> The change to openresolv was merged to the public repository. > > As they've acknowledged the submissions, can you please tag the new > > versions of awk and openresolve with the correct upstream version numbers, > > please? > > > That's an impossible request as there are no "correct upstream version > numbers". > > In the case of openresolv, I included the repository revision, but > checksums have > no chronological sense and should be avoided for tags. > > In this case using tags for anything other than official releases would > be a mess. > As stated in our subversion primer (5.4.4): > > "Vendor patches should be committed to the vendor branch, and merged > from there to head. If the patch addresses an issue in a new release > that is currently being imported, it /must not/ be committed along with > the new release: the release must be imported and tagged first, then the > patch can be applied and committed. There is no need to re-tag the > vendor sources after committing the patch." > That doesn't address local patches. These were local patches that were upstreamed. I rea this as, if one got a patch from an upstream VCS repo but these were our local patches. At the very least the commit logs should reference the upstream commit log entry (which the openresolve one did but the awk commit did not). I think that a clear audit trail back to the vendor VCS, bug#, etc., be documented in the commit log. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-vendor@freebsd.org Sun May 29 19:26:32 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88DEBB537AA for ; Sun, 29 May 2016 19:26:32 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm42-vm10.bullet.mail.bf1.yahoo.com (nm42-vm10.bullet.mail.bf1.yahoo.com [216.109.114.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41CBC1ED6 for ; Sun, 29 May 2016 19:26:32 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1464549665; bh=6D8GUEL+D/Gl+o3QIKC0FpORYIauHFmpltT2+7lx0ic=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=Neu2VPpq9Sd0KPT4sHQy+4nwq377/K3waChvOEJJxGaDQmWa1SAVqeL1dziU1ZnzDrYcK7m2IqJi+vvU1UhstMPoCiyzSxyKe74sfwkvn8KitIjl71Yo0xMXzfcHFGXVLne9Vk5CZDmvOy8Tx7JOgI5mRD9T6E68k4AIPT2E0V+zSQGKYIDHrzg9+b1bifjdNXn5QBkctiAi4a9oTMcBhw4ZBW2qCU6e1m0m0R/vOR669NVuHf+7fry6yFCKeTY21TJSDyidW83nYoQqg2JEIPGgibicmz2mAjBsy/g3fSIn61TXE/b9fXGelsh+gMYvc9ICBfIxSIzQE+hKdejy7g== Received: from [66.196.81.173] by nm42.bullet.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:21:05 -0000 Received: from [98.139.211.161] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:21:05 -0000 Received: from [127.0.0.1] by smtp218.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:21:05 -0000 X-Yahoo-Newman-Id: 662170.84786.bm@smtp218.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: eRt8E8AVM1kafWbb6gZsu8E4cSIqOMjWzt0QC4KET3pNnpv uSHrPp6BbkZ_jF3DG53yxI47QBWK6MpIS3dIAlZdazLhI5sgRlK32hWPg2CF eGPTPiuYoJTga.ZzFwhymENpuTdUqpcYNLjYF8RCNYrtHFafX6DdUB7z15Pv xntlRMPoOeWRtYbp7qQ2jM32jk2A1TyxZZJt_xPdbTp2G0UsEYCTIzEUx4mM AldDOl5D3kaH04o64335GjMY4GWg34DkwuZ7xHSfjkglNIYw6uvQAhrVtP2t CcmimxVecPGpyaB0wUpDROtotbwVQE5JLtfly6DhnP1aqjXF4DMlbNvQ76iS Ra2b_4aTBxsJ0HpwiObSaGQRsZ2LxvE_Aviern6kqipO.3qfR00ah26j0dcp pqjEVZgcdK_xfJIZhhSyF5hNjy38lUjKMj51PiRfVeDOwy1WTITQ.Kp6qmOe 2iLbzS2fDBqPHCa9PNPbm3geLqs7Ynnmni3N8oWsI.XMlEtEHPFl82oiATKe HEeYpbayaFu6T5NCuHJ3iSllHEP5FWqUU X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist To: Cy Schubert , Cy Schubert References: <201605291906.u4TJ67AT082836@slippy.cwsent.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org From: Pedro Giffuni Message-ID: <1b8c118d-0743-ba8f-5796-65b165bc8efd@FreeBSD.org> Date: Sun, 29 May 2016 14:21:29 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <201605291906.u4TJ67AT082836@slippy.cwsent.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 19:26:32 -0000 On 05/29/16 14:06, Cy Schubert wrote: > In message <201605291817.u4TIHnN7040344@slippy.cwsent.com>, Cy Schubert > writes: >> In message <574B2EAC.3010908@FreeBSD.org>, Pedro Giffuni writes: >>> >>> >>> >>> On 29/05/2016 12:37, Cy Schubert wrote: >>>> In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. >>>> Giffuni" w >>>> rites: >>>>> Author: pfg >>>>> Date: Sun May 29 16:18:55 2016 >>>>> New Revision: 300961 >>>>> URL: https://svnweb.freebsd.org/changeset/base/300961 >>>>> >>>>> Log: >>>>> one-true-awk: replace 0 with NULL for pointers >>>>> >>>>> Also remove a redundant semicolon. >>>>> Submitted upstream already. >>>>> >>>>> Modified: >>>>> vendor/one-true-awk/dist/b.c >>>>> vendor/one-true-awk/dist/lex.c >>>>> vendor/one-true-awk/dist/maketab.c >>>>> vendor/one-true-awk/dist/parse.c >>>>> vendor/one-true-awk/dist/run.c >>>>> vendor/one-true-awk/dist/tran.c >>>>> >>>> Was this commit and r300962 obtained from the upline or vendor or were >>>> these commits local to FreeBSD only? >>>> >>>> >>> There is no public awk public repository AFAICT, but bwk acknowledged >>> the submission. >>> >>> The change to openresolv was merged to the public repository. >> >> As they've acknowledged the submissions, can you please tag the new >> versions of awk and openresolve with the correct upstream version numbers, >> please? > > Additionally, if there are no new version numbers, what reason is there for > polluting the vendor branch with local patches to it? Is not the vendor > branch for virgin code retrieved (or received) from the vendor (or upline)? > > Heck! Can't you simply trust the committer knows what he is doing? http://roy.marples.name/projects/openresolv/info/12cb1c1fb10df107 For nawk there is not public repository but bwk's acknowlegement said: "Thanks -- that's something that I should have done long long ago." So I think both changes are pretty much vendor code now. Pedro. From owner-svn-src-vendor@freebsd.org Sun May 29 20:33:54 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1563AB54647 for ; Sun, 29 May 2016 20:33:54 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm20.bullet.mail.bf1.yahoo.com (nm20.bullet.mail.bf1.yahoo.com [98.139.212.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB2001011 for ; Sun, 29 May 2016 20:33:53 +0000 (UTC) (envelope-from pfg@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1464550716; bh=VAxcfVCB2nVapUfSWQzOnpXGOzotBYltP39MvmfXED0=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=sDkE63Me39BqaSalhYC5QeLLu+yWWO8SfdL50oSBNmUkYc6RsbzJdFUerOQTSx51czMPQELHWazm1vXsLtl5VgOUoTjPxLUyZ0ZSbbp+isVTGs+ccwGxFU2MxEShSU44Q7VGKYEturmpUuegXZQA80HeXBQy63Nxuf64ZbEacn+sy+HIUBV929p0aQLVyQBcR2eCYmkUFOyLFnIiqmTJ13yS27G7XURRfYzQ/+YZjOQVwCE71XVPN/Za3D03u4wlEAltMaz+Rq/yDjvlRcpNus287dipJpF8xV4K9PiCbvB4GwPyhTe4QyQqe6vhwiepuPVElL/KbcbXh214eahF3Q== Received: from [66.196.81.171] by nm20.bullet.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:38:36 -0000 Received: from [98.139.212.200] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:38:36 -0000 Received: from [127.0.0.1] by omp1009.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:38:36 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 140249.12814.bm@omp1009.mail.bf1.yahoo.com X-YMail-OSG: DICSCDQVM1nrw66YQvXRzzV5yr.jK.2MreJsOhBVSjSJOgnEd665_UepyGRpl0H 25hxfCy0rv.L_9pvUUm.q.wdCTrAs6PMXSDU727n_J6LimU.dw8umkM4_zsSfY7q6U_hLBp.hfng SNhVWLNSKVT2ogtoj.8utsueD7WsV63iqBQJpwidR1HYxSF9EElFMUAHrOLghxNaKTyV42RosiiF 1DtlQ77Vsk._iRCe61xgzRHOWq8IstIp_ArUHc6gy1TkoNBe2WqIczDfLdvbkOZOL.MkfQTOlCiM 1sHW.ksRVeNyCEhLNvYzm5Z5yrkHOP5UEifUlDJo9rH7hxY4vPVVuCGFtKYJ7.FG1p06tVQD_DPj DXyIIGJxYgfG6QxFTUzmqlc9_dyk7vg0nlfSiMEFGZ6iWHsYt3sXFdTlIl.QHlp3joGrx.aoQLtx m8BIEM.vYNPVt1SjSQFYPfDlsomd12c2FHvC02ML29o_vvOSNZdSuykpRoDuJvKmx34D42dE9g.S NshgSX5EP Received: from jws106179.mail.bf1.yahoo.com by sendmailws153.mail.bf1.yahoo.com; Sun, 29 May 2016 19:38:35 +0000; 1464550715.693 Date: Sun, 29 May 2016 19:38:34 +0000 (UTC) From: "Pedro F. Giffuni" To: Cy Schubert Cc: Cy Schubert , , , Message-ID: <420106426.1255688.1464550714956.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <201605291922.u4TJMHUZ069145@slippy.cwsent.com> References: <201605291922.u4TJMHUZ069145@slippy.cwsent.com> Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 20:33:54 -0000 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px = #715FFA solid !important; padding-left:1ex !important; background-color:whi= te !important; } The patches are not local as they are not in base (yet).I= will merge them to current when I find time. Pedro. Enviado desde Yahoo Mail para iPad El domingo, mayo 29, 2016, 2:22 p.m., Cy Schubert escribi=C3=B3: In message <574B3E4B.2020501@FreeBSD.org>, Pedro Giffuni writes: > On 29/05/2016 13:17, Cy Schubert wrote: > > In message <574B2EAC.3010908@FreeBSD.org>, Pedro Giffuni writes: > >> > >> > >> On 29/05/2016 12:37, Cy Schubert wrote: > >>> In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. > >>> Giffuni" w > >>> rites: > >>>> Author: pfg > >>>> Date: Sun May 29 16:18:55 2016 > >>>> New Revision: 300961 > >>>> URL: https://svnweb.freebsd.org/changeset/base/300961 > >>>> > >>>> Log: > >>>>=C2=A0 =C2=A0 one-true-awk: replace 0 with NULL for pointers > >>>>=C2=A0 =C2=A0=20 > >>>>=C2=A0 =C2=A0 Also remove a redundant semicolon. > >>>>=C2=A0 =C2=A0 Submitted upstream already. > >>>> > >>>> Modified: > >>>>=C2=A0 =C2=A0 vendor/one-true-awk/dist/b.c > >>>>=C2=A0 =C2=A0 vendor/one-true-awk/dist/lex.c > >>>>=C2=A0 =C2=A0 vendor/one-true-awk/dist/maketab.c > >>>>=C2=A0 =C2=A0 vendor/one-true-awk/dist/parse.c > >>>>=C2=A0 =C2=A0 vendor/one-true-awk/dist/run.c > >>>>=C2=A0 =C2=A0 vendor/one-true-awk/dist/tran.c > >>>> > >>> Was this commit and r300962 obtained from the upline or vendor or wer= e > >>> these commits local to FreeBSD only? > >>> > >>> > >> There is no public awk public repository AFAICT, but bwk acknowledged > >> the submission. > >> > >> The change to openresolv was merged to the public repository. > > As they've acknowledged the submissions, can you please tag the new > > versions of awk and openresolve with the correct upstream version numbe= rs, > > please? > > > That's an impossible request as there are no "correct upstream version=20 > numbers". >=20 > In the case of openresolv, I included the repository revision, but=20 > checksums have > no chronological sense and should be avoided for tags. >=20 > In this case using tags for anything other than official releases would= =20 > be a mess. > As stated in our subversion primer (5.4.4): >=20 > "Vendor patches should be committed to the vendor branch, and merged=20 > from there to head. If the patch addresses an issue in a new release=20 > that is currently being imported, it /must not/ be committed along with= =20 > the new release: the release must be imported and tagged first, then the= =20 > patch can be applied and committed. There is no need to re-tag the=20 > vendor sources after committing the patch." >=20 That doesn't address local patches. These were local patches that were=20 upstreamed. I rea this as, if one got a patch from an upstream VCS repo but= =20 these were our local patches. At the very least the commit logs should=20 reference the upstream commit log entry (which the openresolve one did but= =20 the awk commit did not). I think that a clear audit trail back to the=20 vendor VCS, bug#, etc., be documented in the commit log. --=20 Cheers, Cy Schubert or FreeBSD UNIX:=C2=A0 =C2=A0 Web:=C2=A0 http://www.FreeBSD.or= g =C2=A0=C2=A0=C2=A0 The need of the many outweighs the greed of the few. =20 From owner-svn-src-vendor@freebsd.org Sun May 29 21:54:03 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A278B53EE5; Sun, 29 May 2016 21:54:03 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 001151083; Sun, 29 May 2016 21:54:02 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MacBook-Pro.local (unknown [50.242.82.187]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id DA3D67B43; Sun, 29 May 2016 14:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1464558836; x=1464573236; bh=6kDHfgLGXKgNa4eTFiJoS05E+FhyLn9BivQgiBXL4gM=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=gxOyKZMX5pzab/HA2WOgM3pl99CcdvbqDkWVOfDgGMrieGmI0RFTJ92FJzEvj3TSZ SaI6ijrC8lcM4btYiZg0jRkYkGQxKXU5RxXfzbCX2aQRWR02ELZ78WbXxTjoBnBHcf j3YdozOaPu+9teX4MUcpBtU1JIW0foVLFETgNCIA= Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist To: Cy Schubert , Pedro Giffuni References: <201605291817.u4TIHnN7040344@slippy.cwsent.com> Cc: d@delphij.net, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org From: Xin Li Message-ID: Date: Sun, 29 May 2016 14:53:50 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <201605291817.u4TIHnN7040344@slippy.cwsent.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SvA9dF9FU6jnJDCQIngLlsf88vFquFiro" X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 21:54:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SvA9dF9FU6jnJDCQIngLlsf88vFquFiro Content-Type: multipart/mixed; boundary="46R6xgwSliRmKm523qT68o1wEDA8TJpbC" From: Xin Li To: Cy Schubert , Pedro Giffuni Cc: d@delphij.net, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Message-ID: Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist References: <201605291817.u4TIHnN7040344@slippy.cwsent.com> In-Reply-To: <201605291817.u4TIHnN7040344@slippy.cwsent.com> --46R6xgwSliRmKm523qT68o1wEDA8TJpbC Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 5/29/16 11:17, Cy Schubert wrote: [...] >> There is no public awk public repository AFAICT, but bwk acknowledged = >> the submission. >> >> The change to openresolv was merged to the public repository. >=20 > As they've acknowledged the submissions, can you please tag the new=20 > versions of awk and openresolve with the correct upstream version numbe= rs,=20 > please? No, I don't believe tagging is useful here and what Pedro have done is perfectly fine. Importing to vendor branch and merge makes sure that the next import would have these references, and if upstream decided to e.g. refactor the code, svn will know what to do instead of presenting conflicts for the person who do the import to resolve. Cheers, --46R6xgwSliRmKm523qT68o1wEDA8TJpbC-- --SvA9dF9FU6jnJDCQIngLlsf88vFquFiro Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJXS2TxAAoJEJW2GBstM+nsLsAP/1T9JIdSJMp6lciKGqFrf5nr KvGH5b89gWRcHWq9nZ78rp2Z4y04Yp/hBVBwf5tdsR+k8w9q77Sjvr3T0IapWA0B CnJQ0ZjK8pmasButodZK+HSgICEBhfdBXQpnW7sLsGfiwvguAOksYq0EoGMTXFbp Y4R5QIJu+siocAADAJQlEQmOUmLux8SzBeo51kbbEAUp3fgoC2MyTgTrYqQrdLdq gMFAXAMwGwXBpdtoQYPqmJB/JG5LwflNxhnUwnbMrXLLCbUFJLQ1e2kRC4QFOK9r xf6nbpr8BHEK/qW6/C2/kjR15PZ/wT0uKhwJDLDM3LARbx5GaIVhyZ4aonD6pjJ9 qj6eSOyCIjb5kFoAd6vc8b69cJZ7/5QfJrYSnDkkjnYbed6OLhHf0kleOjIHbyzg sK1LdBA3e3JBgqVnwecepjRTeMu1y4XM5X+t+VFRyg0ZxeV9QYgoGo5itv9jsM6A kQaBxVrg09ERU21KNGGKLCyPkq+ETDwgvCHPWDJoNjKjPje13zXYv6tEpPE/kyfH x8nTW+Uk9vPAtTbks20un/9bPW/UurXZnUd1nfw+qLObmUUh6My0VrSvTJDYGkcj 1HWnfM9lOabnkKwMpuxLMefL80Pdrt50DNXxHfaFK9NZOWIwvtwOOYsNJ9closoj mrKmar5D63g1+pBj0ht7 =liuy -----END PGP SIGNATURE----- --SvA9dF9FU6jnJDCQIngLlsf88vFquFiro-- From owner-svn-src-vendor@freebsd.org Sun May 29 22:14:23 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FB10B542EF; Sun, 29 May 2016 22:14:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 040AF1DF3; Sun, 29 May 2016 22:14:22 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id 78jpbwkBuN9d078jqbgZfH; Sun, 29 May 2016 15:59:16 -0600 X-Authority-Analysis: v=2.2 cv=QZUkhYTv c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=yrkiwgmsf1kA:10 a=6I5d2MoRAAAA:8 a=VxmjJ2MpAAAA:8 a=Pm3Ii0ycAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=LzJ7LIBFEyuC-WooSLUA:9 a=RPI5fNaWJ09O4msD:21 a=DToQAjMExY_uhlY8:21 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=IjZwj45LgO3ly-622nXo:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=Lb0xad9IhAkqXp0dotAK:22 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 7098013751; Sun, 29 May 2016 14:59:13 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u4TLxBDf005850; Sun, 29 May 2016 14:59:12 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201605292159.u4TLxBDf005850@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Pedro Giffuni cc: Cy Schubert , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist In-Reply-To: Message from Pedro Giffuni of "Sun, 29 May 2016 14:21:29 -0500." <1b8c118d-0743-ba8f-5796-65b165bc8efd@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 29 May 2016 14:59:11 -0700 X-CMAE-Envelope: MS4wfBA3MI9dpMHBf/i/GhES5nSeu6xaFVQ/uh0ym3+MRjjJfmxRfwwrM+cTtx6INrfrBSCKs2oYJFTSVwEMOlx4KqxZ2FIrgrQW5Wkc9otomyo+MbBQqsuT HDVd+YkQqPSA7518wopM7TxmbpvxadNciLPWm8Qg9U0sJzfhHEMf4RQe0iZWwovS7gO5Ubij2LNfp0mFiXZIP5ajgPxL2T3p/aoED1vEEGUZl3TYh97fzOdH 15XtWb0tSAq9yABO5ojVNFqVvLw1LxTxXnOAVaTjO/sr/UnXSks+1QnWuXeUXOVf X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 22:14:23 -0000 In message <1b8c118d-0743-ba8f-5796-65b165bc8efd@FreeBSD.org>, Pedro Giffuni wr ites: > > > > On 05/29/16 14:06, Cy Schubert wrote: > > In message <201605291817.u4TIHnN7040344@slippy.cwsent.com>, Cy Schubert > > writes: > >> In message <574B2EAC.3010908@FreeBSD.org>, Pedro Giffuni writes: > >>> > >>> > >>> > >>> On 29/05/2016 12:37, Cy Schubert wrote: > >>>> In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. > >>>> Giffuni" w > >>>> rites: > >>>>> Author: pfg > >>>>> Date: Sun May 29 16:18:55 2016 > >>>>> New Revision: 300961 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/300961 > >>>>> > >>>>> Log: > >>>>> one-true-awk: replace 0 with NULL for pointers > >>>>> > >>>>> Also remove a redundant semicolon. > >>>>> Submitted upstream already. > >>>>> > >>>>> Modified: > >>>>> vendor/one-true-awk/dist/b.c > >>>>> vendor/one-true-awk/dist/lex.c > >>>>> vendor/one-true-awk/dist/maketab.c > >>>>> vendor/one-true-awk/dist/parse.c > >>>>> vendor/one-true-awk/dist/run.c > >>>>> vendor/one-true-awk/dist/tran.c > >>>>> > >>>> Was this commit and r300962 obtained from the upline or vendor or were > >>>> these commits local to FreeBSD only? > >>>> > >>>> > >>> There is no public awk public repository AFAICT, but bwk acknowledged > >>> the submission. > >>> > >>> The change to openresolv was merged to the public repository. > >> > >> As they've acknowledged the submissions, can you please tag the new > >> versions of awk and openresolve with the correct upstream version numbers, > >> please? > > > > Additionally, if there are no new version numbers, what reason is there for > > polluting the vendor branch with local patches to it? Is not the vendor > > branch for virgin code retrieved (or received) from the vendor (or upline)? > > > > > > Heck! Sorry but this particular issue of committing local patches to the vendor branch is something I've meant to raise for a long time. This is not meant against you. If you felt that then I apologize. > > Can't you simply trust the committer knows what he is doing? It's not a matter of trust. it's a matter of history. Someone may see a certain commit a couple of years from now and wonder from where it came from, if it was from the vendor and how it was obtained from the vendor. In regard to patches submitted upstream, IMHO I don't think they belong in the vendor branch. Local patches submitted upstream and either not yet accepted or accepted but not incorporated into the vendor's code base IMO should only be imported into the vendor branch when the authorized code is either committed to or released by the vendor. Admittedly this is a gray area and open to interpretation and thus different folks on The Project may have different opinions. IMO vendor branch is only for fully accepted and committed code by the vendor. If it's a gray area then is it really vendor or is it ours? IMO it would be ours. Why? Two reasons: One. History. Secondly, should we discover some anomaly (not that your commits would cause that), being able to look at the virgin code in the vendor branch and compare it with what's in HEAD might help to understand why the anomaly. (And I talked myself out of a third reason.) > > http://roy.marples.name/projects/openresolv/info/12cb1c1fb10df107 > > For nawk there is not public repository but bwk's acknowlegement said: > > "Thanks -- that's something that I should have done long long ago." > > So I think both changes are pretty much vendor code now. If they don't have a public repository then that's cool. I suppose "obtained from:" or "discussed with:" would provide good documentation. While on this topic. I have correspondence with folks upline for software in src/ and some ports/ that provide some interesting history that cannot be captured in commit log messages. I'm at the age that I'll retire from this one day and go back to growing potatoes on the farm (well, maybe not) or more likely not be around any more. It would be nice to archive some of this correspondence one day so that those who follow can still have this history. I cc my former mentor on all correspondence with our ipfilter upline so that someone else on the project will have a copy of the correspondence going forward, just so someone on The Project has a copy should I become incapacitated or unable. I think history is important. I think how we got here is important.The fact that freebsd.org archives this email is important because if the group makes a decision because of what is in this email (not that this particular email is all that important, but you know what I mean), people can go back and see how we got here. I think that's important. Once again, if I appeared hard on you, I'm sorry. That was not my intent. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-vendor@freebsd.org Sun May 29 22:22:49 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D614B54495; Sun, 29 May 2016 22:22:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21F521333; Sun, 29 May 2016 22:22:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x236.google.com with SMTP id um11so3626541pab.0; Sun, 29 May 2016 15:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UU+1P1c6k0VQk/LNssfmH3D/U39z7wRdnfF5+hsIils=; b=O5o4uLlxg2sass1CZabLsDlpBBmQC6a5hQAErW4A6tm32YZ5fu+T7fmS/z6a2G0qwc /MSTGIxL1VWP46gclC1BBpDmCrGeANrz6SfedRpmPOXOKJxr7DukTRA49tkM6d6Lb0j/ 6kppsEmAsGXQNx2odr4CVTfDqeZ5Xlk1oPHrTeDTQDHF8s/VTS0JeVSKGNiezx3BI0w4 cnidlKdxPHChgghEgbYyqPq2746jBNfZ6WUwus66CY9RjfWlzG5+ePWzeBcx9rJ8RK+Q AJb3MrJUKhGC6YKxacJxA3+cnecH16xvRKdwag7m1ufn1NTBbIxZ4wyJegTMGaEnx/cF +Ilw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UU+1P1c6k0VQk/LNssfmH3D/U39z7wRdnfF5+hsIils=; b=KmLnjYRaKvzw6aDkKFaPOsrLalayrLN2s4am9TLyQKJXWM+72peEVsFdcX1fteoSbt HTZwY2ohlbFzREzoRe4jWinANTpz9LU7PpJajmoy0JFpV7l1/vsJfnWiDfQI/XxyNnb9 GYIg0QMA8g3T2wvgoxrAaU48MKzEpVrRW8D+ypHFfDvyI5RxfJcB3r3OOqEfTDNX/T/2 bNAgRevHDxx6ssQ+QsFuccYLUX5tWfyJckDcTzabyWj+8NzmwJU/kC+xWcscE2XIDGXt XtNrII5qBC5OpqX5NBVKQ4WptJVBozvi87rVjaxJtsyaySLCM60h6+7MQyKH7XNHTaXM al7Q== X-Gm-Message-State: ALyK8tIQO7HsRk5wLIvAZp1fOayIb06At4MsocF8cMoH+4go+YVBifHRkdPwIEUlLOCQ6A== X-Received: by 10.66.1.135 with SMTP id 7mr41440322pam.106.1464560568683; Sun, 29 May 2016 15:22:48 -0700 (PDT) Received: from [21.183.163.76] ([172.56.42.229]) by smtp.gmail.com with ESMTPSA id 4sm27848745pfm.15.2016.05.29.15.22.47 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 May 2016 15:22:47 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist From: Ngie Cooper X-Mailer: iPhone Mail (13F69) In-Reply-To: Date: Sun, 29 May 2016 15:22:47 -0700 Cc: Cy Schubert , Pedro Giffuni , d@delphij.net, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201605291817.u4TIHnN7040344@slippy.cwsent.com> To: Xin Li X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 22:22:49 -0000 > On May 29, 2016, at 14:53, Xin Li wrote: >=20 > On 5/29/16 11:17, Cy Schubert wrote: > [...] >>> There is no public awk public repository AFAICT, but bwk acknowledged=20= >>> the submission. >>>=20 >>> The change to openresolv was merged to the public repository. >>=20 >> As they've acknowledged the submissions, can you please tag the new=20 >> versions of awk and openresolve with the correct upstream version numbers= ,=20 >> please? >=20 > No, I don't believe tagging is useful here and what Pedro have done is > perfectly fine. >=20 > Importing to vendor branch and merge makes sure that the next import > would have these references, and if upstream decided to e.g. refactor > the code, svn will know what to do instead of presenting conflicts for > the person who do the import to resolve. Agreed. The only thing that might have been better is noting the commit for o= ne-true-awk, but it's tricky because it's not publicized like some other pro= jects (kinda similar to how byacc, libdialog, and ncurses are handled...). Thanks, -Ngie= From owner-svn-src-vendor@freebsd.org Mon May 30 06:21:22 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E99C4B54B69 for ; Mon, 30 May 2016 06:21:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm28.bullet.mail.bf1.yahoo.com (nm28.bullet.mail.bf1.yahoo.com [98.139.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B15071EBB for ; Mon, 30 May 2016 06:21:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1464548947; bh=sY0nK/SK6S9rc4aitQ7VywsaFNVuA1CyoybVKs3F30E=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=JHJ0UxTsbKvW+WZHq0y9VUBa5YQOVWe1vOyxpl24El579rqDOQZfzoOgZS7ND3rRLP+PAzMtUccGoC8pP/1ngeYqkn0O1BbtGCqx0+TVWjR3tsFR6KUrrNQyi386K9EMqlN6MC+XNpLZAYufGeZLyqlz2B4Li/zC7yb1Y/dGIxERcxBleXnPhkkeCxXhlNPz3kKzBADMMjSN4Qa/liFmhb5URagVunJbRo4puahmwLJRts1bCBRHsmveAVf3NGxsxuasoqC06DVR0S9BSrhgz4NzZwp41zwEJ3mX21EGdqfFInvqVqy972hUc671uOapx6HNgTaqmiJ6AKDs/blprg== Received: from [98.139.170.181] by nm28.bullet.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:09:07 -0000 Received: from [98.139.211.162] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:09:07 -0000 Received: from [127.0.0.1] by smtp219.mail.bf1.yahoo.com with NNFMP; 29 May 2016 19:09:07 -0000 X-Yahoo-Newman-Id: 307398.34735.bm@smtp219.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: YVbSxnAVM1mRjuz03NjBQ6Q4j55Kghjdc73OaxqB_q7LiKu sb3RmC5.wy6D29SS1K5OBuhdYhjNaAvezMl7RfrZW17sFF7ni5NR4.oJYj79 tbCVWZL_xrPlo1Xm0m40ASxynF_vPiMZ7vvK8o6tVbOY6TtYoRjRfI0MTam4 SaWo0nrGVgnwpuOUJG32ezFEuI2WPo7LqvAltkV6TkDJ.IYTgRiJ..XT3NSk k.ytARFdRcEdllw_SybOsoc8T0soQOoZZdY.oPvXzaYfa_y.fWKXSbhN6A6g sBFYPHf0O2A0e04nGkEWvQxUSyK0MWRWoWE5m6UQU.i0AOFtdq5ZHcrC6Awg diTlvl010VqdvVZu5ksimexPUmkeuf_vemzdWeJVE.09ouPu3XULIGqcQxKT 2RX.rI3i2cSV1gjODsrY7w3T71SB7sOLtS9iw8C_SLAx.yiWvBSU1EpfALWG cKrHKOoXCezH3mR7N3tWIttipgFwFG.3GYV57zCzwIk1pTC8Xvp0_laa9Jxd Hd5hG_yH9uQbdKtVf6vikdKbtJyvRx9_6 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r300961 - vendor/one-true-awk/dist To: Cy Schubert References: <201605291817.u4TIHnN7040344@slippy.cwsent.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org From: Pedro Giffuni Message-ID: <574B3E4B.2020501@FreeBSD.org> Date: Sun, 29 May 2016 14:08:59 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201605291817.u4TIHnN7040344@slippy.cwsent.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2016 06:21:23 -0000 On 29/05/2016 13:17, Cy Schubert wrote: > In message <574B2EAC.3010908@FreeBSD.org>, Pedro Giffuni writes: >> >> >> On 29/05/2016 12:37, Cy Schubert wrote: >>> In message <201605291618.u4TGItNJ024583@repo.freebsd.org>, "Pedro F. >>> Giffuni" w >>> rites: >>>> Author: pfg >>>> Date: Sun May 29 16:18:55 2016 >>>> New Revision: 300961 >>>> URL: https://svnweb.freebsd.org/changeset/base/300961 >>>> >>>> Log: >>>> one-true-awk: replace 0 with NULL for pointers >>>> >>>> Also remove a redundant semicolon. >>>> Submitted upstream already. >>>> >>>> Modified: >>>> vendor/one-true-awk/dist/b.c >>>> vendor/one-true-awk/dist/lex.c >>>> vendor/one-true-awk/dist/maketab.c >>>> vendor/one-true-awk/dist/parse.c >>>> vendor/one-true-awk/dist/run.c >>>> vendor/one-true-awk/dist/tran.c >>>> >>> Was this commit and r300962 obtained from the upline or vendor or were >>> these commits local to FreeBSD only? >>> >>> >> There is no public awk public repository AFAICT, but bwk acknowledged >> the submission. >> >> The change to openresolv was merged to the public repository. > As they've acknowledged the submissions, can you please tag the new > versions of awk and openresolve with the correct upstream version numbers, > please? > That's an impossible request as there are no "correct upstream version numbers". In the case of openresolv, I included the repository revision, but checksums have no chronological sense and should be avoided for tags. In this case using tags for anything other than official releases would be a mess. As stated in our subversion primer (5.4.4): "Vendor patches should be committed to the vendor branch, and merged from there to head. If the patch addresses an issue in a new release that is currently being imported, it /must not/ be committed along with the new release: the release must be imported and tagged first, then the patch can be applied and committed. There is no need to re-tag the vendor sources after committing the patch." Pedro. From owner-svn-src-vendor@freebsd.org Wed Jun 1 21:48:24 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86A1BB663C6; Wed, 1 Jun 2016 21:48:24 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A8B0182E; Wed, 1 Jun 2016 21:48:24 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u51LmNNB049326; Wed, 1 Jun 2016 21:48:23 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u51LmMi4049315; Wed, 1 Jun 2016 21:48:22 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201606012148.u51LmMi4049315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Wed, 1 Jun 2016 21:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r301169 - in vendor/NetBSD/blacklist: . dist dist/bin dist/diff dist/etc dist/etc/rc.d dist/include dist/lib dist/libexec dist/port dist/port/m4 dist/test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2016 21:48:24 -0000 Author: lidl Date: Wed Jun 1 21:48:22 2016 New Revision: 301169 URL: https://svnweb.freebsd.org/changeset/base/301169 Log: Reviewed by: rpaulo Approved by: rpaulo Obtained from: NetBSD external/bsd/blacklist @ 20160409 Relnotes: YES Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5912 Added: vendor/NetBSD/blacklist/ vendor/NetBSD/blacklist/dist/ vendor/NetBSD/blacklist/dist/Makefile (contents, props changed) vendor/NetBSD/blacklist/dist/Makefile.inc (contents, props changed) vendor/NetBSD/blacklist/dist/README vendor/NetBSD/blacklist/dist/TODO vendor/NetBSD/blacklist/dist/bin/ vendor/NetBSD/blacklist/dist/bin/Makefile (contents, props changed) vendor/NetBSD/blacklist/dist/bin/blacklistctl.8 (contents, props changed) vendor/NetBSD/blacklist/dist/bin/blacklistctl.c (contents, props changed) vendor/NetBSD/blacklist/dist/bin/blacklistd.8 (contents, props changed) vendor/NetBSD/blacklist/dist/bin/blacklistd.c (contents, props changed) vendor/NetBSD/blacklist/dist/bin/blacklistd.conf.5 (contents, props changed) vendor/NetBSD/blacklist/dist/bin/conf.c (contents, props changed) vendor/NetBSD/blacklist/dist/bin/conf.h (contents, props changed) vendor/NetBSD/blacklist/dist/bin/internal.c (contents, props changed) vendor/NetBSD/blacklist/dist/bin/internal.h (contents, props changed) vendor/NetBSD/blacklist/dist/bin/run.c (contents, props changed) vendor/NetBSD/blacklist/dist/bin/run.h (contents, props changed) vendor/NetBSD/blacklist/dist/bin/state.c (contents, props changed) vendor/NetBSD/blacklist/dist/bin/state.h (contents, props changed) vendor/NetBSD/blacklist/dist/bin/support.c (contents, props changed) vendor/NetBSD/blacklist/dist/bin/support.h (contents, props changed) vendor/NetBSD/blacklist/dist/diff/ vendor/NetBSD/blacklist/dist/diff/ftpd.diff vendor/NetBSD/blacklist/dist/diff/named.diff vendor/NetBSD/blacklist/dist/diff/proftpd.diff vendor/NetBSD/blacklist/dist/diff/ssh.diff vendor/NetBSD/blacklist/dist/etc/ vendor/NetBSD/blacklist/dist/etc/Makefile (contents, props changed) vendor/NetBSD/blacklist/dist/etc/blacklistd.conf (contents, props changed) vendor/NetBSD/blacklist/dist/etc/npf.conf (contents, props changed) vendor/NetBSD/blacklist/dist/etc/rc.d/ vendor/NetBSD/blacklist/dist/etc/rc.d/Makefile (contents, props changed) vendor/NetBSD/blacklist/dist/etc/rc.d/blacklistd vendor/NetBSD/blacklist/dist/include/ vendor/NetBSD/blacklist/dist/include/Makefile (contents, props changed) vendor/NetBSD/blacklist/dist/include/bl.h (contents, props changed) vendor/NetBSD/blacklist/dist/include/blacklist.h (contents, props changed) vendor/NetBSD/blacklist/dist/lib/ vendor/NetBSD/blacklist/dist/lib/Makefile (contents, props changed) vendor/NetBSD/blacklist/dist/lib/bl.c (contents, props changed) vendor/NetBSD/blacklist/dist/lib/blacklist.c (contents, props changed) vendor/NetBSD/blacklist/dist/lib/libblacklist.3 (contents, props changed) vendor/NetBSD/blacklist/dist/lib/shlib_version vendor/NetBSD/blacklist/dist/libexec/ vendor/NetBSD/blacklist/dist/libexec/Makefile (contents, props changed) vendor/NetBSD/blacklist/dist/libexec/blacklistd-helper vendor/NetBSD/blacklist/dist/port/ vendor/NetBSD/blacklist/dist/port/Makefile.am (contents, props changed) vendor/NetBSD/blacklist/dist/port/_strtoi.h (contents, props changed) vendor/NetBSD/blacklist/dist/port/clock_gettime.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/config.h (contents, props changed) vendor/NetBSD/blacklist/dist/port/configure.ac vendor/NetBSD/blacklist/dist/port/fgetln.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/fparseln.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/getprogname.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/m4/ vendor/NetBSD/blacklist/dist/port/m4/.cvsignore vendor/NetBSD/blacklist/dist/port/pidfile.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/popenve.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/port.h (contents, props changed) vendor/NetBSD/blacklist/dist/port/sockaddr_snprintf.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/strlcat.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/strlcpy.c (contents, props changed) vendor/NetBSD/blacklist/dist/port/strtoi.c (contents, props changed) vendor/NetBSD/blacklist/dist/test/ vendor/NetBSD/blacklist/dist/test/Makefile (contents, props changed) vendor/NetBSD/blacklist/dist/test/cltest.c (contents, props changed) vendor/NetBSD/blacklist/dist/test/srvtest.c (contents, props changed) Added: vendor/NetBSD/blacklist/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/Makefile Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.2 2015/01/22 17:49:41 christos Exp $ + +SUBDIR = lib .WAIT include bin etc libexec + +.include Added: vendor/NetBSD/blacklist/dist/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/Makefile.inc Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,10 @@ +# $NetBSD: Makefile.inc,v 1.3 2015/01/23 03:57:22 christos Exp $ + +WARNS=6 +.if !defined(LIB) +LDADD+= -lblacklist +DPADD+= ${LIBBLACKLIST} +.endif +CPPFLAGS+= -I${.CURDIR}/../include +CPPFLAGS+=-DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_UTIL_H -DHAVE_DB_H + Added: vendor/NetBSD/blacklist/dist/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/README Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,103 @@ +# $NetBSD: README,v 1.7 2015/01/26 00:34:50 christos Exp $ + +This package contains library that can be used by network daemons to +communicate with a packet filter via a daemon to enforce opening and +closing ports dynamically based on policy. + +The interface to the packet filter is in libexec/blacklistd-helper +(this is currently designed for npf) and the configuration file +(inspired from inetd.conf) is in etc/blacklistd.conf. + +On NetBSD you can find an example npf.conf and blacklistd.conf in +/usr/share/examples/blacklistd; you need to adjust the interface +in npf.conf and copy both files to /etc; then you just enable +blacklistd=YES in /etc/rc.conf, start it up, and you are all set. + +There is also a startup file in etc/rc.d/blacklistd + +Patches to various daemons to add blacklisting capabilitiers are in the +"diff" directory: + - OpenSSH: diff/ssh.diff [tcp socket example] + - Bind: diff/named.diff [both tcp and udp] + - ftpd: diff/ftpd.diff [tcp] + +These patches have been applied to NetBSD-current. + +The network daemon (for example sshd) communicates to blacklistd, via +a unix socket like syslog. The library calls are simple and everything +is handled by the library. In the simplest form the only thing the +daemon needs to do is to call: + + blacklist(action, acceptedfd, message); + +Where: + action = 0 -> successful login clear blacklist state + 1 -> failed login, add to the failed count + acceptedfd -> the file descriptor where the server is + connected to the remote client. It is used + to determine the listening socket, and the + remote address. This allows any program to + contact the blacklist daemon, since the verification + if the program has access to the listening + socket is done by virtue that the port + number is retrieved from the kernel. + message -> an optional string that is used in debugging logs. + +Unfortunately there is no way to get information about the "peer" +from a udp socket, because there is no connection and that information +is kept with the server. In that case the daemon can provide the +peer information to blacklistd via: + + blacklist_sa(action, acceptedfd, sockaddr, sockaddr_len, message); + +The configuration file contains entries of the form: + +# Blacklist rule +# host/Port type protocol owner name nfail disable +192.168.1.1:ssh stream tcp * -int 10 1m +8.8.8.8:ssh stream tcp * -ext 6 60m +ssh stream tcp6 * * 6 60m +http stream tcp * * 6 60m + +Here note that owner is * because the connection is done from the +child ssh socket which runs with user privs. We treat ipv4 connections +differently by maintaining two different rules one for the external +interface and one from the internal We also register for both tcp +and tcp6 since those are different listening sockets and addresses; +we don't bother with ipv6 and separate rules. We use nfail = 6, +because ssh allows 3 password attempts per connection, and this +will let us have 2 connections before blocking. Finally we block +for an hour; we could block forever too by specifying * in the +duration column. + +blacklistd and the library use syslog(3) to report errors. The +blacklist filter state is persisted automatically in /var/db/blacklistd.db +so that if the daemon is restarted, it remembers what connections +is currently handling. To start from a fresh state (if you restart +npf too for example), you can use -f. To watch the daemon at work, +you can use -d. + +The current control file is designed for npf, and it uses the +dynamic rule feature. You need to create a dynamic rule in your +/etc/npf.conf on the group referring to the interface you want to block +called blacklistd as follows: + +ext_if=bge0 +int_if=sk0 + +group "external" on $ext_if { + ... + ruleset "blacklistd-ext" + ruleset "blacklistd" + ... +} + +group "internal" on $int_if { + ... + ruleset "blacklistd-int" + ... +} + +Enjoy, + +christos Added: vendor/NetBSD/blacklist/dist/TODO ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/TODO Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,21 @@ +# $NetBSD: TODO,v 1.7 2015/01/23 21:34:01 christos Exp $ + +- don't poll periodically, find the next timeout +- use the socket also for commands? Or separate socket? +- add functionality to the control program. Should it change the database + directly, or talk to the daemon to have it do it? +- perhaps handle interfaces too instead of addresses for dynamic ip? + ? What to do with multiple addresses? +- perhaps rate limit against DoS +- perhaps instead of scanning the list have a sparse map by port? +- do we want to use libnpf directly for efficiency? +- add more daemons ftpd? +- do we care about the db state becoming too large? +- instead of a yes = bump one, no = return to 0 interface, do we want + to have something more flexible like? + +n + -n + block + unblock +- do we need an api in blacklistctl to perform maintenance +- fix the blacklistctl output to be more user friendly Added: vendor/NetBSD/blacklist/dist/bin/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/bin/Makefile Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.11 2015/01/27 19:40:36 christos Exp $ + +BINDIR=/sbin + +PROGS=blacklistd blacklistctl +MAN.blacklistd=blacklistd.8 blacklistd.conf.5 +MAN.blacklistctl=blacklistctl.8 +SRCS.blacklistd = blacklistd.c conf.c run.c state.c support.c internal.c +SRCS.blacklistctl = blacklistctl.c conf.c state.c support.c internal.c +DBG=-g + +LDADD+=-lutil +DPADD+=${LIBUTIL} + +.include Added: vendor/NetBSD/blacklist/dist/bin/blacklistctl.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/bin/blacklistctl.8 Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,81 @@ +.\" $NetBSD: blacklistctl.8,v 1.7 2015/04/30 06:20:43 riz Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd April 29, 2015 +.Dt BLACKLISTCTL 8 +.Os +.Sh NAME +.Nm blacklistctl +.Nd display and change the state of blacklistd +.Sh SYNOPSIS +.Nm +.Cm dump +.Op Fl abdnrw +.Sh DESCRIPTION +.Nm +is a program used to display the state of +.Xr blacklistd 8 +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl a +Show all database entries, by default it shows only the embryonic ones. +.It Fl b +Show only the blocked entries. +.It Fl d +Increase debugging level. +.It Fl n +Don't display a header. +.It Fl r +Show the remaining blocked time instead of the last activity time. +.It Fl w +Normally the width of addresses is good for IPv4, the +.Fl w +flag, makes the display wide enough for IPv6 addresses. +.El +.Sh SEE ALSO +.Xr blacklistd 8 +.Sh NOTES +Sometimes the reported number of failed attempts can exceed the number +of attempts that +.Xr blacklistd 8 +is configured to block. +This can happen either because the rule has been removed manually, or +because there were more attempts in flight while the rule block was being +added. +This condition is normal; in that case +.Xr blacklistd 8 +will first attempt to remove the existing rule, and then it will re-add +it to make sure that there is only one rule active. +.Sh HISTORY +.Nm +appeared in +.Nx 7 . +.Sh AUTHORS +.An Christos Zoulas Added: vendor/NetBSD/blacklist/dist/bin/blacklistctl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/bin/blacklistctl.c Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,151 @@ +/* $NetBSD: blacklistctl.c,v 1.20 2016/04/04 15:52:56 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +__RCSID("$NetBSD: blacklistctl.c,v 1.20 2016/04/04 15:52:56 christos Exp $"); + +#include +#include +#ifdef HAVE_LIBUTIL_H +#include +#endif +#ifdef HAVE_UTIL_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +#include "conf.h" +#include "state.h" +#include "internal.h" +#include "support.h" + +static __dead void +usage(int c) +{ + if (c == 0) + warnx("Missing/unknown command"); + else + warnx("Unknown option `%c'", (char)c); + fprintf(stderr, "Usage: %s dump [-abdnrw]\n", getprogname()); + exit(EXIT_FAILURE); +} + +int +main(int argc, char *argv[]) +{ + const char *dbname = _PATH_BLSTATE; + DB *db; + struct conf c; + struct dbinfo dbi; + unsigned int i; + struct timespec ts; + int all, blocked, remain, wide, noheader; + int o; + + noheader = wide = blocked = all = remain = 0; + lfun = dlog; + + if (argc == 1 || strcmp(argv[1], "dump") != 0) + usage(0); + + argc--; + argv++; + + while ((o = getopt(argc, argv, "abD:dnrw")) != -1) + switch (o) { + case 'a': + all = 1; + blocked = 0; + break; + case 'b': + blocked = 1; + case 'D': + dbname = optarg; + break; + break; + case 'd': + debug++; + break; + case 'n': + noheader = 1; + break; + case 'r': + remain = 1; + break; + case 'w': + wide = 1; + break; + default: + usage(o); + break; + } + + db = state_open(dbname, O_RDONLY, 0); + if (db == NULL) + err(EXIT_FAILURE, "Can't open `%s'", dbname); + + clock_gettime(CLOCK_REALTIME, &ts); + wide = wide ? 8 * 4 + 7 : 4 * 3 + 3; + if (!noheader) + printf("%*.*s/ma:port\tid\tnfail\t%s\n", wide, wide, + "address", remain ? "remaining time" : "last access"); + for (i = 1; state_iterate(db, &c, &dbi, i) != 0; i = 0) { + char buf[BUFSIZ]; + if (!all) { + if (blocked) { + if (dbi.count < c.c_nfail) + continue; + } else { + if (dbi.count >= c.c_nfail) + continue; + } + } + sockaddr_snprintf(buf, sizeof(buf), "%a", (void *)&c.c_ss); + printf("%*.*s/%d:%d\t", wide, wide, buf, c.c_lmask, c.c_port); + if (remain) + fmtydhms(buf, sizeof(buf), + c.c_duration - (ts.tv_sec - dbi.last)); + else + fmttime(buf, sizeof(buf), dbi.last); + printf("%s\t%d/%d\t%-s\n", dbi.id, dbi.count, c.c_nfail, buf); + } + state_close(db); + return EXIT_SUCCESS; +} Added: vendor/NetBSD/blacklist/dist/bin/blacklistd.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/bin/blacklistd.8 Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,222 @@ +.\" $NetBSD: blacklistd.8,v 1.15 2016/03/11 17:16:40 christos Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd June 4, 2015 +.Dt BLACKLISTD 8 +.Os +.Sh NAME +.Nm blacklistd +.Nd block and release ports on demand to avoid DoS abuse +.Sh SYNOPSIS +.Nm +.Op Fl dfrv +.Op Fl C Ar controlprog +.Op Fl c Ar configfile +.Op Fl D Ar dbfile +.Op Fl P Ar sockpathsfile +.Op Fl R Ar rulename +.Op Fl s Ar sockpath +.Op Fl t Ar timeout +.Sh DESCRIPTION +.Nm +is a daemon similar to +.Xr syslogd 8 +that listens to a sockets at paths specified in the +.Ar sockpathsfile +for notifications from other daemons about successful or failed connection +attempts. +If no such file is specified, then it only listens to the socket path +specified by +.Ar sockspath +or if that is not specified to +.Pa /var/run/blacklistd.sock . +Each notification contains an (action, port, protocol, address, owner) tuple +that identifies the remote connection and the action. +This tuple is consulted against entries in +.Ar configfile +with syntax specified in +.Xr blacklistd.conf 5 . +If an entry is matched, a state entry is created for that tuple. +Each entry contains a number of tries limit and a duration. +.Pp +If the action is +.Dq add +and the number of tries limit is reached, then a +control script +.Ar controlprog +is invoked with arguments: +.Bd -literal -offset indent +control add
      +.Ed +.Pp +and should invoke a packet filter command to block the connection +specified by the arguments. +The +.Ar rulename +argument can be set from the command line (default +.Dv blacklistd ) . +The script could print a numerical id to stdout as a handle for +the rule that can be used later to remove that connection, but +that is not required as all information to remove the rule is +kept. +.Pp +If the action is +.Dq remove +Then the same control script is invoked as: +.Bd -literal -offset indent +control remove
      +.Ed +.Pp +where +.Ar id +is the number returned from the +.Dq add +action. +.Pp +.Nm +maintains a database of known connections in +.Ar dbfile . +On startup it reads entries from that file, and updates its internal state. +.Pp +.Nm +checks the list of active entries every +.Ar timeout +seconds (default +.Dv 15 ) +and removes entries and block rules using the control program as necessary. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl C Ar controlprog +Use +.Ar controlprog +to communicate with the packet filter, usually +.Pa /libexec/blacklistd-helper . +The following arguments are passed to the control program: +.Bl -tag -width protocol +.It action +The action to perform: +.Dv add , +.Dv rem , +or +.Dv flush +to add, remove or flush a firewall rule. +.It name +The rule name. +.It protocol +The optional protocol name (can be empty): +.Dv tcp , +.Dv tcp6 , +.Dv udp , +.Dv udp6 . +.It address +The IPv4 or IPv6 numeric address to be blocked or released. +.It mask +The numeric mask to be applied to the blocked or released address +.It port +The optional numeric port to be blocked (can be empty). +.It id +For packet filters that support removal of rules by rule identifier, the +identifier of the rule to be removed. +The add command is expected to return the rule identifier string to stdout. +.El +.It Fl c Ar configuration +The name of the configuration file to read, usually +.Pa /etc/blacklistd.conf . +.It Fl D Ar dbfile +The Berkeley DB file where +.Nm +stores its state, usually +.Pa /var/run/blacklistd.db . +.It Fl d +Normally, +.Nm +disassociates itself from the terminal unless the +.Fl d +flag is specified, in which case it stays in the foreground. +.It Fl f +Truncate the state database and flush all the rules named +.Ar rulename +are deleted by invoking the control script as: +.Bd -literal -offset indent +control flush +.Ed +.It Fl P Ar sockspathsfile +A file containing a list of pathnames, one per line that +.Nm +will create sockets to listen to. +This is useful for chrooted environments. +.It Fl R Ar rulename +Specify the default rule name for the packet filter rules, usually +.Dv blacklistd . +.It Fl r +Re-read the firewall rules from the internal database, then +remove and re-add them. +This helps for packet filters that don't retain state across reboots. +.It Fl s Ar sockpath +Add +.Ar sockpath +to the list of Unix sockets +.Nm +listens to. +.It Fl t Ar timeout +The interval in seconds +.Nm +polls the state file to update the rules. +.It Fl v +Cause +.Nm +to print +diagnostic messages to +.Dv stdout +instead of +.Xr syslogd 8 . +.El +.Sh FILES +.Bl -tag -width /libexec/blacklistd-helper -compact +.It Pa /libexec/blacklistd-helper +Shell script invoked to interface with the packet filter. +.It Pa /etc/blacklistd.conf +Configuration file. +.It Pa /var/db/blacklistd.db +Database of current connection entries. +.It Pa /var/run/blacklistd.sock +Socket to receive connection notifications. +.El +.Sh SEE ALSO +.Xr blacklistd.conf 5 , +.Xr blacklistctl 8 , +.Xr npfctl 8 , +.Xr syslogd 8 +.Sh HISTORY +.Nm +appeared in +.Nx 7 . +.Sh AUTHORS +.An Christos Zoulas Added: vendor/NetBSD/blacklist/dist/bin/blacklistd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/blacklist/dist/bin/blacklistd.c Wed Jun 1 21:48:22 2016 (r301169) @@ -0,0 +1,537 @@ +/* $NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include +__RCSID("$NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $"); + +#include +#include +#include + +#ifdef HAVE_LIBUTIL_H +#include +#endif +#ifdef HAVE_UTIL_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bl.h" +#include "internal.h" +#include "conf.h" +#include "run.h" +#include "state.h" +#include "support.h" + +static const char *configfile = _PATH_BLCONF; +static DB *state; +static const char *dbfile = _PATH_BLSTATE; +static sig_atomic_t readconf; +static sig_atomic_t done; +static int vflag; + +static void +sigusr1(int n __unused) +{ + debug++; +} + +static void +sigusr2(int n __unused) +{ + debug--; +} + +static void +sighup(int n __unused) +{ + readconf++; +} + +static void +sigdone(int n __unused) +{ + done++; +} + +static __dead void +usage(int c) +{ + if (c) + warnx("Unknown option `%c'", (char)c); + fprintf(stderr, "Usage: %s [-vdfr] [-c ] [-R ] " + "[-P ] [-C ] [-D ] " + "[-s ] [-t ]\n", getprogname()); + exit(EXIT_FAILURE); +} + +static int +getremoteaddress(bl_info_t *bi, struct sockaddr_storage *rss, socklen_t *rsl) +{ + *rsl = sizeof(*rss); + memset(rss, 0, *rsl); + + if (getpeername(bi->bi_fd, (void *)rss, rsl) != -1) + return 0; + + if (errno != ENOTCONN) { + (*lfun)(LOG_ERR, "getpeername failed (%m)"); + return -1; + } + + if (bi->bi_slen == 0) { + (*lfun)(LOG_ERR, "unconnected socket with no peer in message"); + return -1; + } + + switch (bi->bi_ss.ss_family) { + case AF_INET: + *rsl = sizeof(struct sockaddr_in); + break; + case AF_INET6: + *rsl = sizeof(struct sockaddr_in6); + break; + default: + (*lfun)(LOG_ERR, "bad client passed socket family %u", + (unsigned)bi->bi_ss.ss_family); + return -1; + } + + if (*rsl != bi->bi_slen) { + (*lfun)(LOG_ERR, "bad client passed socket length %u != %u", + (unsigned)*rsl, (unsigned)bi->bi_slen); + return -1; + } + + memcpy(rss, &bi->bi_ss, *rsl); + +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + if (*rsl != rss->ss_len) { + (*lfun)(LOG_ERR, + "bad client passed socket internal length %u != %u", + (unsigned)*rsl, (unsigned)rss->ss_len); + return -1; + } +#endif + return 0; +} + +static void +process(bl_t bl) +{ + struct sockaddr_storage rss; + socklen_t rsl; + char rbuf[BUFSIZ]; + bl_info_t *bi; + struct conf c; + struct dbinfo dbi; + struct timespec ts; + + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + + if ((bi = bl_recv(bl)) == NULL) { + (*lfun)(LOG_ERR, "no message (%m)"); + return; + } + + if (getremoteaddress(bi, &rss, &rsl) == -1) + goto out; + + if (debug) { + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); + (*lfun)(LOG_DEBUG, "processing type=%d fd=%d remote=%s msg=%s" + " uid=%lu gid=%lu", bi->bi_type, bi->bi_fd, rbuf, + bi->bi_msg, (unsigned long)bi->bi_uid, + (unsigned long)bi->bi_gid); + } + + if (conf_find(bi->bi_fd, bi->bi_uid, &rss, &c) == NULL) { + (*lfun)(LOG_DEBUG, "no rule matched"); + goto out; + } + + + if (state_get(state, &c, &dbi) == -1) + goto out; + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: db state info for %s: count=%d/%d " + "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, + fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } + + switch (bi->bi_type) { + case BL_ADD: + dbi.count++; + dbi.last = ts.tv_sec; + if (dbi.id[0]) { + /* + * We should not be getting this since the rule + * should have blocked the address. A possible + * explanation is that someone removed that rule, + * and another would be that we got another attempt + * before we added the rule. In anycase, we remove + * and re-add the rule because we don't want to add + * it twice, because then we'd lose track of it. + */ + (*lfun)(LOG_DEBUG, "rule exists %s", dbi.id); + (void)run_change("rem", &c, dbi.id, 0); + dbi.id[0] = '\0'; + } + if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { + int res = run_change("add", &c, dbi.id, sizeof(dbi.id)); + if (res == -1) + goto out; + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", + (void *)&rss); + (*lfun)(LOG_INFO, + "blocked %s/%d:%d for %d seconds", + rbuf, c.c_lmask, c.c_port, c.c_duration); + + } + break; + case BL_DELETE: + if (dbi.last == 0) + goto out; + dbi.last = 0; + break; + default: + (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); + } + if (state_put(state, &c, &dbi) == -1) + goto out; +out: + close(bi->bi_fd); +} + +static void +update_interfaces(void) +{ + struct ifaddrs *oifas, *nifas; + + if (getifaddrs(&nifas) == -1) + return; + + oifas = ifas; + ifas = nifas; + + if (oifas) + freeifaddrs(oifas); +} + +static void +update(void) +{ + struct timespec ts; + struct conf c; + struct dbinfo dbi; + unsigned int f, n; + char buf[128]; + void *ss = &c.c_ss; + + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { + (*lfun)(LOG_ERR, "clock_gettime failed (%m)"); + return; + } + +again: + for (n = 0, f = 1; state_iterate(state, &c, &dbi, f) == 1; + f = 0, n++) + { + time_t when = c.c_duration + dbi.last; + if (debug > 1) { + char b1[64], b2[64]; + sockaddr_snprintf(buf, sizeof(buf), "%a:%p", ss); + (*lfun)(LOG_DEBUG, "%s:[%u] %s count=%d duration=%d " + "last=%s " "now=%s", __func__, n, buf, dbi.count, + c.c_duration, fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } + if (c.c_duration == -1 || when >= ts.tv_sec) + continue; + if (dbi.id[0]) { + run_change("rem", &c, dbi.id, 0); + sockaddr_snprintf(buf, sizeof(buf), "%a", ss); + syslog(LOG_INFO, "released %s/%d:%d after %d seconds", + buf, c.c_lmask, c.c_port, c.c_duration); + } + state_del(state, &c); + goto again; + } +} + +static void +addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, + const char *path) +{ + bl_t bl = bl_create(true, path, vflag ? vdlog : vsyslog); + if (bl == NULL || !bl_isconnected(bl)) + exit(EXIT_FAILURE); + if (*nfd >= *maxfd) { + *maxfd += 10; + *blp = realloc(*blp, sizeof(**blp) * *maxfd); + if (*blp == NULL) + err(EXIT_FAILURE, "malloc"); + *pfdp = realloc(*pfdp, sizeof(**pfdp) * *maxfd); + if (*pfdp == NULL) + err(EXIT_FAILURE, "malloc"); + } + + (*pfdp)[*nfd].fd = bl_getfd(bl); + (*pfdp)[*nfd].events = POLLIN; + (*blp)[*nfd] = bl; + *nfd += 1; +} + +static void +uniqueadd(struct conf ***listp, size_t *nlist, size_t *mlist, struct conf *c) +{ + struct conf **list = *listp; + + if (c->c_name[0] == '\0') + return; + for (size_t i = 0; i < *nlist; i++) { + if (strcmp(list[i]->c_name, c->c_name) == 0) + return; + } + if (*nlist == *mlist) { + *mlist += 10; + void *p = realloc(*listp, *mlist * sizeof(*list)); + if (p == NULL) + err(EXIT_FAILURE, "Can't allocate for rule list"); + list = *listp = p; + } + list[(*nlist)++] = c; +} + +static void +rules_flush(void) +{ + struct conf **list; + size_t nlist, mlist; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Jun 1 21:52:13 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EDFFB66869; Wed, 1 Jun 2016 21:52:13 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D1AD1F12; Wed, 1 Jun 2016 21:52:13 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u51LqCKw052684; Wed, 1 Jun 2016 21:52:12 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u51LqCHr052683; Wed, 1 Jun 2016 21:52:12 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201606012152.u51LqCHr052683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Wed, 1 Jun 2016 21:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r301170 - vendor/NetBSD/blacklist/20160409 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2016 21:52:13 -0000 Author: lidl Date: Wed Jun 1 21:52:12 2016 New Revision: 301170 URL: https://svnweb.freebsd.org/changeset/base/301170 Log: Tag import of NetBSD's external/bsd/blacklist Reviewed by: rpaulo Approved by: rpaulo Sponsored by: The FreeBSD Foundation Added: vendor/NetBSD/blacklist/20160409/ - copied from r301169, vendor/NetBSD/blacklist/dist/ From owner-svn-src-vendor@freebsd.org Wed Jun 1 21:53:40 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21D35B668E5; Wed, 1 Jun 2016 21:53:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 093B510AE; Wed, 1 Jun 2016 21:53:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 024E1158C; Wed, 1 Jun 2016 21:53:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id A6CD21D5DB; Wed, 1 Jun 2016 21:53:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id wyRQag233viA; Wed, 1 Jun 2016 21:53:32 +0000 (UTC) Subject: Re: svn commit: r301169 - in vendor/NetBSD/blacklist: . dist dist/bin dist/diff dist/etc dist/etc/rc.d dist/include dist/lib dist/libexec dist/port dist/port/m4 dist/test DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 77CE01D5D4 To: Kurt Lidl , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org References: <201606012148.u51LmMi4049315@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <92715661-48ef-8d26-32a2-206fe774bb40@FreeBSD.org> Date: Wed, 1 Jun 2016 14:53:32 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <201606012148.u51LmMi4049315@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6RCNfkG9ieakiNQ62gJpL4WjcWb9vLn91" X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2016 21:53:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6RCNfkG9ieakiNQ62gJpL4WjcWb9vLn91 Content-Type: multipart/mixed; boundary="5rUhErPBtJeRndfS08vxlNRHV3LmIre4a" From: Bryan Drewery To: Kurt Lidl , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Message-ID: <92715661-48ef-8d26-32a2-206fe774bb40@FreeBSD.org> Subject: Re: svn commit: r301169 - in vendor/NetBSD/blacklist: . dist dist/bin dist/diff dist/etc dist/etc/rc.d dist/include dist/lib dist/libexec dist/port dist/port/m4 dist/test References: <201606012148.u51LmMi4049315@repo.freebsd.org> In-Reply-To: <201606012148.u51LmMi4049315@repo.freebsd.org> --5rUhErPBtJeRndfS08vxlNRHV3LmIre4a Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/1/2016 2:48 PM, Kurt Lidl wrote: > Author: lidl > Date: Wed Jun 1 21:48:22 2016 > New Revision: 301169 > URL: https://svnweb.freebsd.org/changeset/base/301169 >=20 > Log: (for others) Import NetBSD's blacklist source @ 20160409 The basic blacklist library and utility programs, to add a system-wide packet filtering notification mechanism to FreeBSD. The rational behind the daemon was given by Christos Zoulas in a presentation at vBSDcon 2015: https://youtu.be/fuuf8G28mjs > Reviewed by: rpaulo > Approved by: rpaulo > Obtained from: NetBSD external/bsd/blacklist @ 20160409 > Relnotes: YES > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D5912 --=20 Regards, Bryan Drewery --5rUhErPBtJeRndfS08vxlNRHV3LmIre4a-- --6RCNfkG9ieakiNQ62gJpL4WjcWb9vLn91 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJXT1lcAAoJEDXXcbtuRpfPp28IAMJK9lzE4gx7SrwRDlofCuIA 3YsSkRE2sXOM2Qb4UNox+GnSxnv1O48WQ1Thgh46sNQCIJszS5o6dELqPhsMKreP c1V+AkqjTLuW+QV6l3eD9v5Qrtvp5AaEENUC/1QKTxie3w1Eht4f8cP58qGF+Pvi O5n4RSWyWhKvDt4zou3yb+XjVZJZ/nKc4Vtb0EcsybhaoQgnHlZosC7WSUSMjkYT W2DG7tpsIDh4EtRFkvPa2NlR+Wdt1X3LorqsSwEiM5IiQntJvs2QZ71XtJCZOV4x 2wqg90316i9S9c97vN5Qr2WstPawJen7V4iceoY/ZAiJOOFJDALZYD6ObUssJHk= =f4xs -----END PGP SIGNATURE----- --6RCNfkG9ieakiNQ62gJpL4WjcWb9vLn91-- From owner-svn-src-vendor@freebsd.org Fri Jun 3 05:55:26 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F87EB68BC4; Fri, 3 Jun 2016 05:55:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A3CE138B; Fri, 3 Jun 2016 05:55:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u535tP8P057275; Fri, 3 Jun 2016 05:55:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u535tPp7057270; Fri, 3 Jun 2016 05:55:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201606030555.u535tPp7057270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 3 Jun 2016 05:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r301238 - in vendor/ntp/dist: . html include ntpd ntpdc ntpq ntpsnmpd ports/winnt/include ports/winnt/include/sys ports/winnt/libntp ports/winnt/ppsapi/loopback/src/sys ports/winnt/vs20... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2016 05:55:26 -0000 Author: delphij Date: Fri Jun 3 05:55:24 2016 New Revision: 301238 URL: https://svnweb.freebsd.org/changeset/base/301238 Log: Vendor import of ntp-4.2.8p8. Added: vendor/ntp/dist/ports/winnt/vs2015/ vendor/ntp/dist/ports/winnt/vs2015/common.props vendor/ntp/dist/ports/winnt/vs2015/debug-x64.props vendor/ntp/dist/ports/winnt/vs2015/debug.props vendor/ntp/dist/ports/winnt/vs2015/instsrv/ vendor/ntp/dist/ports/winnt/vs2015/instsrv/instsrv.vcxproj vendor/ntp/dist/ports/winnt/vs2015/instsrv/instsrv.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/libntp/ vendor/ntp/dist/ports/winnt/vs2015/libntp/libntp.vcxproj vendor/ntp/dist/ports/winnt/vs2015/libntp/libntp.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/loopback-pps/ vendor/ntp/dist/ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj vendor/ntp/dist/ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/ntp-keygen/ vendor/ntp/dist/ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj vendor/ntp/dist/ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/ntp.sln vendor/ntp/dist/ports/winnt/vs2015/ntpd/ vendor/ntp/dist/ports/winnt/vs2015/ntpd-keyword-gen/ vendor/ntp/dist/ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj vendor/ntp/dist/ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/ntpd/gen-ntp_keyword.bat vendor/ntp/dist/ports/winnt/vs2015/ntpd/ntpd.vcxproj vendor/ntp/dist/ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/ntpdate/ vendor/ntp/dist/ports/winnt/vs2015/ntpdate/ntpdate.vcxproj vendor/ntp/dist/ports/winnt/vs2015/ntpdate/ntpdate.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/ntpdc/ vendor/ntp/dist/ports/winnt/vs2015/ntpdc/ntpdc.vcxproj vendor/ntp/dist/ports/winnt/vs2015/ntpdc/ntpdc.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/ntpq/ vendor/ntp/dist/ports/winnt/vs2015/ntpq/ntpq.vcxproj vendor/ntp/dist/ports/winnt/vs2015/ntpq/ntpq.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/release-x64.props vendor/ntp/dist/ports/winnt/vs2015/release.props vendor/ntp/dist/scripts/build/genAuthors.in (contents, props changed) vendor/ntp/dist/sntp/m4/sntp_problemtests.m4 Modified: vendor/ntp/dist/ChangeLog vendor/ntp/dist/CommitLog vendor/ntp/dist/NEWS vendor/ntp/dist/configure vendor/ntp/dist/configure.ac vendor/ntp/dist/html/miscopt.html vendor/ntp/dist/include/ntp.h vendor/ntp/dist/ntpd/complete.conf.in vendor/ntp/dist/ntpd/invoke-ntp.conf.texi vendor/ntp/dist/ntpd/invoke-ntp.keys.texi vendor/ntp/dist/ntpd/invoke-ntpd.texi vendor/ntp/dist/ntpd/keyword-gen-utd vendor/ntp/dist/ntpd/keyword-gen.c vendor/ntp/dist/ntpd/ntp.conf.5man vendor/ntp/dist/ntpd/ntp.conf.5mdoc vendor/ntp/dist/ntpd/ntp.conf.def vendor/ntp/dist/ntpd/ntp.conf.html vendor/ntp/dist/ntpd/ntp.conf.man.in vendor/ntp/dist/ntpd/ntp.conf.mdoc.in vendor/ntp/dist/ntpd/ntp.keys.5man vendor/ntp/dist/ntpd/ntp.keys.5mdoc vendor/ntp/dist/ntpd/ntp.keys.html vendor/ntp/dist/ntpd/ntp.keys.man.in vendor/ntp/dist/ntpd/ntp.keys.mdoc.in vendor/ntp/dist/ntpd/ntp_config.c vendor/ntp/dist/ntpd/ntp_io.c vendor/ntp/dist/ntpd/ntp_keyword.h vendor/ntp/dist/ntpd/ntp_parser.c vendor/ntp/dist/ntpd/ntp_parser.h vendor/ntp/dist/ntpd/ntp_parser.y vendor/ntp/dist/ntpd/ntp_proto.c vendor/ntp/dist/ntpd/ntpd-opts.c vendor/ntp/dist/ntpd/ntpd-opts.h vendor/ntp/dist/ntpd/ntpd.1ntpdman vendor/ntp/dist/ntpd/ntpd.1ntpdmdoc vendor/ntp/dist/ntpd/ntpd.html vendor/ntp/dist/ntpd/ntpd.man.in vendor/ntp/dist/ntpd/ntpd.mdoc.in vendor/ntp/dist/ntpd/refclock_parse.c vendor/ntp/dist/ntpdc/invoke-ntpdc.texi vendor/ntp/dist/ntpdc/ntpdc-opts.c vendor/ntp/dist/ntpdc/ntpdc-opts.h vendor/ntp/dist/ntpdc/ntpdc.1ntpdcman vendor/ntp/dist/ntpdc/ntpdc.1ntpdcmdoc vendor/ntp/dist/ntpdc/ntpdc.c vendor/ntp/dist/ntpdc/ntpdc.html vendor/ntp/dist/ntpdc/ntpdc.man.in vendor/ntp/dist/ntpdc/ntpdc.mdoc.in vendor/ntp/dist/ntpq/invoke-ntpq.texi vendor/ntp/dist/ntpq/ntpq-opts.c vendor/ntp/dist/ntpq/ntpq-opts.h vendor/ntp/dist/ntpq/ntpq.1ntpqman vendor/ntp/dist/ntpq/ntpq.1ntpqmdoc vendor/ntp/dist/ntpq/ntpq.c vendor/ntp/dist/ntpq/ntpq.html vendor/ntp/dist/ntpq/ntpq.man.in vendor/ntp/dist/ntpq/ntpq.mdoc.in vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.texi vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdman vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc vendor/ntp/dist/ntpsnmpd/ntpsnmpd.html vendor/ntp/dist/ntpsnmpd/ntpsnmpd.man.in vendor/ntp/dist/ntpsnmpd/ntpsnmpd.mdoc.in vendor/ntp/dist/packageinfo.sh vendor/ntp/dist/ports/winnt/include/config.h vendor/ntp/dist/ports/winnt/include/sys/time.h vendor/ntp/dist/ports/winnt/libntp/termios.c vendor/ntp/dist/ports/winnt/ppsapi/loopback/src/sys/time.h vendor/ntp/dist/ports/winnt/vs2013/common.props vendor/ntp/dist/scripts/build/Makefile.am vendor/ntp/dist/scripts/build/Makefile.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.html vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.man.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.mdoc.in vendor/ntp/dist/scripts/calc_tickadj/invoke-calc_tickadj.texi vendor/ntp/dist/scripts/invoke-plot_summary.texi vendor/ntp/dist/scripts/invoke-summary.texi vendor/ntp/dist/scripts/ntp-wait/invoke-ntp-wait.texi vendor/ntp/dist/scripts/ntp-wait/ntp-wait-opts vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitman vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc vendor/ntp/dist/scripts/ntp-wait/ntp-wait.html vendor/ntp/dist/scripts/ntp-wait/ntp-wait.in vendor/ntp/dist/scripts/ntp-wait/ntp-wait.man.in vendor/ntp/dist/scripts/ntp-wait/ntp-wait.mdoc.in vendor/ntp/dist/scripts/ntpsweep/invoke-ntpsweep.texi vendor/ntp/dist/scripts/ntpsweep/ntpsweep-opts vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepman vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc vendor/ntp/dist/scripts/ntpsweep/ntpsweep.html vendor/ntp/dist/scripts/ntpsweep/ntpsweep.man.in vendor/ntp/dist/scripts/ntpsweep/ntpsweep.mdoc.in vendor/ntp/dist/scripts/ntptrace/invoke-ntptrace.texi vendor/ntp/dist/scripts/ntptrace/ntptrace-opts vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptraceman vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptracemdoc vendor/ntp/dist/scripts/ntptrace/ntptrace.html vendor/ntp/dist/scripts/ntptrace/ntptrace.man.in vendor/ntp/dist/scripts/ntptrace/ntptrace.mdoc.in vendor/ntp/dist/scripts/plot_summary-opts vendor/ntp/dist/scripts/plot_summary-opts.def vendor/ntp/dist/scripts/plot_summary.1plot_summaryman vendor/ntp/dist/scripts/plot_summary.1plot_summarymdoc vendor/ntp/dist/scripts/plot_summary.html vendor/ntp/dist/scripts/plot_summary.man.in vendor/ntp/dist/scripts/plot_summary.mdoc.in vendor/ntp/dist/scripts/summary-opts vendor/ntp/dist/scripts/summary.1summaryman vendor/ntp/dist/scripts/summary.1summarymdoc vendor/ntp/dist/scripts/summary.html vendor/ntp/dist/scripts/summary.man.in vendor/ntp/dist/scripts/summary.mdoc.in vendor/ntp/dist/scripts/update-leap/invoke-update-leap.texi vendor/ntp/dist/scripts/update-leap/update-leap-opts vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapman vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapmdoc vendor/ntp/dist/scripts/update-leap/update-leap.html vendor/ntp/dist/scripts/update-leap/update-leap.man.in vendor/ntp/dist/scripts/update-leap/update-leap.mdoc.in vendor/ntp/dist/sntp/Makefile.in vendor/ntp/dist/sntp/aclocal.m4 vendor/ntp/dist/sntp/configure vendor/ntp/dist/sntp/configure.ac vendor/ntp/dist/sntp/include/Makefile.in vendor/ntp/dist/sntp/include/version.def vendor/ntp/dist/sntp/include/version.texi vendor/ntp/dist/sntp/invoke-sntp.texi vendor/ntp/dist/sntp/libopts/Makefile.in vendor/ntp/dist/sntp/m4/ntp_problemtests.m4 vendor/ntp/dist/sntp/m4/version.m4 vendor/ntp/dist/sntp/scripts/Makefile.in vendor/ntp/dist/sntp/sntp-opts.c vendor/ntp/dist/sntp/sntp-opts.h vendor/ntp/dist/sntp/sntp.1sntpman vendor/ntp/dist/sntp/sntp.1sntpmdoc vendor/ntp/dist/sntp/sntp.html vendor/ntp/dist/sntp/sntp.man.in vendor/ntp/dist/sntp/sntp.mdoc.in vendor/ntp/dist/sntp/tests/Makefile.am vendor/ntp/dist/sntp/tests/Makefile.in vendor/ntp/dist/sntp/unity/Makefile.in vendor/ntp/dist/sntp/version.c vendor/ntp/dist/util/invoke-ntp-keygen.texi vendor/ntp/dist/util/ntp-keygen-opts.c vendor/ntp/dist/util/ntp-keygen-opts.h vendor/ntp/dist/util/ntp-keygen.1ntp-keygenman vendor/ntp/dist/util/ntp-keygen.1ntp-keygenmdoc vendor/ntp/dist/util/ntp-keygen.html vendor/ntp/dist/util/ntp-keygen.man.in vendor/ntp/dist/util/ntp-keygen.mdoc.in Modified: vendor/ntp/dist/ChangeLog ============================================================================== --- vendor/ntp/dist/ChangeLog Fri Jun 3 05:27:34 2016 (r301237) +++ vendor/ntp/dist/ChangeLog Fri Jun 3 05:55:24 2016 (r301238) @@ -1,4 +1,26 @@ --- +(4.2.8p8) 2016/06/02 Released by Harlan Stenn + +* [Sec 3042] Broadcast Interleave. HStenn. +* [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + - validate origin timestamps on bad MACs, too. stenn@ntp.org +* [Sec 3044] Spoofed server packets are partially processed. HStenn. +* [Sec 3045] Bad authentication demobilizes ephemeral associations. JPerlinger. +* [Sec 3046] CRYPTO_NAK crash. stenn@ntp.org +* [Bug 3038] NTP fails to build in VS2015. perlinger@ntp.org + - provide build environment + - 'wint_t' and 'struct timespec' defined by VS2015 + - fixed print()/scanf() format issues +* [Bug 3052] Add a .gitignore file. Edmund Wong. +* [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite. +* [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback, + JPerlinger, HStenn. +* Update the NEWS file for 4.2.8p8. HStenn. +* Fix typo in ntp-wait and plot_summary. HStenn. +* Make sure we have an "author" file for git imports. HStenn. +* Update the sntp problem tests for MacOS. HStenn. + +--- (4.2.8p7) 2016/04/26 Released by Harlan Stenn * [Sec 2901] KoD packets must have non-zero transmit timestamps. HStenn. Modified: vendor/ntp/dist/CommitLog ============================================================================== --- vendor/ntp/dist/CommitLog Fri Jun 3 05:27:34 2016 (r301237) +++ vendor/ntp/dist/CommitLog Fri Jun 3 05:55:24 2016 (r301238) @@ -1,3 +1,774 @@ +ChangeSet@1.3686, 2016-06-02 07:40:06-04:00, stenn@deacon.udel.edu + NTP_4_2_8P8 + TAG: NTP_4_2_8P8 + + ChangeLog@1.1834 +1 -0 + NTP_4_2_8P8 + + ntpd/invoke-ntp.conf.texi@1.200 +1 -1 + NTP_4_2_8P8 + + ntpd/invoke-ntp.keys.texi@1.190 +1 -1 + NTP_4_2_8P8 + + ntpd/invoke-ntpd.texi@1.506 +2 -2 + NTP_4_2_8P8 + + ntpd/ntp.conf.5man@1.234 +3 -3 + NTP_4_2_8P8 + + ntpd/ntp.conf.5mdoc@1.234 +2 -2 + NTP_4_2_8P8 + + ntpd/ntp.conf.html@1.185 +55 -19 + NTP_4_2_8P8 + + ntpd/ntp.conf.man.in@1.234 +3 -3 + NTP_4_2_8P8 + + ntpd/ntp.conf.mdoc.in@1.234 +2 -2 + NTP_4_2_8P8 + + ntpd/ntp.keys.5man@1.224 +2 -2 + NTP_4_2_8P8 + + ntpd/ntp.keys.5mdoc@1.224 +2 -2 + NTP_4_2_8P8 + + ntpd/ntp.keys.html@1.186 +1 -1 + NTP_4_2_8P8 + + ntpd/ntp.keys.man.in@1.224 +2 -2 + NTP_4_2_8P8 + + ntpd/ntp.keys.mdoc.in@1.224 +2 -2 + NTP_4_2_8P8 + + ntpd/ntpd-opts.c@1.528 +7 -7 + NTP_4_2_8P8 + + ntpd/ntpd-opts.h@1.527 +3 -3 + NTP_4_2_8P8 + + ntpd/ntpd.1ntpdman@1.335 +3 -3 + NTP_4_2_8P8 + + ntpd/ntpd.1ntpdmdoc@1.335 +2 -2 + NTP_4_2_8P8 + + ntpd/ntpd.html@1.179 +2 -2 + NTP_4_2_8P8 + + ntpd/ntpd.man.in@1.335 +3 -3 + NTP_4_2_8P8 + + ntpd/ntpd.mdoc.in@1.335 +2 -2 + NTP_4_2_8P8 + + ntpdc/invoke-ntpdc.texi@1.503 +2 -2 + NTP_4_2_8P8 + + ntpdc/ntpdc-opts.c@1.521 +7 -7 + NTP_4_2_8P8 + + ntpdc/ntpdc-opts.h@1.520 +3 -3 + NTP_4_2_8P8 + + ntpdc/ntpdc.1ntpdcman@1.334 +3 -3 + NTP_4_2_8P8 + + ntpdc/ntpdc.1ntpdcmdoc@1.334 +2 -2 + NTP_4_2_8P8 + + ntpdc/ntpdc.html@1.347 +2 -2 + NTP_4_2_8P8 + + ntpdc/ntpdc.man.in@1.334 +3 -3 + NTP_4_2_8P8 + + ntpdc/ntpdc.mdoc.in@1.334 +2 -2 + NTP_4_2_8P8 + + ntpq/invoke-ntpq.texi@1.511 +2 -2 + NTP_4_2_8P8 + + ntpq/ntpq-opts.c@1.528 +7 -7 + NTP_4_2_8P8 + + ntpq/ntpq-opts.h@1.526 +3 -3 + NTP_4_2_8P8 + + ntpq/ntpq.1ntpqman@1.339 +3 -3 + NTP_4_2_8P8 + + ntpq/ntpq.1ntpqmdoc@1.339 +2 -2 + NTP_4_2_8P8 + + ntpq/ntpq.html@1.176 +2 -2 + NTP_4_2_8P8 + + ntpq/ntpq.man.in@1.339 +3 -3 + NTP_4_2_8P8 + + ntpq/ntpq.mdoc.in@1.339 +2 -2 + NTP_4_2_8P8 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.505 +2 -2 + NTP_4_2_8P8 + + ntpsnmpd/ntpsnmpd-opts.c@1.523 +7 -7 + NTP_4_2_8P8 + + ntpsnmpd/ntpsnmpd-opts.h@1.522 +3 -3 + NTP_4_2_8P8 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.334 +3 -3 + NTP_4_2_8P8 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.334 +2 -2 + NTP_4_2_8P8 + + ntpsnmpd/ntpsnmpd.html@1.174 +1 -1 + NTP_4_2_8P8 + + ntpsnmpd/ntpsnmpd.man.in@1.334 +3 -3 + NTP_4_2_8P8 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.334 +2 -2 + NTP_4_2_8P8 + + packageinfo.sh@1.528 +2 -2 + NTP_4_2_8P8 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.95 +3 -3 + NTP_4_2_8P8 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.96 +2 -2 + NTP_4_2_8P8 + + scripts/calc_tickadj/calc_tickadj.html@1.97 +1 -1 + NTP_4_2_8P8 + + scripts/calc_tickadj/calc_tickadj.man.in@1.94 +3 -3 + NTP_4_2_8P8 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.96 +2 -2 + NTP_4_2_8P8 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.99 +1 -1 + NTP_4_2_8P8 + + scripts/invoke-plot_summary.texi@1.117 +2 -2 + NTP_4_2_8P8 + + scripts/invoke-summary.texi@1.116 +2 -2 + NTP_4_2_8P8 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.326 +2 -2 + NTP_4_2_8P8 + + scripts/ntp-wait/ntp-wait-opts@1.62 +2 -2 + NTP_4_2_8P8 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.323 +3 -3 + NTP_4_2_8P8 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.324 +2 -2 + NTP_4_2_8P8 + + scripts/ntp-wait/ntp-wait.html@1.343 +2 -2 + NTP_4_2_8P8 + + scripts/ntp-wait/ntp-wait.man.in@1.323 +3 -3 + NTP_4_2_8P8 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.324 +2 -2 + NTP_4_2_8P8 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.114 +2 -2 + NTP_4_2_8P8 + + scripts/ntpsweep/ntpsweep-opts@1.64 +2 -2 + NTP_4_2_8P8 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.102 +3 -3 + NTP_4_2_8P8 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.102 +2 -2 + NTP_4_2_8P8 + + scripts/ntpsweep/ntpsweep.html@1.115 +2 -2 + NTP_4_2_8P8 + + scripts/ntpsweep/ntpsweep.man.in@1.102 +3 -3 + NTP_4_2_8P8 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.103 +2 -2 + NTP_4_2_8P8 + + scripts/ntptrace/invoke-ntptrace.texi@1.115 +2 -2 + NTP_4_2_8P8 + + scripts/ntptrace/ntptrace-opts@1.64 +2 -2 + NTP_4_2_8P8 + + scripts/ntptrace/ntptrace.1ntptraceman@1.102 +3 -3 + NTP_4_2_8P8 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.103 +2 -2 + NTP_4_2_8P8 + + scripts/ntptrace/ntptrace.html@1.116 +2 -2 + NTP_4_2_8P8 + + scripts/ntptrace/ntptrace.man.in@1.102 +3 -3 + NTP_4_2_8P8 + + scripts/ntptrace/ntptrace.mdoc.in@1.104 +2 -2 + NTP_4_2_8P8 + + scripts/plot_summary-opts@1.65 +2 -2 + NTP_4_2_8P8 + + scripts/plot_summary.1plot_summaryman@1.115 +3 -3 + NTP_4_2_8P8 + + scripts/plot_summary.1plot_summarymdoc@1.115 +2 -2 + NTP_4_2_8P8 + + scripts/plot_summary.html@1.118 +40 -58 + NTP_4_2_8P8 + + scripts/plot_summary.man.in@1.115 +3 -3 + NTP_4_2_8P8 + + scripts/plot_summary.mdoc.in@1.115 +2 -2 + NTP_4_2_8P8 + + scripts/summary-opts@1.64 +2 -2 + NTP_4_2_8P8 + + scripts/summary.1summaryman@1.114 +3 -3 + NTP_4_2_8P8 + + scripts/summary.1summarymdoc@1.114 +2 -2 + NTP_4_2_8P8 + + scripts/summary.html@1.117 +2 -2 + NTP_4_2_8P8 + + scripts/summary.man.in@1.114 +3 -3 + NTP_4_2_8P8 + + scripts/summary.mdoc.in@1.114 +2 -2 + NTP_4_2_8P8 + + scripts/update-leap/invoke-update-leap.texi@1.15 +1 -1 + NTP_4_2_8P8 + + scripts/update-leap/update-leap-opts@1.15 +2 -2 + NTP_4_2_8P8 + + scripts/update-leap/update-leap.1update-leapman@1.15 +3 -3 + NTP_4_2_8P8 + + scripts/update-leap/update-leap.1update-leapmdoc@1.15 +2 -2 + NTP_4_2_8P8 + + scripts/update-leap/update-leap.html@1.15 +1 -1 + NTP_4_2_8P8 + + scripts/update-leap/update-leap.man.in@1.15 +3 -3 + NTP_4_2_8P8 + + scripts/update-leap/update-leap.mdoc.in@1.15 +2 -2 + NTP_4_2_8P8 + + sntp/invoke-sntp.texi@1.503 +2 -2 + NTP_4_2_8P8 + + sntp/sntp-opts.c@1.522 +7 -7 + NTP_4_2_8P8 + + sntp/sntp-opts.h@1.520 +3 -3 + NTP_4_2_8P8 + + sntp/sntp.1sntpman@1.338 +3 -3 + NTP_4_2_8P8 + + sntp/sntp.1sntpmdoc@1.338 +2 -2 + NTP_4_2_8P8 + + sntp/sntp.html@1.518 +2 -2 + NTP_4_2_8P8 + + sntp/sntp.man.in@1.338 +3 -3 + NTP_4_2_8P8 + + sntp/sntp.mdoc.in@1.338 +2 -2 + NTP_4_2_8P8 + + util/invoke-ntp-keygen.texi@1.506 +2 -2 + NTP_4_2_8P8 + + util/ntp-keygen-opts.c@1.524 +7 -7 + NTP_4_2_8P8 + + util/ntp-keygen-opts.h@1.522 +3 -3 + NTP_4_2_8P8 + + util/ntp-keygen.1ntp-keygenman@1.334 +3 -3 + NTP_4_2_8P8 + + util/ntp-keygen.1ntp-keygenmdoc@1.334 +2 -2 + NTP_4_2_8P8 + + util/ntp-keygen.html@1.180 +2 -2 + NTP_4_2_8P8 + + util/ntp-keygen.man.in@1.334 +3 -3 + NTP_4_2_8P8 + + util/ntp-keygen.mdoc.in@1.334 +2 -2 + NTP_4_2_8P8 + +ChangeSet@1.3685, 2016-06-02 06:50:37-04:00, stenn@deacon.udel.edu + 4.2.8p8 + + packageinfo.sh@1.527 +1 -1 + 4.2.8p8 + +ChangeSet@1.3684, 2016-05-27 08:02:09+00:00, stenn@psp-deb1.ntp.org + typo + + NEWS@1.174 +1 -1 + typo + +ChangeSet@1.3683, 2016-05-27 00:07:22-07:00, harlan@max.pfcs.com + [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback, JPerlinger, HStenn. + + ChangeLog@1.1833 +2 -0 + [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback, JPerlinger, HStenn. + + NEWS@1.173 +2 -0 + [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback, JPerlinger, HStenn. + + ntpd/ntp_io.c@1.417 +41 -41 + [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback, JPerlinger, HStenn. + +ChangeSet@1.3682, 2016-05-26 22:37:19-07:00, harlan@max.pfcs.com + [Sec3043] - validate origin timestamps on bad MACs, too. stenn@ntp.org + + ChangeLog@1.1832 +2 -1 + [Sec3043] - validate origin timestamps on bad MACs, too. stenn@ntp.org + + NEWS@1.172 +9 -9 + [Sec3043] - validate origin timestamps on bad MACs, too. stenn@ntp.org + + ntpd/ntp_proto.c@1.392 +19 -6 + [Sec3043] - validate origin timestamps on bad MACs, too. stenn@ntp.org + +ChangeSet@1.3681, 2016-05-24 23:31:36+00:00, stenn@psp-deb1.ntp.org + Update the NEWS file for 4.2.8p8. HStenn. + + ChangeLog@1.1831 +1 -0 + Update the NEWS file for 4.2.8p8. HStenn. + + NEWS@1.171 +103 -2 + Update the NEWS file for 4.2.8p8. HStenn. + +ChangeSet@1.3680, 2016-05-24 12:05:06+00:00, stenn@psp-deb1.ntp.org + [Sec 3044] Spoofed server packets are partially processed. HStenn. + + ChangeLog@1.1830 +3 -2 + [Sec 3044] Spoofed server packets are partially processed. HStenn. + + ntpd/ntp_proto.c@1.391 +39 -24 + [Sec 3044] Spoofed server packets are partially processed. HStenn. + +ChangeSet@1.3669.3.2, 2016-05-24 02:58:00-07:00, harlan@hms-mbp11.pfcs.com + Make sure we have an "author" file for git imports. HStenn. + + ChangeLog@1.1820.3.3 +1 -0 + Update the problem tests for MacOS for sntp. HStenn. + + ChangeLog@1.1820.3.2 +1 -0 + Make sure we have an "author" file for git imports. HStenn. + + configure.ac@1.606 +1 -0 + Make sure we have an "author" file for git imports. HStenn. + + scripts/build/Makefile.am@1.5 +1 -1 + Make sure we have an "author" file for git imports. HStenn. + + scripts/build/genAuthors.in@1.1 +82 -0 + BitKeeper file /Users/harlan/src/ntp-stable/scripts/build/genAuthors.in + + scripts/build/genAuthors.in@1.0 +0 -0 + + sntp/configure.ac@1.83 +2 -0 + Make sure we have an "author" file for git imports. HStenn. + + sntp/m4/ntp_problemtests.m4@1.5 +1 -0 + Make sure we have an "author" file for git imports. HStenn. + + sntp/m4/sntp_problemtests.m4@1.1 +47 -0 + BitKeeper file /Users/harlan/src/ntp-stable/sntp/m4/sntp_problemtests.m4 + + sntp/m4/sntp_problemtests.m4@1.0 +0 -0 + + sntp/tests/Makefile.am@1.67 +8 -2 + Update the problem tests for MacOS for sntp. HStenn. + +ChangeSet@1.3669.3.1, 2016-05-24 02:25:46-07:00, harlan@hms-mbp11.pfcs.com + [Sec 3042] Broadcast Interleave. HStenn. + + ChangeLog@1.1820.3.1 +4 -0 + [Sec 3042] Broadcast Interleave. HStenn. + + ntpd/ntp_proto.c@1.386.1.1 +69 -14 + [Sec 3042] Broadcast Interleave. HStenn. + +ChangeSet@1.3678, 2016-05-23 09:53:37+00:00, stenn@psp-deb1.ntp.org + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ChangeLog@1.1828 +1 -1 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + include/ntp.h@1.220 +1 -0 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/complete.conf.in@1.31 +1 -1 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/invoke-ntp.conf.texi@1.199 +23 -3 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/keyword-gen-utd@1.28 +1 -1 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/keyword-gen.c@1.34 +2 -1 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp.conf.5man@1.233 +27 -6 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp.conf.5mdoc@1.233 +24 -2 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp.conf.def@1.24 +22 -0 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp.conf.man.in@1.233 +27 -6 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp.conf.mdoc.in@1.233 +24 -2 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp_config.c@1.338 +6 -2 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp_keyword.h@1.30 +617 -597 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp_parser.c@1.102 +1541 -1773 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp_parser.h@1.66 +294 -306 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp_parser.y@1.92 +2 -0 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + + ntpd/ntp_proto.c@1.389 +29 -8 + [Sec 3043] Autokey association reset. perlinger@ntp.org, stenn@ntp.org + +ChangeSet@1.3671.1.3, 2016-05-17 06:49:41+00:00, stenn@psp-deb1.ntp.org + [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite. + + ChangeLog@1.1822.1.3 +1 -0 + [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite. + + html/miscopt.html@1.86 +2 -2 + [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite. + +ChangeSet@1.3671.1.2, 2016-05-17 04:25:50+00:00, stenn@psp-deb1.ntp.org + [Bug 3052] Add a .gitignore file. Edmund Wong. + + .gitignore@1.1 +9 -0 + BitKeeper file /home/stenn/ntp-stable/.gitignore + + .gitignore@1.0 +0 -0 + + BitKeeper/etc/ignore@1.91 +0 -1 + [Bug 3052] Add a .gitignore file. Edmund Wong. + + ChangeLog@1.1822.1.2 +1 -0 + [Bug 3052] Add a .gitignore file. Edmund Wong. + +ChangeSet@1.3675, 2016-05-08 11:59:28+02:00, perlinger@ntp.org + [Sec 3043] Autokey association reset. perlinger@ntp.org + (fixes [Sec 3044] and [Sec 3045], too) + + ChangeLog@1.1825 +2 -0 + [Sec 3043] Autokey association reset. perlinger@ntp.org + + ntpd/ntp_proto.c@1.388 +28 -22 + [Sec 3043] Autokey association reset. perlinger@ntp.org + (fixes [Sec 3044] and [Sec 3045], too) + +ChangeSet@1.3674, 2016-05-06 11:05:44+00:00, stenn@psp-deb1.ntp.org + [Sec 3046] CRYPTO_NAK crash + + ChangeLog@1.1824 +1 -0 + [Sec 3046] CRYPTO_NAK crash + + ntpd/ntp_proto.c@1.387 +2 -1 + [Sec 3046] CRYPTO_NAK crash + +ChangeSet@1.3669.2.1, 2016-05-06 09:20:29+00:00, stenn@psp-deb1.ntp.org + Fix typo in ntp-wait and plot_summary. HStenn. + + ChangeLog@1.1820.2.1 +4 -0 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/invoke-plot_summary.texi@1.116 +2 -2 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/ntp-wait/ntp-wait.in@1.12 +1 -1 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/plot_summary-opts@1.64 +1 -1 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/plot_summary-opts.def@1.3 +1 -1 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/plot_summary.1plot_summaryman@1.114 +4 -4 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/plot_summary.1plot_summarymdoc@1.114 +3 -3 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/plot_summary.html@1.117 +58 -40 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/plot_summary.man.in@1.114 +4 -4 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/plot_summary.mdoc.in@1.114 +3 -3 + Fix typo in ntp-wait and plot_summary. HStenn. + + scripts/t/ntp-wait.t@1.2 +1 -1 + Fix typo in ntp-wait and plot_summary. HStenn. + +ChangeSet@1.3672, 2016-05-05 06:17:20+00:00, stenn@psp-deb1.ntp.org + Update NEWS file for 4.2.8p9 for Bug 3038 + + NEWS@1.170 +9 -0 + Update NEWS file for 4.2.8p9 for Bug 3038 + +ChangeSet@1.3671, 2016-05-05 06:09:53+00:00, stenn@psp-deb1.ntp.org + trivial cleanup + + ChangeLog@1.1822 +1 -0 + trivial cleanup + +ChangeSet@1.3670, 2016-04-27 21:54:12+02:00, perlinger@ntp.org + [Bug 3038] NTP fails to build in VS2015 Community Edition + - new build environment + - 'wint_t' and 'struct timespec' defined by VS2015 + - fixed several format clashes in 'printf()' and 'scanf' + + BitKeeper/etc/ignore@1.90 +1 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - skip next version of MSVC symbol database + + ChangeLog@1.1821 +6 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + + ntpd/refclock_parse.c@1.83 +6 -6 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - work around clash SOCKET vs file descriptor formatting + + ntpdc/ntpdc.c@1.107 +2 -2 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - fix format warnings/errors + + ntpq/ntpq.c@1.170 +5 -2 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - fix format warnings/errors + + ports/winnt/include/config.h@1.115 +4 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - VS2015 has 'wint_t' + + ports/winnt/include/sys/time.h@1.9 +2 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - VS2015 has 'struct timespec' + + ports/winnt/libntp/termios.c@1.33 +3 -3 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - fix format parsing error + + ports/winnt/ppsapi/loopback/src/sys/time.h@1.2 +2 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - VS2015 has 'struct timespec' + + ports/winnt/vs2013/common.props@1.3 +1 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + -enable multiprocessor build + + ports/winnt/vs2015/common.props@1.1 +60 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/common.props@1.0 +0 -0 + + ports/winnt/vs2015/debug-x64.props@1.1 +24 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/debug-x64.props@1.0 +0 -0 + + ports/winnt/vs2015/debug.props@1.1 +24 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/debug.props@1.0 +0 -0 + + ports/winnt/vs2015/instsrv/instsrv.vcxproj@1.1 +269 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/instsrv/instsrv.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/instsrv/instsrv.vcxproj.filters@1.1 +28 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/instsrv/instsrv.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/libntp/libntp.vcxproj@1.1 +431 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/libntp/libntp.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.1 +574 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj@1.1 +252 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj.filters@1.1 +39 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj@1.1 +270 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj.filters@1.1 +36 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/ntp.sln@1.1 +166 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntp.sln@1.0 +0 -0 + + ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.1 +227 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters@1.1 +69 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/ntpd/gen-ntp_keyword.bat@1.1 +53 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpd/gen-ntp_keyword.bat@1.0 +0 -0 + + ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.1 +515 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.1 +556 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/ntpdate/ntpdate.vcxproj@1.1 +287 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpdate/ntpdate.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/ntpdate/ntpdate.vcxproj.filters@1.1 +72 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpdate/ntpdate.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/ntpdc/ntpdc.vcxproj@1.1 +278 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpdc/ntpdc.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/ntpdc/ntpdc.vcxproj.filters@1.1 +45 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpdc/ntpdc.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/ntpq/ntpq.vcxproj@1.1 +277 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpq/ntpq.vcxproj@1.0 +0 -0 + + ports/winnt/vs2015/ntpq/ntpq.vcxproj.filters@1.1 +42 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/ntpq/ntpq.vcxproj.filters@1.0 +0 -0 + + ports/winnt/vs2015/release-x64.props@1.1 +25 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/release-x64.props@1.0 +0 -0 + + ports/winnt/vs2015/release.props@1.1 +25 -0 + [Bug 3038] NTP fails to build in VS2015 Community Edition + - add build environment + + ports/winnt/vs2015/release.props@1.0 +0 -0 + ChangeSet@1.3669, 2016-04-26 20:30:51-04:00, stenn@deacon.udel.edu NTP_4_2_8P7 TAG: NTP_4_2_8P7 Modified: vendor/ntp/dist/NEWS ============================================================================== --- vendor/ntp/dist/NEWS Fri Jun 3 05:27:34 2016 (r301237) +++ vendor/ntp/dist/NEWS Fri Jun 3 05:55:24 2016 (r301238) @@ -1,4 +1,116 @@ --- +NTP 4.2.8p8 (Harlan Stenn , 2016/06/02) + +Focus: Security, Bug fixes, enhancements. + +Severity: HIGH + +In addition to bug fixes and enhancements, this release fixes the +following 1 high- and 4 low-severity vulnerabilities: + +* CRYPTO_NAK crash + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3046 / CVE-2016-4957 / VU#321640 + Affects: ntp-4.2.8p7, and ntp-4.3.92. + CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C) + CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H + Summary: The fix for Sec 3007 in ntp-4.2.8p7 contained a bug that + could cause ntpd to crash. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + If you cannot upgrade from 4.2.8p7, the only other alternatives + are to patch your code or filter CRYPTO_NAK packets. + Properly monitor your ntpd instances, and auto-restart ntpd + (without -g) if it stops running. + Credit: This weakness was discovered by Nicolas Edet of Cisco. + +* Bad authentication demobilizes ephemeral associations + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3045 / CVE-2016-4953 / VU#321640 + Affects: ntp-4, up to but not including ntp-4.2.8p8, and + ntp-4.3.0 up to, but not including ntp-4.3.93. + CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: An attacker who knows the origin timestamp and can send a + spoofed packet containing a CRYPTO-NAK to an ephemeral peer + target before any other response is sent can demobilize that + association. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +* Processing spoofed server packets + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3044 / CVE-2016-4954 / VU#321640 + Affects: ntp-4, up to but not including ntp-4.2.8p8, and + ntp-4.3.0 up to, but not including ntp-4.3.93. + CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: An attacker who is able to spoof packets with correct origin + timestamps from enough servers before the expected response + packets arrive at the target machine can affect some peer + variables and, for example, cause a false leap indication to be set. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Jakub Prokes of Red Hat. + +* Autokey association reset + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3043 / CVE-2016-4955 / VU#321640 + Affects: ntp-4, up to but not including ntp-4.2.8p8, and + ntp-4.3.0 up to, but not including ntp-4.3.93. + CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: An attacker who is able to spoof a packet with a correct + origin timestamp before the expected response packet arrives at + the target machine can send a CRYPTO_NAK or a bad MAC and cause + the association's peer variables to be cleared. If this can be + done often enough, it will prevent that association from working. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +* Broadcast interleave + Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016 + References: Sec 3042 / CVE-2016-4956 / VU#321640 + Affects: ntp-4, up to but not including ntp-4.2.8p8, and + ntp-4.3.0 up to, but not including ntp-4.3.93. + CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P) + CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L + Summary: The fix for NtpBug2978 does not cover broadcast associations, + so broadcast clients can be triggered to flip into interleave mode. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p8, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page + Properly monitor your ntpd instances. + Credit: This weakness was discovered by Miroslav Lichvar of Red Hat. + +Other fixes: +* [Bug 3038] NTP fails to build in VS2015. perlinger@ntp.org + - provide build environment + - 'wint_t' and 'struct timespec' defined by VS2015 + - fixed print()/scanf() format issues +* [Bug 3052] Add a .gitignore file. Edmund Wong. +* [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite. +* [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback, + JPerlinger, HStenn. +* Fix typo in ntp-wait and plot_summary. HStenn. +* Make sure we have an "author" file for git imports. HStenn. +* Update the sntp problem tests for MacOS. HStenn. + +--- NTP 4.2.8p7 (Harlan Stenn , 2016/04/26) Focus: Security, Bug fixes, enhancements. Modified: vendor/ntp/dist/configure ============================================================================== --- vendor/ntp/dist/configure Fri Jun 3 05:27:34 2016 (r301237) +++ vendor/ntp/dist/configure Fri Jun 3 05:55:24 2016 (r301238) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ntp 4.2.8p7. +# Generated by GNU Autoconf 2.69 for ntp 4.2.8p8. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ntp' PACKAGE_TARNAME='ntp' -PACKAGE_VERSION='4.2.8p7' -PACKAGE_STRING='ntp 4.2.8p7' +PACKAGE_VERSION='4.2.8p8' +PACKAGE_STRING='ntp 4.2.8p8' PACKAGE_BUGREPORT='http://bugs.ntp.org./' PACKAGE_URL='http://www.ntp.org./' @@ -1618,7 +1618,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ntp 4.2.8p7 to adapt to many kinds of systems. +\`configure' configures ntp 4.2.8p8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1688,7 +1688,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ntp 4.2.8p7:";; + short | recursive ) echo "Configuration of ntp 4.2.8p8:";; esac cat <<\_ACEOF @@ -1924,7 +1924,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ntp configure 4.2.8p7 +ntp configure 4.2.8p8 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2754,7 +2754,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ntp $as_me 4.2.8p7, which was +It was created by ntp $as_me 4.2.8p8, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3755,7 +3755,7 @@ fi # Define the identity of the package. PACKAGE='ntp' - VERSION='4.2.8p7' + VERSION='4.2.8p8' cat >>confdefs.h <<_ACEOF @@ -37251,6 +37251,7 @@ fi + ### @@ -37309,6 +37310,8 @@ ac_config_files="$ac_config_files script *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Jun 3 06:01:33 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 923E2B68D48; Fri, 3 Jun 2016 06:01:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4901A1816; Fri, 3 Jun 2016 06:01:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5361WDv058327; Fri, 3 Jun 2016 06:01:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5361WP8058326; Fri, 3 Jun 2016 06:01:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201606030601.u5361WP8058326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 3 Jun 2016 06:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r301239 - vendor/ntp/4.2.8p8 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2016 06:01:33 -0000 Author: delphij Date: Fri Jun 3 06:01:32 2016 New Revision: 301239 URL: https://svnweb.freebsd.org/changeset/base/301239 Log: Tag ntp 4.2.8p8. Added: vendor/ntp/4.2.8p8/ - copied from r301238, vendor/ntp/dist/ From owner-svn-src-vendor@freebsd.org Sat Jun 4 14:50:14 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1F06B6ADFB; Sat, 4 Jun 2016 14:50:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DA451182; Sat, 4 Jun 2016 14:50:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u54EoDhS096705; Sat, 4 Jun 2016 14:50:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u54EoDKb096696; Sat, 4 Jun 2016 14:50:13 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201606041450.u54EoDKb096696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 4 Jun 2016 14:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r301333 - in vendor/libucl/dist: src uthash X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2016 14:50:14 -0000 Author: bapt Date: Sat Jun 4 14:50:12 2016 New Revision: 301333 URL: https://svnweb.freebsd.org/changeset/base/301333 Log: Update libucl to 20160604 snapshot Added: vendor/libucl/dist/src/mum.h (contents, props changed) Deleted: vendor/libucl/dist/src/xxhash.c vendor/libucl/dist/src/xxhash.h Modified: vendor/libucl/dist/src/Makefile.am vendor/libucl/dist/src/ucl_hash.c vendor/libucl/dist/src/ucl_internal.h vendor/libucl/dist/src/ucl_msgpack.c vendor/libucl/dist/src/ucl_parser.c vendor/libucl/dist/src/ucl_util.c vendor/libucl/dist/uthash/uthash.h Modified: vendor/libucl/dist/src/Makefile.am ============================================================================== --- vendor/libucl/dist/src/Makefile.am Sat Jun 4 14:48:48 2016 (r301332) +++ vendor/libucl/dist/src/Makefile.am Sat Jun 4 14:50:12 2016 (r301333) @@ -12,8 +12,7 @@ libucl_la_SOURCES= ucl_emitter.c \ ucl_schema.c \ ucl_util.c \ ucl_msgpack.c \ - ucl_sexp.c \ - xxhash.c + ucl_sexp.c libucl_la_CFLAGS= $(libucl_common_cflags) \ @CURL_CFLAGS@ libucl_la_LDFLAGS = -version-info @SO_VERSION@ @@ -25,7 +24,7 @@ libucl_la_LIBADD= @LIBFETCH_LIBS@ \ include_HEADERS= $(top_srcdir)/include/ucl.h \ $(top_srcdir)/include/ucl++.h noinst_HEADERS= ucl_internal.h \ - xxhash.h \ + mum.h \ ucl_hash.h \ ucl_chartable.h \ tree.h Added: vendor/libucl/dist/src/mum.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/dist/src/mum.h Sat Jun 4 14:50:12 2016 (r301333) @@ -0,0 +1,417 @@ +/* Copyright (c) 2016 Vladimir Makarov + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +/* This file implements MUM (MUltiply and Mix) hashing. We randomize + input data by 64x64-bit multiplication and mixing hi- and low-parts + of the multiplication result by using an addition and then mix it + into the current state. We use prime numbers randomly generated + with the equal probability of their bit values for the + multiplication. When all primes are used once, the state is + randomized and the same prime numbers are used again for data + randomization. + + The MUM hashing passes all SMHasher tests. Pseudo Random Number + Generator based on MUM also passes NIST Statistical Test Suite for + Random and Pseudorandom Number Generators for Cryptographic + Applications (version 2.2.1) with 1000 bitstreams each containing + 1M bits. MUM hashing is also faster Spooky64 and City64 on small + strings (at least upto 512-bit) on Haswell and Power7. The MUM bulk + speed (speed on very long data) is bigger than Spooky and City on + Power7. On Haswell the bulk speed is bigger than Spooky one and + close to City speed. */ + +#ifndef __MUM_HASH__ +#define __MUM_HASH__ + +#include +#include +#include +#include + +#ifdef _MSC_VER +typedef unsigned __int16 uint16_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; +#else +#include +#endif + +/* Macro saying to use 128-bit integers implemented by GCC for some + targets. */ +#ifndef _MUM_USE_INT128 +/* In GCC uint128_t is defined if HOST_BITS_PER_WIDE_INT >= 64. + HOST_WIDE_INT is long if HOST_BITS_PER_LONG > HOST_BITS_PER_INT, + otherwise int. */ +#if defined(__GNUC__) && UINT_MAX != ULONG_MAX +#define _MUM_USE_INT128 1 +#else +#define _MUM_USE_INT128 0 +#endif +#endif + +#if defined(__GNUC__) && ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9) || (__GNUC__ > 4)) +#define _MUM_FRESH_GCC +#endif + +#if defined(__GNUC__) && !defined(__llvm__) +#define _MUM_ATTRIBUTE_UNUSED __attribute__((unused)) +#define _MUM_OPTIMIZE(opts) __attribute__((__optimize__ (opts))) +#define _MUM_TARGET(opts) __attribute__((__target__ (opts))) +#else +#define _MUM_ATTRIBUTE_UNUSED +#define _MUM_OPTIMIZE(opts) +#define _MUM_TARGET(opts) +#endif + + +/* Here are different primes randomly generated with the equal + probability of their bit values. They are used to randomize input + values. */ +static uint64_t _mum_hash_step_prime = 0x2e0bb864e9ea7df5ULL; +static uint64_t _mum_key_step_prime = 0xcdb32970830fcaa1ULL; +static uint64_t _mum_block_start_prime = 0xc42b5e2e6480b23bULL; +static uint64_t _mum_unroll_prime = 0x7b51ec3d22f7096fULL; +static uint64_t _mum_tail_prime = 0xaf47d47c99b1461bULL; +static uint64_t _mum_finish_prime1 = 0xa9a7ae7ceff79f3fULL; +static uint64_t _mum_finish_prime2 = 0xaf47d47c99b1461bULL; + +static uint64_t _mum_primes [] = { + 0X9ebdcae10d981691, 0X32b9b9b97a27ac7d, 0X29b5584d83d35bbd, 0X4b04e0e61401255f, + 0X25e8f7b1f1c9d027, 0X80d4c8c000f3e881, 0Xbd1255431904b9dd, 0X8a3bd4485eee6d81, + 0X3bc721b2aad05197, 0X71b1a19b907d6e33, 0X525e6c1084a8534b, 0X9e4c2cd340c1299f, + 0Xde3add92e94caa37, 0X7e14eadb1f65311d, 0X3f5aa40f89812853, 0X33b15a3b587d15c9, +}; + +/* Multiply 64-bit V and P and return sum of high and low parts of the + result. */ +static inline uint64_t +_mum (uint64_t v, uint64_t p) { + uint64_t hi, lo; +#if _MUM_USE_INT128 +#if defined(__aarch64__) + /* AARCH64 needs 2 insns to calculate 128-bit result of the + multiplication. If we use a generic code we actually call a + function doing 128x128->128 bit multiplication. The function is + very slow. */ + lo = v * p, hi; + asm ("umulh %0, %1, %2" : "=r" (hi) : "r" (v), "r" (p)); +#else + __uint128_t r = (__uint128_t) v * (__uint128_t) p; + hi = (uint64_t) (r >> 64); + lo = (uint64_t) r; +#endif +#else + /* Implementation of 64x64->128-bit multiplication by four 32x32->64 + bit multiplication. */ + uint64_t hv = v >> 32, hp = p >> 32; + uint64_t lv = (uint32_t) v, lp = (uint32_t) p; + uint64_t rh = hv * hp; + uint64_t rm_0 = hv * lp; + uint64_t rm_1 = hp * lv; + uint64_t rl = lv * lp; + uint64_t t, carry = 0; + + /* We could ignore a carry bit here if we did not care about the + same hash for 32-bit and 64-bit targets. */ + t = rl + (rm_0 << 32); +#ifdef MUM_TARGET_INDEPENDENT_HASH + carry = t < rl; +#endif + lo = t + (rm_1 << 32); +#ifdef MUM_TARGET_INDEPENDENT_HASH + carry += lo < t; +#endif + hi = rh + (rm_0 >> 32) + (rm_1 >> 32) + carry; +#endif + /* We could use XOR here too but, for some reasons, on Haswell and + Power7 using an addition improves hashing performance by 10% for + small strings. */ + return hi + lo; +} + +#if defined(_MSC_VER) +#define _mum_bswap_32(x) _byteswap_uint32_t (x) +#define _mum_bswap_64(x) _byteswap_uint64_t (x) +#elif defined(__APPLE__) +#include +#define _mum_bswap_32(x) OSSwapInt32 (x) +#define _mum_bswap_64(x) OSSwapInt64 (x) +#elif defined(__GNUC__) +#define _mum_bswap32(x) __builtin_bswap32 (x) +#define _mum_bswap64(x) __builtin_bswap64 (x) +#else +#include +#define _mum_bswap32(x) bswap32 (x) +#define _mum_bswap64(x) bswap64 (x) +#endif + +static inline uint64_t +_mum_le (uint64_t v) { +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ || !defined(MUM_TARGET_INDEPENDENT_HASH) + return v; +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + return _mum_bswap64 (v); +#else +#error "Unknown endianess" +#endif +} + +static inline uint32_t +_mum_le32 (uint32_t v) { +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ || !defined(MUM_TARGET_INDEPENDENT_HASH) + return v; +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + return _mum_bswap32 (v); +#else +#error "Unknown endianess" +#endif +} + +/* Macro defining how many times the most nested loop in + _mum_hash_aligned will be unrolled by the compiler (although it can + make an own decision:). Use only a constant here to help a + compiler to unroll a major loop. + + The macro value affects the result hash for strings > 128 bit. The + unroll factor greatly affects the hashing speed. We prefer the + speed. */ +#ifndef _MUM_UNROLL_FACTOR_POWER +#if defined(__PPC64__) && !defined(MUM_TARGET_INDEPENDENT_HASH) +#define _MUM_UNROLL_FACTOR_POWER 3 +#elif defined(__aarch64__) && !defined(MUM_TARGET_INDEPENDENT_HASH) +#define _MUM_UNROLL_FACTOR_POWER 4 +#else +#define _MUM_UNROLL_FACTOR_POWER 2 +#endif +#endif + +#if _MUM_UNROLL_FACTOR_POWER < 1 +#error "too small unroll factor" +#elif _MUM_UNROLL_FACTOR_POWER > 4 +#error "We have not enough primes for such unroll factor" +#endif + +#define _MUM_UNROLL_FACTOR (1 << _MUM_UNROLL_FACTOR_POWER) + +static inline uint64_t _MUM_OPTIMIZE("unroll-loops") +_mum_hash_aligned (uint64_t start, const void *key, size_t len) { + uint64_t result = start; + const unsigned char *str = (const unsigned char *) key; + uint64_t u64; + int i; + size_t n; + + result = _mum (result, _mum_block_start_prime); + while (len > _MUM_UNROLL_FACTOR * sizeof (uint64_t)) { + /* This loop could be vectorized when we have vector insns for + 64x64->128-bit multiplication. AVX2 currently only have a + vector insn for 4 32x32->64-bit multiplication. */ + for (i = 0; i < _MUM_UNROLL_FACTOR; i++) + result ^= _mum (_mum_le (((uint64_t *) str)[i]), _mum_primes[i]); + len -= _MUM_UNROLL_FACTOR * sizeof (uint64_t); + str += _MUM_UNROLL_FACTOR * sizeof (uint64_t); + /* We will use the same prime numbers on the next iterations -- + randomize the state. */ + result = _mum (result, _mum_unroll_prime); + } + n = len / sizeof (uint64_t); + for (i = 0; i < (int)n; i++) + result ^= _mum (_mum_le (((uint64_t *) str)[i]), _mum_primes[i]); + len -= n * sizeof (uint64_t); str += n * sizeof (uint64_t); + switch (len) { + case 7: + u64 = _mum_le32 (*(uint32_t *) str); + u64 |= (uint64_t) str[4] << 32; + u64 |= (uint64_t) str[5] << 40; + u64 |= (uint64_t) str[6] << 48; + return result ^ _mum (u64, _mum_tail_prime); + case 6: + u64 = _mum_le32 (*(uint32_t *) str); + u64 |= (uint64_t) str[4] << 32; + u64 |= (uint64_t) str[5] << 40; + return result ^ _mum (u64, _mum_tail_prime); + case 5: + u64 = _mum_le32 (*(uint32_t *) str); + u64 |= (uint64_t) str[4] << 32; + return result ^ _mum (u64, _mum_tail_prime); + case 4: + u64 = _mum_le32 (*(uint32_t *) str); + return result ^ _mum (u64, _mum_tail_prime); + case 3: + u64 = str[0]; + u64 |= (uint64_t) str[1] << 8; + u64 |= (uint64_t) str[2] << 16; + return result ^ _mum (u64, _mum_tail_prime); + case 2: + u64 = str[0]; + u64 |= (uint64_t) str[1] << 8; + return result ^ _mum (u64, _mum_tail_prime); + case 1: + u64 = str[0]; + return result ^ _mum (u64, _mum_tail_prime); + } + return result; +} + +/* Final randomization of H. */ +static inline uint64_t +_mum_final (uint64_t h) { + h ^= _mum (h, _mum_finish_prime1); + h ^= _mum (h, _mum_finish_prime2); + return h; +} + +#if defined(__x86_64__) && defined(_MUM_FRESH_GCC) + +/* We want to use AVX2 insn MULX instead of generic x86-64 MULQ where + it is possible. Although on modern Intel processors MULQ takes + 3-cycles vs. 4 for MULX, MULX permits more freedom in insn + scheduling as it uses less fixed registers. */ +static inline uint64_t _MUM_TARGET("arch=haswell") +_mum_hash_avx2 (const void * key, size_t len, uint64_t seed) { + return _mum_final (_mum_hash_aligned (seed + len, key, len)); +} +#endif + +#ifndef _MUM_UNALIGNED_ACCESS +#if defined(__x86_64__) || defined(__i386__) || defined(__PPC64__) \ + || defined(__s390__) || defined(__m32c__) || defined(cris) \ + || defined(__CR16__) || defined(__vax__) || defined(__m68k__) \ + || defined(__aarch64__) +#define _MUM_UNALIGNED_ACCESS 1 +#else +#define _MUM_UNALIGNED_ACCESS 0 +#endif +#endif + +/* When we need an aligned access to data being hashed we move part of + the unaligned data to an aligned block of given size and then + process it, repeating processing the data by the block. */ +#ifndef _MUM_BLOCK_LEN +#define _MUM_BLOCK_LEN 1024 +#endif + +#if _MUM_BLOCK_LEN < 8 +#error "too small block length" +#endif + +static inline uint64_t +#if defined(__x86_64__) +_MUM_TARGET("inline-all-stringops") +#endif +_mum_hash_default (const void *key, size_t len, uint64_t seed) { + uint64_t result; + const unsigned char *str = (const unsigned char *) key; + size_t block_len; + uint64_t buf[_MUM_BLOCK_LEN / sizeof (uint64_t)]; + + result = seed + len; + if (_MUM_UNALIGNED_ACCESS || ((size_t) str & 0x7) == 0) + result = _mum_hash_aligned (result, key, len); + else { + while (len != 0) { + block_len = len < _MUM_BLOCK_LEN ? len : _MUM_BLOCK_LEN; + memmove (buf, str, block_len); + result = _mum_hash_aligned (result, buf, block_len); + len -= block_len; + str += block_len; + } + } + return _mum_final (result); +} + +static inline uint64_t +_mum_next_factor (void) { + uint64_t start = 0; + int i; + + for (i = 0; i < 8; i++) + start = (start << 8) | rand() % 256; + return start; +} + +/* ++++++++++++++++++++++++++ Interface functions: +++++++++++++++++++ */ + +/* Set random multiplicators depending on SEED. */ +static inline void +mum_hash_randomize (uint64_t seed) { + int i; + + srand (seed); + _mum_hash_step_prime = _mum_next_factor (); + _mum_key_step_prime = _mum_next_factor (); + _mum_finish_prime1 = _mum_next_factor (); + _mum_finish_prime2 = _mum_next_factor (); + _mum_block_start_prime = _mum_next_factor (); + _mum_unroll_prime = _mum_next_factor (); + _mum_tail_prime = _mum_next_factor (); + for (i = 0; i < (int)(sizeof (_mum_primes) / sizeof (uint64_t)); i++) + _mum_primes[i] = _mum_next_factor (); +} + +/* Start hashing data with SEED. Return the state. */ +static inline uint64_t +mum_hash_init (uint64_t seed) { + return seed; +} + +/* Process data KEY with the state H and return the updated state. */ +static inline uint64_t +mum_hash_step (uint64_t h, uint64_t key) +{ + return _mum (h, _mum_hash_step_prime) ^ _mum (key, _mum_key_step_prime); +} + +/* Return the result of hashing using the current state H. */ +static inline uint64_t +mum_hash_finish (uint64_t h) { + return _mum_final (h); +} + +/* Fast hashing of KEY with SEED. The hash is always the same for the + same key on any target. */ +static inline size_t +mum_hash64 (uint64_t key, uint64_t seed) { + return mum_hash_finish (mum_hash_step (mum_hash_init (seed), key)); +} + +/* Hash data KEY of length LEN and SEED. The hash depends on the + target endianess and the unroll factor. */ +static inline uint64_t +mum_hash (const void *key, size_t len, uint64_t seed) { +#if defined(__x86_64__) && defined(_MUM_FRESH_GCC) + static int avx2_support = 0; + + if (avx2_support > 0) + return _mum_hash_avx2 (key, len, seed); + else if (! avx2_support) { + __builtin_cpu_init (); + avx2_support = __builtin_cpu_supports ("avx2") ? 1 : -1; + if (avx2_support > 0) + return _mum_hash_avx2 (key, len, seed); + } +#endif + return _mum_hash_default (key, len, seed); +} + +#endif Modified: vendor/libucl/dist/src/ucl_hash.c ============================================================================== --- vendor/libucl/dist/src/ucl_hash.c Sat Jun 4 14:48:48 2016 (r301332) +++ vendor/libucl/dist/src/ucl_hash.c Sat Jun 4 14:50:12 2016 (r301333) @@ -25,6 +25,7 @@ #include "ucl_hash.h" #include "khash.h" #include "kvec.h" +#include "mum.h" #include #include @@ -99,20 +100,11 @@ static const unsigned char lc_map[256] = #define UCL64_BIT_HASH 1 #endif -#ifdef UCL64_BIT_HASH static inline uint32_t ucl_hash_func (const ucl_object_t *o) { - return XXH64 (o->key, o->keylen, ucl_hash_seed ()); + return mum_hash (o->key, o->keylen, ucl_hash_seed ()); } -#else -static inline uint32_t -ucl_hash_func (const ucl_object_t *o) -{ - return XXH32 (o->key, o->keylen, ucl_hash_seed ()); -} -#endif - static inline int ucl_hash_equal (const ucl_object_t *k1, const ucl_object_t *k2) { @@ -126,91 +118,60 @@ ucl_hash_equal (const ucl_object_t *k1, KHASH_INIT (ucl_hash_node, const ucl_object_t *, struct ucl_hash_elt, 1, ucl_hash_func, ucl_hash_equal) -#ifdef UCL64_BIT_HASH static inline uint32_t ucl_hash_caseless_func (const ucl_object_t *o) { unsigned len = o->keylen; - unsigned leftover = o->keylen % 4; + unsigned leftover = o->keylen % 8; unsigned fp, i; const uint8_t* s = (const uint8_t*)o->key; union { struct { - unsigned char c1, c2, c3, c4; + unsigned char c1, c2, c3, c4, c5, c6, c7, c8; } c; - uint32_t pp; + uint64_t pp; } u; - XXH64_state_t st; + uint64_t r; fp = len - leftover; - XXH64_reset (&st, ucl_hash_seed ()); + r = ucl_hash_seed (); - for (i = 0; i != fp; i += 4) { + for (i = 0; i != fp; i += 8) { u.c.c1 = s[i], u.c.c2 = s[i + 1], u.c.c3 = s[i + 2], u.c.c4 = s[i + 3]; + u.c.c5 = s[i + 4], u.c.c6 = s[i + 5], u.c.c7 = s[i + 6], u.c.c8 = s[i + 7]; u.c.c1 = lc_map[u.c.c1]; u.c.c2 = lc_map[u.c.c2]; u.c.c3 = lc_map[u.c.c3]; u.c.c4 = lc_map[u.c.c4]; - XXH64_update (&st, &u.pp, sizeof (u)); + u.c.c1 = lc_map[u.c.c5]; + u.c.c2 = lc_map[u.c.c6]; + u.c.c3 = lc_map[u.c.c7]; + u.c.c4 = lc_map[u.c.c8]; + r = mum_hash_step (r, u.pp); } u.pp = 0; switch (leftover) { + case 7: + u.c.c7 = lc_map[(unsigned char)s[i++]]; + case 6: + u.c.c6 = lc_map[(unsigned char)s[i++]]; + case 5: + u.c.c5 = lc_map[(unsigned char)s[i++]]; + case 4: + u.c.c4 = lc_map[(unsigned char)s[i++]]; case 3: u.c.c3 = lc_map[(unsigned char)s[i++]]; case 2: u.c.c2 = lc_map[(unsigned char)s[i++]]; case 1: u.c.c1 = lc_map[(unsigned char)s[i]]; - XXH64_update (&st, &u.pp, leftover); + r = mum_hash_step (r, u.pp); break; } - return XXH64_digest (&st); + return mum_hash_finish (r); } -#else -static inline uint32_t -ucl_hash_caseless_func (const ucl_object_t *o) -{ - unsigned len = o->keylen; - unsigned leftover = o->keylen % 4; - unsigned fp, i; - const uint8_t* s = (const uint8_t*)o->key; - union { - struct { - unsigned char c1, c2, c3, c4; - } c; - uint32_t pp; - } u; - XXH32_state_t st; - - fp = len - leftover; - XXH32_reset (&st, ucl_hash_seed ()); - - for (i = 0; i != fp; i += 4) { - u.c.c1 = s[i], u.c.c2 = s[i + 1], u.c.c3 = s[i + 2], u.c.c4 = s[i + 3]; - u.c.c1 = lc_map[u.c.c1]; - u.c.c2 = lc_map[u.c.c2]; - u.c.c3 = lc_map[u.c.c3]; - u.c.c4 = lc_map[u.c.c4]; - XXH32_update (&st, &u.pp, sizeof (u)); - } - - u.pp = 0; - switch (leftover) { - case 3: - u.c.c3 = lc_map[(unsigned char)s[i++]]; - case 2: - u.c.c2 = lc_map[(unsigned char)s[i++]]; - case 1: - u.c.c1 = lc_map[(unsigned char)s[i]]; - XXH32_update (&st, &u.pp, leftover); - break; - } - - return XXH32_digest (&st); -} -#endif static inline int ucl_hash_caseless_equal (const ucl_object_t *k1, const ucl_object_t *k2) Modified: vendor/libucl/dist/src/ucl_internal.h ============================================================================== --- vendor/libucl/dist/src/ucl_internal.h Sat Jun 4 14:48:48 2016 (r301332) +++ vendor/libucl/dist/src/ucl_internal.h Sat Jun 4 14:50:12 2016 (r301333) @@ -93,7 +93,6 @@ #include "uthash.h" #include "ucl.h" #include "ucl_hash.h" -#include "xxhash.h" #ifdef HAVE_OPENSSL #include Modified: vendor/libucl/dist/src/ucl_msgpack.c ============================================================================== --- vendor/libucl/dist/src/ucl_msgpack.c Sat Jun 4 14:48:48 2016 (r301332) +++ vendor/libucl/dist/src/ucl_msgpack.c Sat Jun 4 14:50:12 2016 (r301333) @@ -1423,6 +1423,10 @@ ucl_msgpack_parse_int (struct ucl_parser int16_t iv16; int32_t iv32; int64_t iv64; + uint16_t uiv16; + uint32_t uiv32; + uint64_t uiv64; + if (len > remain) { return -1; @@ -1455,7 +1459,9 @@ ucl_msgpack_parse_int (struct ucl_parser len = 2; break; case msgpack_uint16: - obj->value.iv = FROM_BE16 (*(uint16_t *)pos); + memcpy (&uiv16, pos, sizeof (uiv16)); + uiv16 = FROM_BE16 (uiv16); + obj->value.iv = uiv16; len = 2; break; case msgpack_int32: @@ -1465,7 +1471,9 @@ ucl_msgpack_parse_int (struct ucl_parser len = 4; break; case msgpack_uint32: - obj->value.iv = FROM_BE32 (*(uint32_t *)pos); + memcpy(&uiv32, pos, sizeof(uiv32)); + uiv32 = FROM_BE32(uiv32); + obj->value.iv = uiv32; len = 4; break; case msgpack_int64: @@ -1475,7 +1483,9 @@ ucl_msgpack_parse_int (struct ucl_parser len = 8; break; case msgpack_uint64: - obj->value.iv = FROM_BE64 (*(uint64_t *)pos); + memcpy(&uiv64, pos, sizeof(uiv64)); + uiv64 = FROM_BE64(uiv64); + obj->value.iv = uiv64; len = 8; break; default: @@ -1498,6 +1508,7 @@ ucl_msgpack_parse_float (struct ucl_pars uint32_t i; float f; } d; + uint64_t uiv64; if (len > remain) { return -1; @@ -1507,13 +1518,16 @@ ucl_msgpack_parse_float (struct ucl_pars switch (fmt) { case msgpack_float32: - d.i = FROM_BE32 (*(uint32_t *)pos); + memcpy(&d.i, pos, sizeof(d.i)); + d.i = FROM_BE32(d.i); /* XXX: can be slow */ obj->value.dv = d.f; len = 4; break; case msgpack_float64: - obj->value.iv = FROM_BE64 (*(uint64_t *)pos); + memcpy(&uiv64, pos, sizeof(uiv64)); + uiv64 = FROM_BE64(uiv64); + obj->value.iv = uiv64; len = 8; break; default: Modified: vendor/libucl/dist/src/ucl_parser.c ============================================================================== --- vendor/libucl/dist/src/ucl_parser.c Sat Jun 4 14:48:48 2016 (r301332) +++ vendor/libucl/dist/src/ucl_parser.c Sat Jun 4 14:50:12 2016 (r301333) @@ -2597,12 +2597,7 @@ ucl_parser_add_chunk_full (struct ucl_pa return false; } - if (len == 0) { - parser->top_obj = ucl_object_new_full (UCL_OBJECT, priority); - return true; - } - - if (data == NULL) { + if (data == NULL && len != 0) { ucl_create_err (&parser->err, "invalid chunk added"); return false; } @@ -2613,6 +2608,7 @@ ucl_parser_add_chunk_full (struct ucl_pa ucl_create_err (&parser->err, "cannot allocate chunk structure"); return false; } + chunk->begin = data; chunk->remain = len; chunk->pos = chunk->begin; @@ -2631,12 +2627,27 @@ ucl_parser_add_chunk_full (struct ucl_pa return false; } - switch (parse_type) { - default: - case UCL_PARSE_UCL: - return ucl_state_machine (parser); - case UCL_PARSE_MSGPACK: - return ucl_parse_msgpack (parser); + if (len > 0) { + /* Need to parse something */ + switch (parse_type) { + default: + case UCL_PARSE_UCL: + return ucl_state_machine (parser); + case UCL_PARSE_MSGPACK: + return ucl_parse_msgpack (parser); + } + } + else { + /* Just add empty chunk and go forward */ + if (parser->top_obj == NULL) { + /* + * In case of empty object, create one to indicate that we've + * read something + */ + parser->top_obj = ucl_object_new_full (UCL_OBJECT, priority); + } + + return true; } } Modified: vendor/libucl/dist/src/ucl_util.c ============================================================================== --- vendor/libucl/dist/src/ucl_util.c Sat Jun 4 14:48:48 2016 (r301332) +++ vendor/libucl/dist/src/ucl_util.c Sat Jun 4 14:50:12 2016 (r301333) @@ -975,6 +975,7 @@ ucl_include_file_single (const unsigned if (params->soft_fail) { return false; } + return (!params->must_exist || false); } @@ -1172,11 +1173,14 @@ ucl_include_file_single (const unsigned res = ucl_parser_add_chunk_full (parser, buf, buflen, params->priority, params->strat, params->parse_type); - if (!res && !params->must_exist) { - /* Free error */ - utstring_free (parser->err); - parser->err = NULL; - parser->state = UCL_STATE_AFTER_VALUE; + + if (!res) { + if (!params->must_exist) { + /* Free error */ + utstring_free (parser->err); + parser->err = NULL; + res = true; + } } /* Stop nesting the include, take 1 level off the stack */ @@ -1849,6 +1853,9 @@ ucl_parser_add_fd_priority (struct ucl_p fd, strerror (errno)); return false; } + if (st.st_size == 0) { + return true; + } if ((buf = ucl_mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) { ucl_create_err (&parser->err, "cannot mmap fd %d: %s", fd, strerror (errno)); Modified: vendor/libucl/dist/uthash/uthash.h ============================================================================== --- vendor/libucl/dist/uthash/uthash.h Sat Jun 4 14:48:48 2016 (r301332) +++ vendor/libucl/dist/uthash/uthash.h Sat Jun 4 14:50:12 2016 (r301333) @@ -22,12 +22,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI */ #ifndef UTHASH_H -#define UTHASH_H +#define UTHASH_H #include /* memcmp,strlen */ #include /* ptrdiff_t */ #include /* exit() */ -#include "xxhash.h" +#include "mum.h" /* These macros use decltype or the earlier __typeof GNU extension. As decltype is only available in newer compilers (VS2010 or gcc 4.3+ @@ -50,7 +50,7 @@ do { char **_da_dst = (char**)(&(dst)); \ *_da_dst = (char*)(src); \ } while(0) -#else +#else #define DECLTYPE_ASSIGN(dst,src) \ do { \ (dst) = DECLTYPE(dst)(src); \ @@ -115,12 +115,12 @@ do { if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \ memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \ (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \ -} while (0) +} while (0) #define HASH_BLOOM_FREE(tbl) \ do { \ uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \ -} while (0) +} while (0) #define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8))) #define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8))) @@ -132,9 +132,9 @@ do { HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) #else -#define HASH_BLOOM_MAKE(tbl) -#define HASH_BLOOM_FREE(tbl) -#define HASH_BLOOM_ADD(tbl,hashv) +#define HASH_BLOOM_MAKE(tbl) +#define HASH_BLOOM_FREE(tbl) +#define HASH_BLOOM_ADD(tbl,hashv) #define HASH_BLOOM_TEST(tbl,hashv) (1) #define HASH_BLOOM_BYTELEN 0 #endif @@ -170,7 +170,7 @@ do { }; \ HASH_ADD(hh,head,fieldname,keylen_in,add); \ } while(0) - + #define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ do { \ unsigned _ha_bkt; \ @@ -328,10 +328,10 @@ do { } \ } while (0) #else -#define HASH_FSCK(hh,head) +#define HASH_FSCK(hh,head) #endif -/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to +/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to * the descriptor to which this macro is defined for tuning the hash function. * The app can #include to get the prototype for write(2). */ #ifdef HASH_EMIT_KEYS @@ -341,12 +341,12 @@ do { write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ write(HASH_EMIT_KEYS, keyptr, fieldlen); \ } while (0) -#else -#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) +#else +#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) #endif /* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ -#ifdef HASH_FUNCTION +#ifdef HASH_FUNCTION #define HASH_FCN HASH_FUNCTION #else #define HASH_FCN HASH_XX @@ -356,14 +356,14 @@ do { #define HASH_XX(key,keylen,num_bkts,hashv,bkt) \ do { \ - hashv = XXH32 (key, keylen, XX_HASH_PRIME); \ + hashv = mum_hash (key, keylen, XX_HASH_PRIME); \ bkt = (hashv) & (num_bkts-1); \ } while (0) /* key comparison function; return 0 if keys equal */ -#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) +#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) /* iterate over items in a known bucket to find desired item */ #define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ @@ -404,36 +404,36 @@ do { } \ if (hh_del->hh_next) { \ hh_del->hh_next->hh_prev = hh_del->hh_prev; \ - } + } /* Bucket expansion has the effect of doubling the number of buckets * and redistributing the items into the new buckets. Ideally the * items will distribute more or less evenly into the new buckets * (the extent to which this is true is a measure of the quality of - * the hash function as it applies to the key domain). - * + * the hash function as it applies to the key domain). + * * With the items distributed into more buckets, the chain length * (item count) in each bucket is reduced. Thus by expanding buckets - * the hash keeps a bound on the chain length. This bounded chain + * the hash keeps a bound on the chain length. This bounded chain * length is the essence of how a hash provides constant time lookup. - * + * * The calculation of tbl->ideal_chain_maxlen below deserves some * explanation. First, keep in mind that we're calculating the ideal * maximum chain length based on the *new* (doubled) bucket count. * In fractions this is just n/b (n=number of items,b=new num buckets). - * Since the ideal chain length is an integer, we want to calculate + * Since the ideal chain length is an integer, we want to calculate * ceil(n/b). We don't depend on floating point arithmetic in this * hash, so to calculate ceil(n/b) with integers we could write - * + * * ceil(n/b) = (n/b) + ((n%b)?1:0) - * + * * and in fact a previous version of this hash did just that. * But now we have improved things a bit by recognizing that b is * always a power of two. We keep its base 2 log handy (call it lb), * so now we can write this with a bit shift and logical AND: - * + * * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) - * + * */ #define HASH_EXPAND_BUCKETS(tbl) \ do { \ @@ -485,7 +485,7 @@ do { /* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ -/* Note that HASH_SORT assumes the hash handle name to be hh. +/* Note that HASH_SORT assumes the hash handle name to be hh. * HASH_SRT was added to allow the hash handle name to be passed in. */ #define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) #define HASH_SRT(hh,head,cmpfcn) \ @@ -575,10 +575,10 @@ do { } \ } while (0) -/* This function selects items from one hash into another hash. - * The end result is that the selected items have dual presence - * in both hashes. There is no copy of the items made; rather - * they are added into the new hash through a secondary hash +/* This function selects items from one hash into another hash. + * The end result is that the selected items have dual presence + * in both hashes. There is no copy of the items made; rather + * they are added into the new hash through a secondary hash * hash handle that must be present in the structure. */ #define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ do { \ @@ -638,7 +638,7 @@ do { #ifdef NO_DECLTYPE #define HASH_ITER(hh,head,el,tmp) \ for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \ - el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) + el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) #else #define HASH_ITER(hh,head,el,tmp) \ for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \ @@ -646,7 +646,7 @@ for((el)=(head),(tmp)=DECLTYPE(el)((head #endif /* obtain a count of items in the hash */ -#define HASH_COUNT(head) HASH_CNT(hh,head) +#define HASH_COUNT(head) HASH_CNT(hh,head) #define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0) typedef struct UT_hash_bucket { @@ -655,7 +655,7 @@ typedef struct UT_hash_bucket { /* expand_mult is normally set to 0. In this situation, the max chain length * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If - * the bucket's chain exceeds this length, bucket expansion is triggered). + * the bucket's chain exceeds this length, bucket expansion is triggered). * However, setting expand_mult to a non-zero value delays bucket expansion * (that would be triggered by additions to this particular bucket) * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. @@ -663,7 +663,7 @@ typedef struct UT_hash_bucket { * multiplier is to reduce bucket expansions, since they are expensive, in * situations where we know that a particular bucket tends to be overused. * It is better to let its chain length grow to a longer yet-still-bounded - * value, than to do an O(n) bucket expansion too often. + * value, than to do an O(n) bucket expansion too often. */ unsigned expand_mult; @@ -689,7 +689,7 @@ typedef struct UT_hash_table { * hash distribution; reaching them in a chain traversal takes >ideal steps */ unsigned nonideal_items; - /* ineffective expands occur when a bucket doubling was performed, but + /* ineffective expands occur when a bucket doubling was performed, but * afterward, more than half the items in the hash had nonideal chain * positions. If this happens on two consecutive expansions we inhibit any * further expansion, as it's not helping; this happens when the hash From owner-svn-src-vendor@freebsd.org Sat Jun 4 14:51:36 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37E76B6AF99; Sat, 4 Jun 2016 14:51:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3FFD1775; Sat, 4 Jun 2016 14:51:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u54EpZJc099579; Sat, 4 Jun 2016 14:51:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u54EpZux099578; Sat, 4 Jun 2016 14:51:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201606041451.u54EpZux099578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 4 Jun 2016 14:51:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r301335 - vendor/libucl/20160604 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2016 14:51:36 -0000 Author: bapt Date: Sat Jun 4 14:51:34 2016 New Revision: 301335 URL: https://svnweb.freebsd.org/changeset/base/301335 Log: tag import of libucl 20160604 Added: vendor/libucl/20160604/ - copied from r301334, vendor/libucl/dist/