cleanup FBSDID

2019-03-12 Thread Kevin Lo
ok?

Index: lib/libc/arch/amd64/sys/tfork_thread.S
===
RCS file: /cvs/src/lib/libc/arch/amd64/sys/tfork_thread.S,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 tfork_thread.S
--- lib/libc/arch/amd64/sys/tfork_thread.S  7 May 2016 19:05:21 -   
1.6
+++ lib/libc/arch/amd64/sys/tfork_thread.S  13 Mar 2019 05:33:28 -
@@ -24,12 +24,11 @@
  * 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.
+ * 
+ * $FreeBSD: /repoman/r/ncvs/src/lib/libc/amd64/gen/rfork_thread.S,v 1.1 
2003/10/13 20:32:33 alc Exp $
  */
 
 #include 
-#if 0
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/amd64/gen/rfork_thread.S,v 
1.1 2003/10/13 20:32:33 alc Exp $");
-#endif
 
 /*
  * With thanks to John Dyson for the original version of this.
Index: lib/libc/arch/i386/sys/tfork_thread.S
===
RCS file: /cvs/src/lib/libc/arch/i386/sys/tfork_thread.S,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 tfork_thread.S
--- lib/libc/arch/i386/sys/tfork_thread.S   7 May 2016 19:05:21 -   
1.8
+++ lib/libc/arch/i386/sys/tfork_thread.S   13 Mar 2019 05:33:28 -
@@ -23,12 +23,11 @@
  * 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.
+ *
+ * $FreeBSD: /repoman/r/ncvs/src/lib/libc/i386/gen/rfork_thread.S,v 1.5 
2003/05/07 17:23:25 jhb Exp $
  */
 
 #include 
-#if 0
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/i386/gen/rfork_thread.S,v 1.5 
2003/05/07 17:23:25 jhb Exp $");
-#endif
 
 /*
  * With thanks to John Dyson for the original version of this.
Index: lib/libc/arch/sparc64/fpu/fpu_add.c
===
RCS file: /cvs/src/lib/libc/arch/sparc64/fpu/fpu_add.c,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 fpu_add.c
--- lib/libc/arch/sparc64/fpu/fpu_add.c 5 Dec 2012 23:19:59 -   1.2
+++ lib/libc/arch/sparc64/fpu/fpu_add.c 13 Mar 2019 05:33:28 -
@@ -43,11 +43,9 @@
  *
  * @(#)fpu_add.c   8.1 (Berkeley) 6/11/93
  * $NetBSD: fpu_add.c,v 1.3 1996/03/14 19:41:52 christos Exp $
+ *
+ * $FreeBSD: src/lib/libc/sparc64/fpu/fpu_add.c,v 1.4 2002/04/27 21:56:28 jake 
Exp $
  */
-
-#if 0
-__FBSDID("$FreeBSD: src/lib/libc/sparc64/fpu/fpu_add.c,v 1.4 2002/04/27 
21:56:28 jake Exp $");
-#endif
 
 /*
  * Perform an FPU add (return x + y).
Index: lib/libc/arch/sparc64/fpu/fpu_compare.c
===
RCS file: /cvs/src/lib/libc/arch/sparc64/fpu/fpu_compare.c,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 fpu_compare.c
--- lib/libc/arch/sparc64/fpu/fpu_compare.c 5 Dec 2012 23:19:59 -   
1.2
+++ lib/libc/arch/sparc64/fpu/fpu_compare.c 13 Mar 2019 05:33:28 -
@@ -43,11 +43,9 @@
  *
  * @(#)fpu_compare.c   8.1 (Berkeley) 6/11/93
  * $NetBSD: fpu_compare.c,v 1.3 2001/08/26 05:46:31 eeh Exp $
+ *
+ * $FreeBSD: src/lib/libc/sparc64/fpu/fpu_compare.c,v 1.4 2002/03/22 21:52:58 
obrien Exp $
  */
-
-#if 0
-__FBSDID("$FreeBSD: src/lib/libc/sparc64/fpu/fpu_compare.c,v 1.4 2002/03/22 
21:52:58 obrien Exp $");
-#endif
 
 /*
  * CMP and CMPE instructions.
Index: lib/libc/arch/sparc64/fpu/fpu_div.c
===
RCS file: /cvs/src/lib/libc/arch/sparc64/fpu/fpu_div.c,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 fpu_div.c
--- lib/libc/arch/sparc64/fpu/fpu_div.c 26 Nov 2013 20:33:07 -  1.3
+++ lib/libc/arch/sparc64/fpu/fpu_div.c 13 Mar 2019 05:33:28 -
@@ -43,11 +43,9 @@
  *
  * @(#)fpu_div.c   8.1 (Berkeley) 6/11/93
  * $NetBSD: fpu_div.c,v 1.2 1994/11/20 20:52:38 deraadt Exp $
+ *
+ * $FreeBSD: src/lib/libc/sparc64/fpu/fpu_div.c,v 1.3 2002/03/22 21:52:58 
obrien Exp $
  */
-
-#if 0
-__FBSDID("$FreeBSD: src/lib/libc/sparc64/fpu/fpu_div.c,v 1.3 2002/03/22 
21:52:58 obrien Exp $");
-#endif
 
 /*
  * Perform an FPU divide (return x / y).
Index: lib/libc/arch/sparc64/fpu/fpu_explode.c
===
RCS file: /cvs/src/lib/libc/arch/sparc64/fpu/fpu_explode.c,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 fpu_explode.c
--- lib/libc/arch/sparc64/fpu/fpu_explode.c 8 May 2016 18:41:17 -   
1.8
+++ lib/libc/arch/sparc64/fpu/fpu_explode.c 13 Mar 2019 05:33:28 -
@@ -43,11 +43,9 @@
  *
  * @(#)fpu_explode.c   8.1 (Berkeley) 6/11/93
  * $NetBSD: fpu_explode.c,v 1.5 2000/08/03 18:32:08 eeh Exp $
+ *
+ * $FreeBSD: src/lib/libc/sparc64/fpu/fpu_explode.c,v 1.5 2002/05/11 21:20:04 
jake Exp $
  */
-
-#if 0
-__FBSDID("$FreeBSD: src/lib/libc/sparc64/fpu/fpu_explode.c,v 1.5 2002/05/11 
21:20:04 jake Exp $");
-#endif
 
 /*
  * FPU subroutines: `explode' the machine's `packed binary' format numbers

Re: libcrypto: INTEGER_cmp vs. STRING_cmp

2019-03-12 Thread Theo Buehler
On Wed, Mar 06, 2019 at 11:16:07PM +0100, Holger Mikolon wrote:
> 
> > Date: Wed, 6 Mar 2019 06:31:17
> > From: Theo Buehler 
> 
> (snip)
> 
> > If you're up for it, it would probably be a good idea to look at the
> > changes introduced by the commit you mentioned and see what else looks
> > suspicious and needs fixing.
> 
> (snip)
> 
> I went through the files affected by said commit and focused on INTEGER 
> vs. STRING mixup only (mostly related to serialNumber, once related to 
> zone). Then I greped through the rest of libcrypto sources and found just 
> x_crl.c to have a mixup.

Much better, thanks. Except for the first one, they match what BoringSSL
and OpenSSL are doing.

ok tb

> I did not touch asn1/a_strnid.c, where the serialNumber is listed as
> B_ASN1_PRINTABLESTRING. I don't know enough here, so I better leave
> this for the experts.

I think this should stay as it is.

>
> Holger  
>
> 
> 
> Index: asn1/x_crl.c
> ===
> RCS file: /cvs/src/lib/libcrypto/asn1/x_crl.c,v
> retrieving revision 1.33
> diff -u -p -u -r1.33 x_crl.c
> --- asn1/x_crl.c  24 Aug 2018 19:55:58 -  1.33
> +++ asn1/x_crl.c  6 Mar 2019 21:46:52 -
> @@ -527,9 +527,7 @@ X509_CRL_dup(X509_CRL *x)
>  static int
>  X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const 
> *b)
>  {
> - return(ASN1_STRING_cmp(
> - (ASN1_STRING *)(*a)->serialNumber,
> - (ASN1_STRING *)(*b)->serialNumber));
> + return(ASN1_INTEGER_cmp((*a)->serialNumber, (*b)->serialNumber));
>  }
>  
>  int
> Index: pkcs7/pk7_doit.c
> ===
> RCS file: /cvs/src/lib/libcrypto/pkcs7/pk7_doit.c,v
> retrieving revision 1.42
> diff -u -p -u -r1.42 pk7_doit.c
> --- pkcs7/pk7_doit.c  2 May 2017 03:59:45 -   1.42
> +++ pkcs7/pk7_doit.c  6 Mar 2019 21:46:52 -
> @@ -410,7 +410,7 @@ pkcs7_cmp_ri(PKCS7_RECIP_INFO *ri, X509 
>   pcert->cert_info->issuer);
>   if (ret)
>   return ret;
> - return ASN1_STRING_cmp(pcert->cert_info->serialNumber,
> + return ASN1_INTEGER_cmp(pcert->cert_info->serialNumber,
>   ri->issuer_and_serial->serial);
>  }
>  
> Index: pkcs7/pk7_lib.c
> ===
> RCS file: /cvs/src/lib/libcrypto/pkcs7/pk7_lib.c,v
> retrieving revision 1.19
> diff -u -p -u -r1.19 pk7_lib.c
> --- pkcs7/pk7_lib.c   29 Jan 2017 17:49:23 -  1.19
> +++ pkcs7/pk7_lib.c   6 Mar 2019 21:46:53 -
> @@ -374,7 +374,7 @@ PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO 
>* things the ugly way. */
>   ASN1_INTEGER_free(p7i->issuer_and_serial->serial);
>   if (!(p7i->issuer_and_serial->serial =
> - ASN1_STRING_dup(X509_get_serialNumber(x509
> + ASN1_INTEGER_dup(X509_get_serialNumber(x509
>   goto err;
>  
>   /* lets keep the pkey around for a while */
> @@ -534,7 +534,7 @@ PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p
>  
>   ASN1_INTEGER_free(p7i->issuer_and_serial->serial);
>   if (!(p7i->issuer_and_serial->serial =
> - ASN1_STRING_dup(X509_get_serialNumber(x509
> + ASN1_INTEGER_dup(X509_get_serialNumber(x509
>   return 0;
>  
>   pkey = X509_get_pubkey(x509);
> Index: x509/x509_cmp.c
> ===
> RCS file: /cvs/src/lib/libcrypto/x509/x509_cmp.c,v
> retrieving revision 1.34
> diff -u -p -u -r1.34 x509_cmp.c
> --- x509/x509_cmp.c   24 Aug 2018 19:59:32 -  1.34
> +++ x509/x509_cmp.c   6 Mar 2019 21:46:53 -
> @@ -76,7 +76,7 @@ X509_issuer_and_serial_cmp(const X509 *a
>  
>   ai = a->cert_info;
>   bi = b->cert_info;
> - i = ASN1_STRING_cmp(ai->serialNumber, bi->serialNumber);
> + i = ASN1_INTEGER_cmp(ai->serialNumber, bi->serialNumber);
>   if (i)
>   return (i);
>   return (X509_NAME_cmp(ai->issuer, bi->issuer));
> Index: x509v3/v3_sxnet.c
> ===
> RCS file: /cvs/src/lib/libcrypto/x509v3/v3_sxnet.c,v
> retrieving revision 1.21
> diff -u -p -u -r1.21 v3_sxnet.c
> --- x509v3/v3_sxnet.c 13 May 2018 15:03:01 -  1.21
> +++ x509v3/v3_sxnet.c 6 Mar 2019 21:46:53 -
> @@ -376,7 +376,7 @@ SXNET_get_id_INTEGER(SXNET *sx, ASN1_INT
>  
>   for (i = 0; i < sk_SXNETID_num(sx->ids); i++) {
>   id = sk_SXNETID_value(sx->ids, i);
> - if (!ASN1_STRING_cmp(id->zone, zone))
> + if (!ASN1_INTEGER_cmp(id->zone, zone))
>   return id->user;
>   }
>   return NULL;



wscons: precision scrolling

2019-03-12 Thread Ulf Brosziewski
The standard method of scrolling in X is tailored to mouse wheels and
proceeds in coarse steps.  Wheel events are mapped to button events, and on
receiving such an event, an application moves the view of its data by some
fixed distance - usually the height of a line of text, or of a couple of
lines.

Version 2.1 of the X Input Protocol has introduced a more precise
alternative.  It defines additional types of motion events.  In essence,
their values represent fractions of a complete scroll unit, and newer
applications may move their views by distances that are proportional to the
event values.  For applications that don't support this, X generates the
standard button events whenever the values add up to the complete unit.

synaptics(4) supports the newer method since long.

The diffs below add the feature to ws and wstpad.  The kernel part defines
two new event types in wsconsio.h, and it adapts the scrolling functions of
the touchpad input driver.  The xenocara part adds the new "axes" and event
handlers to ws.

There is a little twist to the implementation.  While synaptics(4)
initializes the scroll axes with the scroll distance in device units, the
constant 4096 is used in the new ws code, and event values represent the
fraction (motion_delta / scroll_unit) in [*.12] fixed-point format.  That
way, no queries for the device- and configuration-dependent scroll unit
are necessary.

The X Input Protocol calls the method "smooth scrolling", but it seems
that nowadays, this term is used exclusively for the rendering technique
that displays a little animation when the document position changes, so
"precision scrolling" might be a better choice.

Tests, comments, and OKs would be welcome.


Index: dev/wscons/wsconsio.h
===
RCS file: /cvs/src/sys/dev/wscons/wsconsio.h,v
retrieving revision 1.90
diff -u -p -r1.90 wsconsio.h
--- dev/wscons/wsconsio.h   10 Nov 2018 14:27:51 -  1.90
+++ dev/wscons/wsconsio.h   12 Mar 2019 21:55:11 -
@@ -112,6 +112,12 @@ struct wscons_event {
 #defineWSCONS_EVENT_TOUCH_RESET25  /* (no value) */

 /*
+ * Precision Scrolling
+ */
+#define WSCONS_EVENT_HSCROLL   26  /* dx * 4096 / scroll_unit */
+#define WSCONS_EVENT_VSCROLL   27  /* dy * 4096 / scroll_unit */
+
+/*
  * Keyboard ioctls (0 - 31)
  */

Index: dev/wscons/wsmouse.c
===
RCS file: /cvs/src/sys/dev/wscons/wsmouse.c,v
retrieving revision 1.51
diff -u -p -r1.51 wsmouse.c
--- dev/wscons/wsmouse.c19 Feb 2019 07:01:02 -  1.51
+++ dev/wscons/wsmouse.c12 Mar 2019 21:55:11 -
@@ -1034,10 +1034,18 @@ wsmouse_motion_sync(struct wsmouseinput
wsmouse_evq_put(evq, DELTA_X_EV(input), dx);
if (dy)
wsmouse_evq_put(evq, DELTA_Y_EV(input), dy);
-   if (motion->dz)
-   wsmouse_evq_put(evq, DELTA_Z_EV, motion->dz);
-   if (motion->dw)
-   wsmouse_evq_put(evq, DELTA_W_EV, motion->dw);
+   if (motion->dz) {
+   if (IS_TOUCHPAD(input))
+   wsmouse_evq_put(evq, VSCROLL_EV, motion->dz);
+   else
+   wsmouse_evq_put(evq, DELTA_Z_EV, motion->dz);
+   }
+   if (motion->dw) {
+   if (IS_TOUCHPAD(input))
+   wsmouse_evq_put(evq, HSCROLL_EV, motion->dw);
+   else
+   wsmouse_evq_put(evq, DELTA_W_EV, motion->dw);
+   }
}
if (motion->sync & SYNC_POSITION) {
if (motion->sync & SYNC_X) {
Index: dev/wscons/wsmouseinput.h
===
RCS file: /cvs/src/sys/dev/wscons/wsmouseinput.h,v
retrieving revision 1.12
diff -u -p -r1.12 wsmouseinput.h
--- dev/wscons/wsmouseinput.h   10 Nov 2018 14:27:51 -  1.12
+++ dev/wscons/wsmouseinput.h   12 Mar 2019 21:55:12 -
@@ -210,6 +210,8 @@ int wstpad_set_param(struct wsmouseinput
 WSCONS_EVENT_MOUSE_ABSOLUTE_X : WSCONS_EVENT_MOUSE_ABSOLUTE_Y)
 #define DELTA_Z_EV WSCONS_EVENT_MOUSE_DELTA_Z
 #define DELTA_W_EV WSCONS_EVENT_MOUSE_DELTA_W
+#define VSCROLL_EV WSCONS_EVENT_VSCROLL
+#define HSCROLL_EV WSCONS_EVENT_HSCROLL
 #define ABS_Z_EV   WSCONS_EVENT_TOUCH_PRESSURE
 #define ABS_W_EV   WSCONS_EVENT_TOUCH_CONTACTS
 #define BTN_DOWN_EVWSCONS_EVENT_MOUSE_DOWN
Index: dev/wscons/wstpad.c
===
RCS file: /cvs/src/sys/dev/wscons/wstpad.c,v
retrieving revision 1.22
diff -u -p -r1.22 wstpad.c
--- dev/wscons/wstpad.c 29 Dec 2018 21:03:58 -  1.22
+++ dev/wscons/wstpad.c 12 Mar 2019 21:55:12 -
@@ -167,8 +167,6 @@ struct wstpad {
u_int mtcycle;
u_int 

Re: Update openchrome to 0.6.182 in Xenocara

2019-03-12 Thread Matthieu Herrb
On Tue, Mar 12, 2019 at 11:28:30AM +0100, Frederic Cambus wrote:
> Hi tech@,
> 
> Here is a diff to update openchrome to 0.6.182 in Xenocara.
> 
> Tested on my VX900 system.
> 
> Comments? OK?

Looks ok, but I can't test it, as I don't have via hardware anymore.

One small nit: please remove $Id$ from the Makefile.am files (and
regenerate the Makefile.in), and sed the diff upstreams.

> 
> Index: driver/xf86-video-openchrome/Makefile.in
> ===
> RCS file: /cvs/xenocara/driver/xf86-video-openchrome/Makefile.in,v
> retrieving revision 1.10
> diff -u -p -r1.10 Makefile.in
> --- driver/xf86-video-openchrome/Makefile.in  9 Dec 2018 21:07:33 -   
> 1.10
> +++ driver/xf86-video-openchrome/Makefile.in  11 Mar 2019 22:46:14 -
> @@ -73,7 +73,7 @@ subdir = .
>  DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
>   $(srcdir)/Makefile.in $(srcdir)/config.h.in \
>   $(top_srcdir)/configure COPYING ChangeLog NEWS config.guess \
> - config.sub install-sh ltmain.sh missing
> + config.sub depcomp install-sh ltmain.sh missing
>  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
>  am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
>   $(top_srcdir)/configure.ac
> Index: driver/xf86-video-openchrome/aclocal.m4
> ===
> RCS file: /cvs/xenocara/driver/xf86-video-openchrome/aclocal.m4,v
> retrieving revision 1.9
> diff -u -p -r1.9 aclocal.m4
> --- driver/xf86-video-openchrome/aclocal.m4   9 Dec 2018 21:07:33 -   
> 1.9
> +++ driver/xf86-video-openchrome/aclocal.m4   11 Mar 2019 22:46:14 -
> @@ -8606,32 +8606,63 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_L
>  m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
>  m4_ifndef([_LT_PROG_CXX],[AC_DEFUN([_LT_PROG_CXX])])
>  
> -# pkg.m4 - Macros to locate and utilise pkg-config.-*- Autoconf 
> -*-
> -# serial 1 (pkg-config-0.24)
> -# 
> -# Copyright © 2004 Scott James Remnant .
> -#
> -# This program is free software; you can redistribute it and/or modify
> -# it under the terms of the GNU General Public License as published by
> -# the Free Software Foundation; either version 2 of the License, or
> -# (at your option) any later version.
> -#
> -# This program is distributed in the hope that it will be useful, but
> -# WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -# General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with this program; if not, write to the Free Software
> -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> -#
> -# As a special exception to the GNU General Public License, if you
> -# distribute this file as part of a program that contains a
> -# configuration script generated by Autoconf, you may include it under
> -# the same distribution terms that you use for the rest of that program.
> -
> -# PKG_PROG_PKG_CONFIG([MIN-VERSION])
> -# --
> +dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
> +dnl serial 11 (pkg-config-0.29.1)
> +dnl
> +dnl Copyright © 2004 Scott James Remnant .
> +dnl Copyright © 2012-2015 Dan Nicholson 
> +dnl
> +dnl This program is free software; you can redistribute it and/or modify
> +dnl it under the terms of the GNU General Public License as published by
> +dnl the Free Software Foundation; either version 2 of the License, or
> +dnl (at your option) any later version.
> +dnl
> +dnl This program is distributed in the hope that it will be useful, but
> +dnl WITHOUT ANY WARRANTY; without even the implied warranty of
> +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> +dnl General Public License for more details.
> +dnl
> +dnl You should have received a copy of the GNU General Public License
> +dnl along with this program; if not, write to the Free Software
> +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
> +dnl 02111-1307, USA.
> +dnl
> +dnl As a special exception to the GNU General Public License, if you
> +dnl distribute this file as part of a program that contains a
> +dnl configuration script generated by Autoconf, you may include it under
> +dnl the same distribution terms that you use for the rest of that
> +dnl program.
> +
> +dnl PKG_PREREQ(MIN-VERSION)
> +dnl ---
> +dnl Since: 0.29
> +dnl
> +dnl Verify that the version of the pkg-config macros are at least
> +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
> +dnl installed version of pkg-config, this checks the developer's version
> +dnl of pkg.m4 when generating configure.
> +dnl
> +dnl To ensure that this macro is defined, also add:
> +dnl m4_ifndef([PKG_PREREQ],
> +dnl [m4_fatal([must install pkg-config 0.29 or later before running 
> 

Re: relayd websocket

2019-03-12 Thread Rivo Nurges
Hi!

Bump...

Rivo

On 3/6/19 10:57 PM, Rivo Nurges wrote:
> Hi!
> 
> 
> On 3/6/19 10:20 PM, Rivo Nurges wrote:
>> On 3/6/19 6:36 PM, Sebastian Benoit wrote:
 Does something like this make sense?
>>>
>>> i think the seperator list needs to include '\t'
>>> because https://tools.ietf.org/html/rfc7230#appendix-B includes HTAB.
>>>
>>> And i dont think you can mix "," with " \t" seperators,
>>> because otherwise "Foo Upgrade, Bar" will match.
>>>
>>> Something more is needed to parse elements of a header.
>>
>> Oh yeah. I'll work on that.
> 
> So here comes the next version. Works with both spaces and tabs.
> 
> Index: usr.sbin/relayd/relay_http.c
> ===
> RCS file: /cvs/src/usr.sbin/relayd/relay_http.c,v
> retrieving revision 1.72
> diff -u -p -r1.72 relay_http.c
> --- usr.sbin/relayd/relay_http.c  4 Mar 2019 21:25:03 -   1.72
> +++ usr.sbin/relayd/relay_http.c  6 Mar 2019 20:53:59 -
> @@ -36,6 +36,7 @@
>#include 
>#include 
>#include 
> +#include 
> 
>#include "relayd.h"
>#include "http.h"
> @@ -166,6 +167,7 @@ relay_read_http(struct bufferevent *bev,
>   struct relay_http_priv  *priv = con->se_priv;
>   char*line = NULL, *key, *value;
>   char*urlproto, *host, *path;
> + char*valuecopy, *valuepart;
>   int  action, unique, ret;
>   const char  *errstr;
>   size_t   size, linelen;
> @@ -399,10 +401,19 @@ relay_read_http(struct bufferevent *bev,
> 
>   if (cre->line != 1) {
>   if (cre->dir == RELAY_DIR_REQUEST) {
> - if (strcasecmp("Connection", key) == 0 &&
> - strcasecmp("Upgrade", value) == 0)
> - priv->http_upgrade_req |=
> - HTTP_CONNECTION_UPGRADE;
> + if (strcasecmp("Connection", key) == 0) {
> + valuecopy = strdup(value);
> + while ((valuepart = strsep(,
> + ",")) != NULL) {
> + while (isblank(*valuepart))
> + valuepart = [1];
> + if (strcasecmp("Upgrade", valuepart)
> + == 0)
> + priv->http_upgrade_req |=
> + HTTP_CONNECTION_UPGRADE;
> + }
> + free(valuecopy);
> + }
>   if (strcasecmp("Upgrade", key) == 0 &&
>   strcasecmp("websocket", value) == 0)
>   priv->http_upgrade_req |=
> 
> 
> begin-base64 644 websocket3.diff
> SW5kZXg6IHVzci5zYmluL3JlbGF5ZC9yZWxheV9odHRwLmMKPT09PT09PT09PT09PT09PT09PT09
> PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTog
> L2N2cy9zcmMvdXNyLnNiaW4vcmVsYXlkL3JlbGF5X2h0dHAuYyx2CnJldHJpZXZpbmcgcmV2aXNp
> b24gMS43MgpkaWZmIC11IC1wIC1yMS43MiByZWxheV9odHRwLmMKLS0tIHVzci5zYmluL3JlbGF5
> ZC9yZWxheV9odHRwLmMJNCBNYXIgMjAxOSAyMToyNTowMyAtMDAwMAkxLjcyCisrKyB1c3Iuc2Jp
> bi9yZWxheWQvcmVsYXlfaHR0cC5jCTYgTWFyIDIwMTkgMjA6NTM6NTkgLTAwMDAKQEAgLTM2LDYg
> KzM2LDcgQEAKICNpbmNsdWRlIDxzaXBoYXNoLmg+CiAjaW5jbHVkZSA8aW1zZy5oPgogI2luY2x1
> ZGUgPHVuaXN0ZC5oPgorI2luY2x1ZGUgPGN0eXBlLmg+CiAKICNpbmNsdWRlICJyZWxheWQuaCIK
> ICNpbmNsdWRlICJodHRwLmgiCkBAIC0xNjYsNiArMTY3LDcgQEAgcmVsYXlfcmVhZF9odHRwKHN0
> cnVjdCBidWZmZXJldmVudCAqYmV2LAogCXN0cnVjdCByZWxheV9odHRwX3ByaXYJKnByaXYgPSBj
> b24tPnNlX3ByaXY7CiAJY2hhcgkJCSpsaW5lID0gTlVMTCwgKmtleSwgKnZhbHVlOwogCWNoYXIJ
> CQkqdXJscHJvdG8sICpob3N0LCAqcGF0aDsKKwljaGFyCQkJKnZhbHVlY29weSwgKnZhbHVlcGFy
> dDsKIAlpbnQJCQkgYWN0aW9uLCB1bmlxdWUsIHJldDsKIAljb25zdCBjaGFyCQkqZXJyc3RyOwog
> CXNpemVfdAkJCSBzaXplLCBsaW5lbGVuOwpAQCAtMzk5LDEwICs0MDEsMTkgQEAgcmVsYXlfcmVh
> ZF9odHRwKHN0cnVjdCBidWZmZXJldmVudCAqYmV2LAogCiAJCWlmIChjcmUtPmxpbmUgIT0gMSkg
> ewogCQkJaWYgKGNyZS0+ZGlyID09IFJFTEFZX0RJUl9SRVFVRVNUKSB7Ci0JCQkJaWYgKHN0cmNh
> c2VjbXAoIkNvbm5lY3Rpb24iLCBrZXkpID09IDAgJiYKLQkJCQkgICAgc3RyY2FzZWNtcCgiVXBn
> cmFkZSIsIHZhbHVlKSA9PSAwKQotCQkJCQlwcml2LT5odHRwX3VwZ3JhZGVfcmVxIHw9Ci0JCQkJ
> CSAgICBIVFRQX0NPTk5FQ1RJT05fVVBHUkFERTsKKwkJCQlpZiAoc3RyY2FzZWNtcCgiQ29ubmVj
> dGlvbiIsIGtleSkgPT0gMCkgeworCQkJCSAgICB2YWx1ZWNvcHkgPSBzdHJkdXAodmFsdWUpOwor
> CQkJCSAgICB3aGlsZSAoKHZhbHVlcGFydCA9IHN0cnNlcCgmdmFsdWVjb3B5LAorCQkJCQkiLCIp
> KSAhPSBOVUxMKSB7CisJCQkJCXdoaWxlIChpc2JsYW5rKCp2YWx1ZXBhcnQpKQorCQkJCQkgICAg
> dmFsdWVwYXJ0ID0gJnZhbHVlcGFydFsxXTsKKwkJCQkgICAgCWlmIChzdHJjYXNlY21wKCJVcGdy
> YWRlIiwgdmFsdWVwYXJ0KQorCQkJCQkgICAgPT0gMCkKKwkJCQkJICAgIHByaXYtPmh0dHBfdXBn
> 

relayd: virtual not used

2019-03-12 Thread Sebastian Benoit


Am i not seeing something?

ok?

diff --git usr.sbin/relayd/parse.y usr.sbin/relayd/parse.y
index 5be605302ab..6dbed2f282f 100644
--- usr.sbin/relayd/parse.y
+++ usr.sbin/relayd/parse.y
@@ -173,7 +173,7 @@ typedef struct {
 %token PREFORK PRIORITY PROTO QUERYSTR REAL REDIRECT RELAY REMOVE REQUEST
 %token RESPONSE RETRY QUICK RETURN ROUNDROBIN ROUTE SACK SCRIPT SEND SESSION
 %token SNMP SOCKET SPLICE SSL STICKYADDR STYLE TABLE TAG TAGGED TCP TIMEOUT TLS
-%token TO ROUTER RTLABEL TRANSPARENT TRAP UPDATES URL VIRTUAL WITH TTL RTABLE
+%token TO ROUTER RTLABEL TRANSPARENT TRAP UPDATES URL WITH TTL RTABLE
 %token MATCH PARAMS RANDOM LEASTSTATES SRCHASH KEY CERTIFICATE PASSWORD ECDHE
 %token EDH TICKETS CONNECTION CONNECTIONS ERRORS STATE CHANGES CHECKS
 %token WEBSOCKETS
@@ -2347,7 +2347,6 @@ lookup(char *s)
{ "updates",UPDATES },
{ "url",URL },
{ "value",  VALUE },
-   { "virtual",VIRTUAL },
{ "websockets", WEBSOCKETS },
{ "with",   WITH }
};



Re: less(1) UTF-8 cleanup: do_append()

2019-03-12 Thread Todd C . Miller
On Tue, 12 Mar 2019 15:55:59 +0100, Ingo Schwarze wrote:

> Four bad function calls have to be replaced here:
>
>  1. The call to the bad function get_wchar() is used to find the
> character already present at the current position.  Replacing
> it with mbtowc(3) also eliminates LWCHAR.  In case of failure -
> which may no be likely since at least usually, the linebuf[]
> will contain valid UTF-8 - setting prev_ch to NUL makes sure
> that whatever is already there will simply be replaced.
> I think linebuf[curr] cannot be NUL at this point because only
> backc() sets overstrike, and just having backed up, *something*
> will be there.  But even if linebuf[curr] *is* NUL and hence
> mbtowc(3) returns 0, the new code should do the right thing and
> simply append.
>
>  2. The calls to the bad functions is_composing_char() and
> is_combining_char() have to be replaced with wcwidth(3).
> That also eliminates the second call to get_wchar().
> If wcwidth(3) fails (i.e. ch is not printable), we simply have
> to treat it like a width 1 character.
>
>  3. The call to the bad function control_char() has to be eliminated.
> Start by considering two cases separately.  In utf_mode, we
> have is_ascii_char(ch), i.e. ch <= 0x7f.  In that case,
> control_char() is just iscntrl(3), which is identical to
> !isprint(3).  In !utf_mode, we know that do_append() only gets
> called with ch <= 0xff, and control_char() is iscntrl(3) ||
> !isprint(3).  In that case and expression, the iscntrl(3) is
> obviously redundant.  So we can simply use !isprint(3) for both
> cases, which is also a logical way of expressing the condition
> because this "else if" clause is supposed to handle non-printable
> single-byte characters.
>
>  4. The call to the bad function is_ubin_char() intends to handle
> non-printable Unicode characters, so the right function to use
> is simply !iswprint(3) from .

This looks like an improvement to me.  OK millert@

 - todd



less(1) UTF-8 cleanup: do_append()

2019-03-12 Thread Ingo Schwarze
Hi Nicholas,

Nicholas Marriott wrote on Tue, Mar 12, 2019 at 11:05:07AM +:

> Sorry, ok nicm if you haven't committed this already.

No i hadn't, but now i have, thank you very much for checking the patch.

Here is the next step, cleaning up most parts of the crucial function
do_append() which decides how to handle backspaces and overstrikes,
in particular what to print literally and what to encode.

Four bad function calls have to be replaced here:

 1. The call to the bad function get_wchar() is used to find the
character already present at the current position.  Replacing
it with mbtowc(3) also eliminates LWCHAR.  In case of failure -
which may no be likely since at least usually, the linebuf[]
will contain valid UTF-8 - setting prev_ch to NUL makes sure
that whatever is already there will simply be replaced.
I think linebuf[curr] cannot be NUL at this point because only
backc() sets overstrike, and just having backed up, *something*
will be there.  But even if linebuf[curr] *is* NUL and hence
mbtowc(3) returns 0, the new code should do the right thing and
simply append.

 2. The calls to the bad functions is_composing_char() and
is_combining_char() have to be replaced with wcwidth(3).
That also eliminates the second call to get_wchar().
If wcwidth(3) fails (i.e. ch is not printable), we simply have
to treat it like a width 1 character.

 3. The call to the bad function control_char() has to be eliminated.
Start by considering two cases separately.  In utf_mode, we
have is_ascii_char(ch), i.e. ch <= 0x7f.  In that case,
control_char() is just iscntrl(3), which is identical to
!isprint(3).  In !utf_mode, we know that do_append() only gets
called with ch <= 0xff, and control_char() is iscntrl(3) ||
!isprint(3).  In that case and expression, the iscntrl(3) is
obviously redundant.  So we can simply use !isprint(3) for both
cases, which is also a logical way of expressing the condition
because this "else if" clause is supposed to handle non-printable
single-byte characters.

 4. The call to the bad function is_ubin_char() intends to handle
non-printable Unicode characters, so the right function to use
is simply !iswprint(3) from .

One part of do_append() still remains broken: It still calls
prutfchar() which is broken because it calls is_ubin_char() and
control_char(), because it accepts some invalid input, and because
it generates some invalid output.  But cleaning that up is a separate
matter.

Here are byte sequences i tested:

 * ASCII char backspace same ASCII char again -> bold
 * underscore backspace underscore in between -> bold
 * ASCII char backspace underscore-> italic
 * underscore backspace underscore in between -> italic
 * underscore backspace ASCII char-> italic
 * UTF-8 character backspace same UTF-8 again -> bold
 * UTF-8 character backspace undercore-> italic
 * underscore backspace UTF-8 character   -> italic
 * invalid byte backspace underscore  -> <88>^H_
 * ASCII char UTF-8 combining accent backspace
   same ASCII char and combining accent again -> bold
 * underscore backspace ASCII char
   UTF-8 combining accent -> italic
 * UTF-8 character UTF-8 combining accent
   backspace same UTF-8 character
   and combining accent again -> bold
 * underscore backspace UTF-8 character
   UTF-8 combining accent -> italic
 * ASCII char UTF-8 combining accent backspace
   non-printable ASCII char
   -> accented char invisible, overwritten by the encoded
  representation of the non-printable char
 * ASCII char UTF-8 combining accent backspace
   non-printable UTF-8 character
   -> accented char invisible, overwritten by the encoded
  representation of the non-printable character
 * ASCII controls show as caret-letter
 * UTF-8 controls show as 

I tested both with LC_CTYPE=en_US.UTF-8 and LC_CTYPE=C.

Note the following case is dubious:

 * ASCII char UTF-8 combining accent backspace underscore
   Arguably, this should underline the accented character,
   but actually, the accent disappears with both the old
   and the new code because it is overwritten by the next
   character.  I'm not trying to fix that with this patch.
 * same for UTF-8 character UTF-8 combining accent backspace underscore

OK?
  Ingo


Index: line.c
===
RCS file: /cvs/src/usr.bin/less/line.c,v
retrieving revision 1.27
diff -u -p -r1.27 line.c
--- line.c  12 Mar 2019 11:59:24 -  1.27
+++ line.c  12 Mar 2019 14:33:55 -
@@ -16,6 +16,7 @@
  */
 
 #include 
+#include 
 
 #include "charset.h"
 #include "less.h"
@@ -774,8 +775,8 @@ retry:
 static int
 do_append(LWCHAR ch, char *rep, off_t pos)
 {
+   wchar_t prev_ch;
int a;
-   LWCHAR prev_ch;
 
a = AT_NORMAL;
 
@@ -813,7 +814,10 @@ do_append(LWCHAR ch, char *rep, 

Re: [patch] Re: Possible sasyncd memory leak ?

2019-03-12 Thread Otto Moerbeek
On Tue, Mar 12, 2019 at 02:02:15PM +0100, Otto Moerbeek wrote:

> On Mon, Mar 11, 2019 at 05:11:56PM +0100, Otto Moerbeek wrote:
> 
> > 
> > I was going to test your diff but it does not apply. Your mailer seems
> > to convert spaces and or tabs to funny char sequences. Please fix
> > (test by mailing to yourself and applying with patch(1)) and resend,
> > 
> > -Otto
> > 
> 
> So I reworked the diff to apply and use the proper formatting
> (regulart sapces and tabs instead of UTF-8 non breaking spaces).
> 
> I also fixed a case of parsing IPv6 addresses.
> 
> Anyone willing to ok?

And now also with a lexer bug fixed.  Earlier I thougt it was an order
dependency in the clauses. But is was an order dependency in comment
lines and empty lines.

-Otto


Index: conf.y
===
RCS file: /cvs/src/usr.sbin/sasyncd/conf.y,v
retrieving revision 1.19
diff -u -p -r1.19 conf.y
--- conf.y  9 Apr 2017 02:40:24 -   1.19
+++ conf.y  12 Mar 2019 14:16:23 -
@@ -30,8 +30,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -48,6 +50,7 @@ struct cfgstate   cfgstate;
 intconflen = 0;
 char   *confbuf, *confptr;
 
+int check_peer_addr(const char *);
 intyyparse(void);
 intyylex(void);
 void   yyerror(const char *);
@@ -172,17 +175,8 @@ setting: INTERFACE STRING
| PEER STRING
{
struct syncpeer *peer;
-   int  duplicate = 0;
 
-   for (peer = LIST_FIRST(); peer;
-peer = LIST_NEXT(peer, link))
-   if (strcmp($2, peer->name) == 0) {
-   duplicate++;
-   break;
-   }
-   if (duplicate)
-   free($2);
-   else {
+   if (check_peer_addr($2)) {
peer = calloc(1, sizeof *peer);
if (!peer) {
log_err("config: calloc(1, %lu) "
@@ -191,10 +185,11 @@ setting   : INTERFACE STRING
YYERROR;
}
peer->name = $2;
-   }
-   LIST_INSERT_HEAD(, peer, link);
-   cfgstate.peercnt++;
-   log_msg(2, "config: add peer %s", peer->name);
+   LIST_INSERT_HEAD(, peer, 
link);
+   cfgstate.peercnt++;
+   log_msg(2, "config: add peer %s", peer->name);
+   } else
+   free($2);
}
| LISTEN ON STRING af port
{
@@ -284,6 +279,72 @@ match(char *token)
 }
 
 int
+check_peer_addr(const char *peer_addr)
+{
+   int valid = 1;
+   short peer_family = AF_UNSPEC;
+   struct ifaddrs *ifap = NULL, *ifa;
+   struct syncpeer *peer;
+   struct sockaddr_in sa;
+   struct sockaddr_in6 sa6;
+
+   if (inet_pton(AF_INET, peer_addr, _addr) == 1)
+   peer_family = AF_INET;
+
+   if (peer_family == AF_UNSPEC && inet_pton(AF_INET6, peer_addr,
+   _addr) == 1)
+   peer_family = AF_INET6;
+
+   if (peer_family == AF_UNSPEC) {
+   log_msg(2, "config: skip unparseable peer %s", peer_addr);
+   valid = 0;
+   }
+
+   if (valid && getifaddrs() == 0) {
+   for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
+   if (!ifa->ifa_addr || ifa->ifa_addr->sa_family !=
+   peer_family)
+   continue;
+
+   switch (ifa->ifa_addr->sa_family) {
+   case AF_INET:
+   if (memcmp(_addr,
+   &((struct sockaddr_in 
*)ifa->ifa_addr)->sin_addr,
+   sizeof(struct in_addr)) == 0) 
+   valid = 0;
+   break;
+   case AF_INET6:
+   if (memcmp(_addr,
+   &((struct sockaddr_in6 
*)ifa->ifa_addr)->sin6_addr,
+   sizeof(struct in6_addr)) == 0)
+   valid = 0;
+   break;
+   }
+
+   if (!valid) {
+   log_msg(2, "config: skip local peer %s",
+   peer_addr);
+   break;
+   }
+   }
+   freeifaddrs(ifap);
+   }
+
+   if 

Re: [patch] Re: Possible sasyncd memory leak ?

2019-03-12 Thread Otto Moerbeek
On Mon, Mar 11, 2019 at 05:11:56PM +0100, Otto Moerbeek wrote:

> 
> I was going to test your diff but it does not apply. Your mailer seems
> to convert spaces and or tabs to funny char sequences. Please fix
> (test by mailing to yourself and applying with patch(1)) and resend,
> 
>   -Otto
> 

So I reworked the diff to apply and use the proper formatting
(regulart sapces and tabs instead of UTF-8 non breaking spaces).

I also fixed a case of parsing IPv6 addresses.

Anyone willing to ok?

-Otto

Index: conf.y
===
RCS file: /cvs/src/usr.sbin/sasyncd/conf.y,v
retrieving revision 1.19
diff -u -p -r1.19 conf.y
--- conf.y  9 Apr 2017 02:40:24 -   1.19
+++ conf.y  12 Mar 2019 12:59:18 -
@@ -30,8 +30,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -48,6 +50,7 @@ struct cfgstate   cfgstate;
 intconflen = 0;
 char   *confbuf, *confptr;
 
+int check_peer_addr(const char *);
 intyyparse(void);
 intyylex(void);
 void   yyerror(const char *);
@@ -172,17 +175,8 @@ setting: INTERFACE STRING
| PEER STRING
{
struct syncpeer *peer;
-   int  duplicate = 0;
 
-   for (peer = LIST_FIRST(); peer;
-peer = LIST_NEXT(peer, link))
-   if (strcmp($2, peer->name) == 0) {
-   duplicate++;
-   break;
-   }
-   if (duplicate)
-   free($2);
-   else {
+   if (check_peer_addr($2)) {
peer = calloc(1, sizeof *peer);
if (!peer) {
log_err("config: calloc(1, %lu) "
@@ -191,10 +185,11 @@ setting   : INTERFACE STRING
YYERROR;
}
peer->name = $2;
-   }
-   LIST_INSERT_HEAD(, peer, link);
-   cfgstate.peercnt++;
-   log_msg(2, "config: add peer %s", peer->name);
+   LIST_INSERT_HEAD(, peer, 
link);
+   cfgstate.peercnt++;
+   log_msg(2, "config: add peer %s", peer->name);
+   } else
+   free($2);
}
| LISTEN ON STRING af port
{
@@ -284,6 +279,72 @@ match(char *token)
 }
 
 int
+check_peer_addr(const char *peer_addr)
+{
+   int valid = 1;
+   short peer_family = AF_UNSPEC;
+   struct ifaddrs *ifap = 0, *ifa;
+   struct syncpeer *peer;
+   struct sockaddr_in sa;
+   struct sockaddr_in6 sa6;
+
+   if (inet_pton(AF_INET, peer_addr, _addr) == 1)
+   peer_family = AF_INET;
+
+   if (peer_family == AF_UNSPEC && inet_pton(AF_INET6, peer_addr,
+   _addr) == 1)
+   peer_family = AF_INET6;
+
+   if (peer_family == AF_UNSPEC) {
+   log_msg(2, "config: skip unparseable peer %s", peer_addr);
+   valid = 0;
+   }
+
+   if (valid && getifaddrs() == 0) {
+   for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
+   if (!ifa->ifa_addr || ifa->ifa_addr->sa_family !=
+   peer_family)
+   continue;
+
+   switch (ifa->ifa_addr->sa_family) {
+   case AF_INET:
+   if (memcmp(_addr,
+   &((struct sockaddr_in 
*)ifa->ifa_addr)->sin_addr,
+   sizeof(struct in_addr)) == 0) 
+   valid = 0;
+   break;
+   case AF_INET6:
+   if (memcmp(_addr,
+   &((struct sockaddr_in6 
*)ifa->ifa_addr)->sin6_addr,
+   sizeof(struct in6_addr)) == 0)
+   valid = 0;
+   break;
+   }
+
+   if (!valid) {
+   log_msg(2, "config: skip local peer %s",
+   peer_addr);
+   break;
+   }
+   }
+   freeifaddrs(ifap);
+   }
+
+   if (valid) {
+   for (peer = LIST_FIRST(); peer;
+   peer = LIST_NEXT(peer, link)) {
+   if (strcmp(peer_addr, peer->name) == 0) {
+   log_msg(2, "config: skip duplicate peer %s",
+  

Re: bgpd cleanup configuration handling

2019-03-12 Thread Claudio Jeker
On Mon, Mar 11, 2019 at 03:27:44PM +0100, Sebastian Benoit wrote:
> Claudio Jeker(cje...@diehard.n-r-g.com) on 2019.03.11 09:11:39 +0100:
> > This diff is cleaning up a few minor things. It removes the init_conf()
> > function in session.c and moves it to init_config() where all defaults
> > should be set. Because of this printconf is a bit changed to only print
> > values which diverge from the default. Finally move mrt_mergeconfig into
> 
> i'm unsure if i like that bit. On one side, this way you can use it to clean
> your config of useless lines. On the other side, you now have to find the
> defaults in the manpage.

I have similar issues but lately I think it is better to keep the config
shorter and not add unneeded fluff because you may get bitten by it later.
Yes hiding the defaults is annoying if you want to know them but then bgpd
should show everything. We will see how it progresses and maybe we change
it later.
 
> Thats not a no-go on this and otherwise i like it, but havent tested it yet
> because EBUSY until Wednesday.
> 
> > merge_config.
> > 
> > OK?
> > -- 
> > :wq Claudio
> > 
> > Index: config.c
> > ===
> > RCS file: /cvs/src/usr.sbin/bgpd/config.c,v
> > retrieving revision 1.85
> > diff -u -p -r1.85 config.c
> > --- config.c7 Mar 2019 07:42:36 -   1.85
> > +++ config.c11 Mar 2019 08:01:05 -
> > @@ -200,7 +200,6 @@ merge_config(struct bgpd_config *xconf, 
> > if ((conf->flags & BGPD_FLAG_REFLECTOR) && conf->clusterid == 0)
> > conf->clusterid = conf->bgpid;
> >  
> > -
> > /* adjust FIB priority if changed */
> > /* if xconf is uninitialized we get RTP_NONE */
> > if (xconf->fib_priority != conf->fib_priority) {
> > @@ -225,6 +224,9 @@ merge_config(struct bgpd_config *xconf, 
> > filterlist_free(xconf->filters);
> > xconf->filters = conf->filters;
> > conf->filters = NULL;
> > +
> > +   /* merge mrt config */
> > +   mrt_mergeconfig(xconf->mrt, conf->mrt);
> >  
> > /* switch the roa, first remove the old one */
> > free_prefixtree(>roa);
> > Index: parse.y
> > ===
> > RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
> > retrieving revision 1.383
> > diff -u -p -r1.383 parse.y
> > --- parse.y 9 Mar 2019 10:05:58 -   1.383
> > +++ parse.y 11 Mar 2019 08:01:47 -
> > @@ -3249,6 +3249,8 @@ init_config(struct bgpd_config *c)
> > u_int rdomid;
> >  
> > c->min_holdtime = MIN_HOLDTIME;
> > +   c->holdtime = INTERVAL_HOLD;
> > +   c->connectretry = INTERVAL_CONNECTRETRY;
> > c->bgpid = get_bgpid();
> > c->fib_priority = RTP_BGP;
> > c->default_tableid = getrtable();
> > @@ -3362,7 +3364,6 @@ errors:
> >  
> > optimize_filters(conf->filters);
> >  
> > -   mrt_mergeconfig(xconf->mrt, conf->mrt);
> > merge_config(xconf, conf, peer_l);
> > *xpeers = peer_l;
> >  
> > Index: printconf.c
> > ===
> > RCS file: /cvs/src/usr.sbin/bgpd/printconf.c,v
> > retrieving revision 1.132
> > diff -u -p -r1.132 printconf.c
> > --- printconf.c 26 Feb 2019 10:49:15 -  1.132
> > +++ printconf.c 11 Mar 2019 08:05:12 -
> > @@ -378,11 +378,11 @@ print_mainconf(struct bgpd_config *conf)
> > printf("socket \"%s\"\n", conf->csock);
> > if (conf->rcsock)
> > printf("socket \"%s\" restricted\n", conf->rcsock);
> > -   if (conf->holdtime)
> > +   if (conf->holdtime != INTERVAL_HOLD)
> > printf("holdtime %u\n", conf->holdtime);
> > -   if (conf->min_holdtime)
> > +   if (conf->min_holdtime != MIN_HOLDTIME)
> > printf("holdtime min %u\n", conf->min_holdtime);
> > -   if (conf->connectretry)
> > +   if (conf->connectretry != INTERVAL_CONNECTRETRY)
> > printf("connect-retry %u\n", conf->connectretry);
> >  
> > if (conf->flags & BGPD_FLAG_NO_EVALUATE)
> > @@ -405,8 +405,9 @@ print_mainconf(struct bgpd_config *conf)
> > printf("nexthop qualify via bgp\n");
> > if (conf->flags & BGPD_FLAG_NEXTHOP_DEFAULT)
> > printf("nexthop qualify via default\n");
> > -   printf("fib-priority %hhu", conf->fib_priority);
> > -   printf("\n\n");
> > +   if (conf->fib_priority != RTP_BGP)
> > +   printf("fib-priority %hhu\n", conf->fib_priority);
> > +   printf("\n");
> >  }
> >  
> >  void
> > @@ -732,7 +733,8 @@ print_announce(struct peer_config *p, co
> > printf("%s\tannounce %s\n", c, aid2str(aid));
> >  }
> >  
> > -void print_as(struct filter_rule *r)
> > +void
> > +print_as(struct filter_rule *r)
> >  {
> > if (r->match.as.flags & AS_FLAG_AS_SET_NAME) {
> > printf("as-set \"%s\" ", r->match.as.name);
> > Index: session.c
> > ===
> > RCS file: /cvs/src/usr.sbin/bgpd/session.c,v
> > retrieving 

Update openchrome to 0.6.182 in Xenocara

2019-03-12 Thread Frederic Cambus
Hi tech@,

Here is a diff to update openchrome to 0.6.182 in Xenocara.

Tested on my VX900 system.

Comments? OK?

Index: driver/xf86-video-openchrome/Makefile.in
===
RCS file: /cvs/xenocara/driver/xf86-video-openchrome/Makefile.in,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.in
--- driver/xf86-video-openchrome/Makefile.in9 Dec 2018 21:07:33 -   
1.10
+++ driver/xf86-video-openchrome/Makefile.in11 Mar 2019 22:46:14 -
@@ -73,7 +73,7 @@ subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure COPYING ChangeLog NEWS config.guess \
-   config.sub install-sh ltmain.sh missing
+   config.sub depcomp install-sh ltmain.sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
Index: driver/xf86-video-openchrome/aclocal.m4
===
RCS file: /cvs/xenocara/driver/xf86-video-openchrome/aclocal.m4,v
retrieving revision 1.9
diff -u -p -r1.9 aclocal.m4
--- driver/xf86-video-openchrome/aclocal.m4 9 Dec 2018 21:07:33 -   
1.9
+++ driver/xf86-video-openchrome/aclocal.m4 11 Mar 2019 22:46:14 -
@@ -8606,32 +8606,63 @@ m4_ifndef([_LT_PROG_F77],   [AC_DEFUN([_L
 m4_ifndef([_LT_PROG_FC],   [AC_DEFUN([_LT_PROG_FC])])
 m4_ifndef([_LT_PROG_CXX],  [AC_DEFUN([_LT_PROG_CXX])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.-*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant .
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# --
+dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29.1)
+dnl
+dnl Copyright © 2004 Scott James Remnant .
+dnl Copyright © 2012-2015 Dan Nicholson 
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl ---
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running 
autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.1])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+[m4_fatal([pkg.m4 version $1 or higher is required but 
]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl --
+dnl