CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 21 17:19:52 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
libntf: make MKREPRO timestamp compatible with NetBSD 10

In NetBSD 10, make(1) cannot handle :gmtime arguments that are
expressions, resulting in the error message "Unknown modifier '1'".


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 21 17:19:52 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
libntf: make MKREPRO timestamp compatible with NetBSD 10

In NetBSD 10, make(1) cannot handle :gmtime arguments that are
expressions, resulting in the error message "Unknown modifier '1'".


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.35 src/external/bsd/ntp/lib/libntp/Makefile:1.36
--- src/external/bsd/ntp/lib/libntp/Makefile:1.35	Sat Apr 20 08:03:08 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Sun Apr 21 17:19:52 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.35 2024/04/20 08:03:08 rillig Exp $
+#	$NetBSD: Makefile,v 1.36 2024/04/21 17:19:52 rillig Exp $
 
 LIBISPRIVATE=yes
 
@@ -88,8 +88,8 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 .if ${MKREPRO:Uno} == "yes"
 MKREPRO_CPPFLAGS.ntp_calendar.c:= \
-	-DMKREPRO_DATE=\"${%b %e %Y:L:gmtime=${MKREPRO_TIMESTAMP}:Q}\" \
-	-DMKREPRO_TIME=\"${%T:L:gmtime=${MKREPRO_TIMESTAMP}:Q}\"
+	-DMKREPRO_DATE=\"${%b %e %Y:L:${:Ugmtime=${MKREPRO_TIMESTAMP}}:Q}\" \
+	-DMKREPRO_TIME=\"${%T:L:${:Ugmtime=${MKREPRO_TIMESTAMP}}:Q}\"
 CPPFLAGS.ntp_calendar.c += ${MKREPRO_CPPFLAGS.ntp_calendar.c}
 .endif
 



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-20 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Apr 20 08:03:08 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
libntp: clean up MKREPRO_TIMESTAMP handling

NetBSD's make has built-in support for formatting timestamps, so use
that instead of relying on an external tool.  The month name is still
always in the C locale, and possible errors are reported in the affected
line, due to the ':=' assignment operator.

Without the ':=' assignment operator, the intermediate variable would
not be necessary, but in that case, make's error handling is broken and
unspecific.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-20 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Apr 20 08:03:08 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
libntp: clean up MKREPRO_TIMESTAMP handling

NetBSD's make has built-in support for formatting timestamps, so use
that instead of relying on an external tool.  The month name is still
always in the C locale, and possible errors are reported in the affected
line, due to the ':=' assignment operator.

Without the ':=' assignment operator, the intermediate variable would
not be necessary, but in that case, make's error handling is broken and
unspecific.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.34 src/external/bsd/ntp/lib/libntp/Makefile:1.35
--- src/external/bsd/ntp/lib/libntp/Makefile:1.34	Fri Apr 19 16:04:28 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Sat Apr 20 08:03:08 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.34 2024/04/19 16:04:28 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.35 2024/04/20 08:03:08 rillig Exp $
 
 LIBISPRIVATE=yes
 
@@ -86,18 +86,11 @@ ymd2yd.c
 CPPFLAGS+= -I${IDIST}/sntp/libopts
 
 # For MKREPRO, avoid using __DATE__ and __TIME__.
-# Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
-.if ${MKREPRO_TIMESTAMP:Uundefined} == "undefined"
-.error MKREPRO_TIMESTAMP is undefined with MKREPRO active
-.endif
-MKREPRO_DATE != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
-MKREPRO_TIME != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
-.if ${MKREPRO_DATE} == "" || ${MKREPRO_TIME} == ""
-.error empty MKREPRO_DATE or MKREPRO_TIME
-.endif
-CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
-CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
+MKREPRO_CPPFLAGS.ntp_calendar.c:= \
+	-DMKREPRO_DATE=\"${%b %e %Y:L:gmtime=${MKREPRO_TIMESTAMP}:Q}\" \
+	-DMKREPRO_TIME=\"${%T:L:gmtime=${MKREPRO_TIMESTAMP}:Q}\"
+CPPFLAGS.ntp_calendar.c += ${MKREPRO_CPPFLAGS.ntp_calendar.c}
 .endif
 
 COPTS.timetoa.c+=	${CC_WNO_FORMAT_TRUNCATION}



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 16:04:28 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
fix copy/paste-o


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 16:04:28 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
fix copy/paste-o


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.33 src/external/bsd/ntp/lib/libntp/Makefile:1.34
--- src/external/bsd/ntp/lib/libntp/Makefile:1.33	Fri Apr 19 14:58:18 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri Apr 19 16:04:28 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.33 2024/04/19 14:58:18 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.34 2024/04/19 16:04:28 jakllsch Exp $
 
 LIBISPRIVATE=yes
 
@@ -93,7 +93,7 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 .endif
 MKREPRO_DATE != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
 MKREPRO_TIME != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
-.if ${MKREPRO_TIME} == "" || ${MKREPRO_TIME} == ""
+.if ${MKREPRO_DATE} == "" || ${MKREPRO_TIME} == ""
 .error empty MKREPRO_DATE or MKREPRO_TIME
 .endif
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"



Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
On Fri, Apr 19, 2024 at 10:48:10PM +0700, Robert Elz wrote:
> Date:Fri, 19 Apr 2024 14:58:18 +
> From:"Jonathan A. Kollasch" 
> Message-ID:  <20240419145818.351d2f...@cvs.netbsd.org>
> 
>   |  - bail out if resulting __DATE__/__TIME__ replacement strings are empty
> 
> If you want to do that (not that it would be useful, even if the %b
> (etc) conversions produced nothing, there would still be two spaces
> in the output.   It is almost impossible to get date to exit with an
> error code (and nothing on stdout) in cases like this.
> 
> But if this is worth keeping, then
> 
>   if ${MKREPRO_TIME} == "" || ${MKREPRO_TIME} == ""
> 
> probably is not what you wanted.

I've tested this with MKREPRO_TIMESTAMP=RandomNonNumericString, and
MKREPRO_TIME/MKREPRO_DATE came out "" when nbdate produced a non-zero
exit status and a warning message.

I wish nbmake could actually error when it gets a non-zero exit status
there, but it merely spouts a warning and continues.

I've spent enough time looking at this.


Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Robert Elz
Date:Fri, 19 Apr 2024 14:58:18 +
From:"Jonathan A. Kollasch" 
Message-ID:  <20240419145818.351d2f...@cvs.netbsd.org>

  |  - bail out if resulting __DATE__/__TIME__ replacement strings are empty

If you want to do that (not that it would be useful, even if the %b
(etc) conversions produced nothing, there would still be two spaces
in the output.   It is almost impossible to get date to exit with an
error code (and nothing on stdout) in cases like this.

But if this is worth keeping, then

if ${MKREPRO_TIME} == "" || ${MKREPRO_TIME} == ""

probably is not what you wanted.

kre



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 14:58:18 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Increase MKREPRO robustness
 - Use C locale to ensure month abbreviations are as expected
 - bail out if MKREPRO_TIMESTAMP is not defined
 - bail out if resulting __DATE__/__TIME__ replacement strings are empty


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 14:58:18 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Increase MKREPRO robustness
 - Use C locale to ensure month abbreviations are as expected
 - bail out if MKREPRO_TIMESTAMP is not defined
 - bail out if resulting __DATE__/__TIME__ replacement strings are empty


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.32 src/external/bsd/ntp/lib/libntp/Makefile:1.33
--- src/external/bsd/ntp/lib/libntp/Makefile:1.32	Fri Apr 19 13:34:15 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri Apr 19 14:58:18 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.32 2024/04/19 13:34:15 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.33 2024/04/19 14:58:18 jakllsch Exp $
 
 LIBISPRIVATE=yes
 
@@ -88,8 +88,14 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 # Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
-MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
-MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
+.if ${MKREPRO_TIMESTAMP:Uundefined} == "undefined"
+.error MKREPRO_TIMESTAMP is undefined with MKREPRO active
+.endif
+MKREPRO_DATE != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
+MKREPRO_TIME != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
+.if ${MKREPRO_TIME} == "" || ${MKREPRO_TIME} == ""
+.error empty MKREPRO_DATE or MKREPRO_TIME
+.endif
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
 .endif



Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Rhialto
On Fri 19 Apr 2024 at 14:47:23 +0200, Martin Husemann wrote:
> The problem (IIUC) is that the ntp code parses this value internally, so
> it won't talk to anyone claiming a time before the time ntpd was compiled
> (or something along that line).

Would it make sense to just supply a fixed string to effectively defang
that code? Or just rip it out completely. It sounds like a giant footgun
somehow.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert
\X/ There is no AI. There is just someone else's work.   --I. Rose


signature.asc
Description: PGP signature


Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Robert Elz
Date:Fri, 19 Apr 2024 14:57:46 +0200
From:Martin Husemann 
Message-ID:  <20240419125746.gb26...@mail.duskware.de>

  | On Fri, Apr 19, 2024 at 02:47:23PM +0200, Martin Husemann wrote:
  | > The commit message could have explained that a bit.
  |
  | And it actually should have been "+%b %e %Y" - from the C18 standard draft:
  |
  | 6.10.8.1 Mandatory macros
  |
  | __DATE__ 
  |
  | The date of translation of the preprocessing translation unit: a
  | character string literal of the form "Mmm dd ", where the names of
  | the months are the same as those generated by the asctime function,

If that's still in the most recent C (in that form anyway) I'd be surprised,
as asctime() is more or less deprecated I think.

But if that is what is required, then the TOOL_DATE needs to be run with
LC_ALL=C (or LC_ALL=POSIX) so that you get the month name in English, rather
than whatever the local locale's short name for the month would be.

It is still a stupid format...

kre



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 13:34:15 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
The substitute __DATE__ should be %b %e %Y per a C18 draft

Subtle change that won't make a functional difference in this case;
changed only for semantic correctness.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 13:34:15 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
The substitute __DATE__ should be %b %e %Y per a C18 draft

Subtle change that won't make a functional difference in this case;
changed only for semantic correctness.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.31 src/external/bsd/ntp/lib/libntp/Makefile:1.32
--- src/external/bsd/ntp/lib/libntp/Makefile:1.31	Thu Apr 18 19:23:53 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri Apr 19 13:34:15 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2024/04/18 19:23:53 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.32 2024/04/19 13:34:15 jakllsch Exp $
 
 LIBISPRIVATE=yes
 
@@ -88,7 +88,7 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 # Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
-MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"
+MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
 MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"



Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Martin Husemann
On Fri, Apr 19, 2024 at 02:47:23PM +0200, Martin Husemann wrote:
> The commit message could have explained that a bit.

And it actually should have been "+%b %e %Y" - from the C18 standard draft:

6.10.8.1 Mandatory macros

__DATE__ 

The date of translation of the preprocessing translation unit: a
character string literal of the form "Mmm dd ", where the names of
the months are the same as those generated by the asctime function, and
the first character of dd is a space character if the value is less
than 10. If the date of translation is not available, an
implementation-defined valid date shall be supplied.


Martin


Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Martin Husemann
On Fri, Apr 19, 2024 at 04:36:46PM +0700, Robert Elz wrote:
> I don't understand that change, it altered from
> 
>   MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%F"
> to
>   MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"
> 
> %F is simply a shorthand for %Y-%m-%d (which is the correct way to write
> locale independent dates), %b is a locale dependent name of the month, and
> what's more this is in US-centric mon day year format, which we should avoid
> (aside from anything else, it is a dumb format, with the smallest value unit
> sitting in the middle, rather than at one end or the other).

The problem (IIUC) is that the ntp code parses this value internally, so
it won't talk to anyone claiming a time before the time ntpd was compiled
(or something along that line).

And __DATE__ gives us a stupid format: 

 > echo __DATE__ | cc -E - | tail -1
"Apr 19 2024"

which is different from

 > date -u -r 1713530399 "+%F"
2024-04-19

but matches

> date -u -r 1713530399 "+%b %d %Y"
Apr 19 2024


The commit message could have explained that a bit.

Martin


Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Robert Elz
Date:Thu, 18 Apr 2024 19:23:54 +
From:"Jonathan A. Kollasch" 
Message-ID:  <20240418192354.1bcc1f...@cvs.netbsd.org>

  | Module Name:src
  | Committed By:   jakllsch
  | Date:   Thu Apr 18 19:23:54 UTC 2024
  |
  | Modified Files:
  | src/external/bsd/ntp/lib/libntp: Makefile
  |
  | Log Message:
  | Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__

I don't understand that change, it altered from

MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%F"
to
MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"

%F is simply a shorthand for %Y-%m-%d (which is the correct way to write
locale independent dates), %b is a locale dependent name of the month, and
what's more this is in US-centric mon day year format, which we should avoid
(aside from anything else, it is a dumb format, with the smallest value unit
sitting in the middle, rather than at one end or the other).

If there is a problem where support for %F is missing somewhere, (and if
that happens in TOOL_DATE it must mean that we're using a locale strftime()
when building it, in which case we should add our version to the library)
please replace it with %Y-%m-%d (which is what it is defined to be) instead
of anything using %b (or %a or %B or %A) (or any other weird formats).

Further, if some format like that was needed for some reason, then it
probably should use %e rather than %d (to suppress the leading 0 on dates
before the 10th).   But don't just do that either.

If there isn't an actual problem using %F, please just revert this.

And lastly, and this applies to everyone - please do not request
pullups of anything (except perhaps urgent security fixes) immediately
after the change is committed - give it at least a few days, in case of
objection, breakage, ...

kre




CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Apr 18 19:23:54 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.30 src/external/bsd/ntp/lib/libntp/Makefile:1.31
--- src/external/bsd/ntp/lib/libntp/Makefile:1.30	Fri Apr 12 19:06:45 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Thu Apr 18 19:23:53 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.30 2024/04/12 19:06:45 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.31 2024/04/18 19:23:53 jakllsch Exp $
 
 LIBISPRIVATE=yes
 
@@ -88,7 +88,7 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 # Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
-MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%F"
+MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"
 MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Apr 18 19:23:54 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-12 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 12 19:06:45 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
remove now-unused assignment


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.29 src/external/bsd/ntp/lib/libntp/Makefile:1.30
--- src/external/bsd/ntp/lib/libntp/Makefile:1.29	Wed Apr  3 00:38:36 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri Apr 12 19:06:45 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2024/04/03 00:38:36 christos Exp $
+#	$NetBSD: Makefile,v 1.30 2024/04/12 19:06:45 jakllsch Exp $
 
 LIBISPRIVATE=yes
 
@@ -88,7 +88,6 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 # Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
-IMPORTDATE_FILE := ${.PARSEDIR}/../../importdate
 MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%F"
 MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-12 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 12 19:06:45 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
remove now-unused assignment


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 00:38:36 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
fix format.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.28 src/external/bsd/ntp/lib/libntp/Makefile:1.29
--- src/external/bsd/ntp/lib/libntp/Makefile:1.28	Tue Apr  2 10:19:02 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Tue Apr  2 20:38:36 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.28 2024/04/02 14:19:02 christos Exp $
+#	$NetBSD: Makefile,v 1.29 2024/04/03 00:38:36 christos Exp $
 
 LIBISPRIVATE=yes
 
@@ -89,8 +89,8 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 # Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
 IMPORTDATE_FILE := ${.PARSEDIR}/../../importdate
-MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "%F"
-MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "%T"
+MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%F"
+MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
 .endif



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr  3 00:38:36 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
fix format.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  2 14:19:02 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
use ${MKREPRO_TIMESTAMP} for baking in the date and time.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  2 14:19:02 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
use ${MKREPRO_TIMESTAMP} for baking in the date and time.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.27 src/external/bsd/ntp/lib/libntp/Makefile:1.28
--- src/external/bsd/ntp/lib/libntp/Makefile:1.27	Sat Jun  3 05:09:04 2023
+++ src/external/bsd/ntp/lib/libntp/Makefile	Tue Apr  2 10:19:02 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.27 2023/06/03 09:09:04 lukem Exp $
+#	$NetBSD: Makefile,v 1.28 2024/04/02 14:19:02 christos Exp $
 
 LIBISPRIVATE=yes
 
@@ -86,17 +86,11 @@ ymd2yd.c
 CPPFLAGS+= -I${IDIST}/sntp/libopts
 
 # For MKREPRO, avoid using __DATE__ and __TIME__.
-# Instead, use the date and time from ${IMPORTDATE_FILE}.
-#
-# The file should contain one line, like this:
-#	Fri Dec 27 19:28:17 EST 2013 (import)
-#
+# Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
 IMPORTDATE_FILE := ${.PARSEDIR}/../../importdate
-MKREPRO_DATE != ${TOOL_AWK} '{printf "%3s %2d %4d", $$2, $$3, $$6}' \
-	<${IMPORTDATE_FILE} # "Mmm DD "
-MKREPRO_TIME != ${TOOL_AWK} '{print $$4}' \
-	<${IMPORTDATE_FILE} # "HH:MM:SS"
+MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "%F"
+MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "%T"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
 .endif



CVS commit: src/external/bsd/ntp

2023-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May  9 20:51:15 UTC 2023

Modified Files:
src/external/bsd/ntp/bin/ntp-keygen: Makefile
src/external/bsd/ntp/bin/ntpd: Makefile
src/external/bsd/ntp/bin/sntp: Makefile
src/external/bsd/ntp/dist/ntpd: ntp_crypto.c
src/external/bsd/ntp/dist/util: ntp-keygen.c

Log Message:
Handle OpenSSL-3.x


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/bin/ntp-keygen/Makefile
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/ntp/bin/ntpd/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/bin/sntp/Makefile
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/dist/ntpd/ntp_crypto.c
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/util/ntp-keygen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp

2023-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May  9 20:51:15 UTC 2023

Modified Files:
src/external/bsd/ntp/bin/ntp-keygen: Makefile
src/external/bsd/ntp/bin/ntpd: Makefile
src/external/bsd/ntp/bin/sntp: Makefile
src/external/bsd/ntp/dist/ntpd: ntp_crypto.c
src/external/bsd/ntp/dist/util: ntp-keygen.c

Log Message:
Handle OpenSSL-3.x


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/bin/ntp-keygen/Makefile
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/ntp/bin/ntpd/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/bin/sntp/Makefile
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/dist/ntpd/ntp_crypto.c
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/util/ntp-keygen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/bin/ntp-keygen/Makefile
diff -u src/external/bsd/ntp/bin/ntp-keygen/Makefile:1.7 src/external/bsd/ntp/bin/ntp-keygen/Makefile:1.8
--- src/external/bsd/ntp/bin/ntp-keygen/Makefile:1.7	Sun Oct 11 03:07:31 2020
+++ src/external/bsd/ntp/bin/ntp-keygen/Makefile	Tue May  9 16:51:14 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2020/10/11 07:07:31 rin Exp $
+#	$NetBSD: Makefile,v 1.8 2023/05/09 20:51:14 christos Exp $
 
 .include 
 
@@ -21,6 +21,7 @@ CPPFLAGS+=-I${IDIST}/include -I${IDIST}/
 .PATH: ${DIST}
 
 COPTS.ntp-keygen.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :}
+COPTS.ntp-keygen.c+=	-Wno-error=deprecated-declarations
 
 CLEANFILES+=${MAN}
 

Index: src/external/bsd/ntp/bin/ntpd/Makefile
diff -u src/external/bsd/ntp/bin/ntpd/Makefile:1.28 src/external/bsd/ntp/bin/ntpd/Makefile:1.29
--- src/external/bsd/ntp/bin/ntpd/Makefile:1.28	Sun Oct 11 03:07:31 2020
+++ src/external/bsd/ntp/bin/ntpd/Makefile	Tue May  9 16:51:14 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.28 2020/10/11 07:07:31 rin Exp $
+#	$NetBSD: Makefile,v 1.29 2023/05/09 20:51:14 christos Exp $
 
 .include 
 
@@ -96,6 +96,7 @@ COPTS.refclock_parse.c+=	${GCC_NO_FORMAT
 COPTS.refclock_leitch.c+=	${GCC_NO_FORMAT_TRUNCATION}
 COPTS.refclock_neoclock4x.c+=	${GCC_NO_FORMAT_TRUNCATION}
 COPTS.ntp_io.c+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ntp_crypto.c+=		-Wno-error=deprecated-declarations
 
 CLEANFILES+=${MAN}
 

Index: src/external/bsd/ntp/bin/sntp/Makefile
diff -u src/external/bsd/ntp/bin/sntp/Makefile:1.9 src/external/bsd/ntp/bin/sntp/Makefile:1.10
--- src/external/bsd/ntp/bin/sntp/Makefile:1.9	Sun Oct 11 03:07:32 2020
+++ src/external/bsd/ntp/bin/sntp/Makefile	Tue May  9 16:51:14 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2020/10/11 07:07:32 rin Exp $
+# $NetBSD: Makefile,v 1.10 2023/05/09 20:51:14 christos Exp $
 
 USE_FORT?= yes	# network client/server
 
@@ -34,6 +34,7 @@ LDADD+= -L${LIBISC} -liscntp -levent -lm
 DPADD+=	${LIBM} ${LIBEVENT}
 
 COPTS.utilities.c+=	${GCC_NO_FORMAT_TRUNCATION}
+COPTS.crypto.c+=	-Wno-error=deprecated-declarations
 
 CLEANFILES+=${MAN}
 

Index: src/external/bsd/ntp/dist/ntpd/ntp_crypto.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_crypto.c:1.16 src/external/bsd/ntp/dist/ntpd/ntp_crypto.c:1.17
--- src/external/bsd/ntp/dist/ntpd/ntp_crypto.c:1.16	Mon May 25 16:47:25 2020
+++ src/external/bsd/ntp/dist/ntpd/ntp_crypto.c	Tue May  9 16:51:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_crypto.c,v 1.16 2020/05/25 20:47:25 christos Exp $	*/
+/*	$NetBSD: ntp_crypto.c,v 1.17 2023/05/09 20:51:14 christos Exp $	*/
 
 /*
  * ntp_crypto.c - NTP version 4 public key routines
@@ -836,7 +836,7 @@ crypto_recv(
 			 * errors.
 			 */
 			if (vallen == (u_int)EVP_PKEY_size(host_pkey)) {
-RSA *rsa = EVP_PKEY_get0_RSA(host_pkey);
+RSA *rsa = __UNCONST(EVP_PKEY_get0_RSA(host_pkey));
 u_int32 *cookiebuf = malloc(RSA_size(rsa));
 if (!cookiebuf) {
 	rval = XEVNT_CKY;
@@ -1613,7 +1613,7 @@ crypto_encrypt(
 	puch = vp->ptr;
 	temp32 = htonl(*cookie);
 	if (RSA_public_encrypt(4, (u_char *), puch,
-	EVP_PKEY_get0_RSA(pkey), RSA_PKCS1_OAEP_PADDING) <= 0) {
+	__UNCONST(EVP_PKEY_get0_RSA(pkey)), RSA_PKCS1_OAEP_PADDING) <= 0) {
 		msyslog(LOG_ERR, "crypto_encrypt: %s",
 		ERR_error_string(ERR_get_error(), NULL));
 		free(vp->ptr);
@@ -2186,7 +2186,7 @@ crypto_alice(
 		return (XEVNT_ID);
 	}
 
-	if ((dsa = EVP_PKEY_get0_DSA(peer->ident_pkey->pkey)) == NULL) {
+	if ((dsa = __UNCONST(EVP_PKEY_get0_DSA(peer->ident_pkey->pkey))) == NULL) {
 		msyslog(LOG_NOTICE, "crypto_alice: defective key");
 		return (XEVNT_PUB);
 	}
@@ -2264,7 +2264,7 @@ crypto_bob(
 		msyslog(LOG_NOTICE, "crypto_bob: scheme unavailable");
 		return (XEVNT_ID);
 	}
-	dsa = EVP_PKEY_get0_DSA(iffkey_info->pkey);
+	dsa = __UNCONST(EVP_PKEY_get0_DSA(iffkey_info->pkey));
 	DSA_get0_pqg(dsa, , , );
 	DSA_get0_key(dsa, NULL, _key);
 
@@ -2383,7 +2383,7 @@ crypto_iff(
 		ntohl(ep->fstamp));
 		return (XEVNT_FSP);
 	}
-	if ((dsa = EVP_PKEY_get0_DSA(peer->ident_pkey->pkey)) == NULL) {
+	if ((dsa = 

CVS commit: src/external/bsd/ntp/lib/libntp

2023-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May  9 20:39:24 UTC 2023

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Handle OpenSSL-3.x


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.25 src/external/bsd/ntp/lib/libntp/Makefile:1.26
--- src/external/bsd/ntp/lib/libntp/Makefile:1.25	Tue Apr 13 00:58:59 2021
+++ src/external/bsd/ntp/lib/libntp/Makefile	Tue May  9 16:39:24 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.25 2021/04/13 04:58:59 mrg Exp $
+#	$NetBSD: Makefile,v 1.26 2023/05/09 20:39:24 christos Exp $
 
 LIBISPRIVATE=yes
 
@@ -105,4 +105,6 @@ COPTS.timetoa.c+=	${GCC_NO_FORMAT_TRUNCA
 COPTS.socktoa.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
 COPTS.socktohost.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
 
+COPTS.a_md5encrypt.c+= -Wno-error=deprecated-declarations
+
 .include 



CVS commit: src/external/bsd/ntp/lib/libntp

2023-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May  9 20:39:24 UTC 2023

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Handle OpenSSL-3.x


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp

2022-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 13 21:16:38 UTC 2022

Modified Files:
src/external/bsd/ntp: Makefile.inc

Log Message:
importdate is no more


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/ntp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/Makefile.inc
diff -u src/external/bsd/ntp/Makefile.inc:1.21 src/external/bsd/ntp/Makefile.inc:1.22
--- src/external/bsd/ntp/Makefile.inc:1.21	Sun Oct 11 03:07:31 2020
+++ src/external/bsd/ntp/Makefile.inc	Tue Dec 13 16:16:38 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.21 2020/10/11 07:07:31 rin Exp $
+#	$NetBSD: Makefile.inc,v 1.22 2022/12/13 21:16:38 christos Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=yes
@@ -46,7 +46,7 @@ LDADD+=-ldns_sd
 SRCS+=	version.c
 
 CLEANFILES+=version.c version.o
-version.c: ${LIBNTP}/libntp.a ${.CURDIR}/../../scripts/mkver ${.CURDIR}/../../importdate
+version.c: ${LIBNTP}/libntp.a ${.CURDIR}/../../scripts/mkver
 	${_MKTARGET_CREATE}
 	${HOST_SH} ${.CURDIR}/../../scripts/mkver ${PROG} > /dev/null
 



CVS commit: src/external/bsd/ntp

2022-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 13 21:16:38 UTC 2022

Modified Files:
src/external/bsd/ntp: Makefile.inc

Log Message:
importdate is no more


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/ntp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp

2022-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 13 18:36:42 UTC 2022

Modified Files:
src/external/bsd/ntp/scripts: mkver
Removed Files:
src/external/bsd/ntp: importdate

Log Message:
Remove the importdate hack to make things more similar with the upstream
script.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r0 src/external/bsd/ntp/importdate
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/ntp/scripts/mkver

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/scripts/mkver
diff -u src/external/bsd/ntp/scripts/mkver:1.18 src/external/bsd/ntp/scripts/mkver:1.19
--- src/external/bsd/ntp/scripts/mkver:1.18	Tue Dec 13 13:27:45 2022
+++ src/external/bsd/ntp/scripts/mkver	Tue Dec 13 13:36:41 2022
@@ -23,13 +23,7 @@ if [ -n "$SOURCE_DATE_EPOCH" ]; then
ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -d@$SOURCE_DATE_EPOCH 2>/dev/null`" ||
ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -r $SOURCE_DATE_EPOCH`"
 else
-   ifile="`dirname $0`/../importdate"
-   if [ -f "$ifile" ]; then
-   # NetBSD MKREPRO: Don't embed current date/time/run number
-   ConfStr="$ConfStr "`cat "$ifile"`
-   else
-   ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
-   fi
+   ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
 fi
 
 if [ -n "$MKREPRO_TIMESTAMP" ]; then
@@ -43,15 +37,7 @@ else
 echo $RUN > .version
 fi
 
-if [ -f "$ifile" ]; then
-  # NetBSD MKREPRO: Don't embed current date/time/run number
-else
-  RUN="`cat .version`"
-  RUN="`expr $RUN + 1`"
-  echo $RUN > .version
-
-  ConfStr="$ConfStr (${RUN})"
-fi
+ConfStr="$ConfStr (${RUN})"
 
 echo "Version <${ConfStr}>";
 



CVS commit: src/external/bsd/ntp

2022-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 13 18:36:42 UTC 2022

Modified Files:
src/external/bsd/ntp/scripts: mkver
Removed Files:
src/external/bsd/ntp: importdate

Log Message:
Remove the importdate hack to make things more similar with the upstream
script.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r0 src/external/bsd/ntp/importdate
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/ntp/scripts/mkver

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/scripts

2022-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 13 18:27:45 UTC 2022

Modified Files:
src/external/bsd/ntp/scripts: mkver

Log Message:
preserve the original logic if we don't have MKREPRO_TIMESTAMP, use consistent
version string with other builds.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/ntp/scripts/mkver

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/scripts

2022-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec 13 18:27:45 UTC 2022

Modified Files:
src/external/bsd/ntp/scripts: mkver

Log Message:
preserve the original logic if we don't have MKREPRO_TIMESTAMP, use consistent
version string with other builds.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/ntp/scripts/mkver

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/scripts/mkver
diff -u src/external/bsd/ntp/scripts/mkver:1.17 src/external/bsd/ntp/scripts/mkver:1.18
--- src/external/bsd/ntp/scripts/mkver:1.17	Tue Dec 13 13:15:29 2022
+++ src/external/bsd/ntp/scripts/mkver	Tue Dec 13 13:27:45 2022
@@ -32,8 +32,15 @@ else
fi
 fi
 
-if [ ! -f .version ]; then
-  echo 0 > .version
+if [ -n "$MKREPRO_TIMESTAMP" ]; then
+RUN=1
+else
+if [ ! -f .version ]; then
+  echo 0 > .version
+fi
+RUN="`cat .version`"
+RUN="`expr $RUN + 1`"
+echo $RUN > .version
 fi
 
 if [ -f "$ifile" ]; then



CVS commit: src/external/bsd/ntp/scripts

2022-12-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 13 18:15:29 UTC 2022

Modified Files:
src/external/bsd/ntp/scripts: mkver

Log Message:
When doing reproducible builds, don't import a "run" number in the
ntp tools config version files.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/scripts/mkver

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/scripts/mkver
diff -u src/external/bsd/ntp/scripts/mkver:1.16 src/external/bsd/ntp/scripts/mkver:1.17
--- src/external/bsd/ntp/scripts/mkver:1.16	Sun Oct  9 21:41:05 2022
+++ src/external/bsd/ntp/scripts/mkver	Tue Dec 13 18:15:29 2022
@@ -35,11 +35,16 @@ fi
 if [ ! -f .version ]; then
   echo 0 > .version
 fi
-RUN="`cat .version`"
-RUN="`expr $RUN + 1`"
-echo $RUN > .version
 
-ConfStr="$ConfStr (${RUN})"
+if [ -f "$ifile" ]; then
+  # NetBSD MKREPRO: Don't embed current date/time/run number
+else
+  RUN="`cat .version`"
+  RUN="`expr $RUN + 1`"
+  echo $RUN > .version
+
+  ConfStr="$ConfStr (${RUN})"
+fi
 
 echo "Version <${ConfStr}>";
 



CVS commit: src/external/bsd/ntp/scripts

2022-12-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 13 18:15:29 UTC 2022

Modified Files:
src/external/bsd/ntp/scripts: mkver

Log Message:
When doing reproducible builds, don't import a "run" number in the
ntp tools config version files.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/scripts/mkver

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp

2022-10-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct  9 21:41:05 UTC 2022

Modified Files:
src/external/bsd/ntp: importdate ntp2netbsd
src/external/bsd/ntp/dist: configure.ac
src/external/bsd/ntp/dist/include: l_stdlib.h ntp.h ntp_config.h
recvbuff.h
src/external/bsd/ntp/dist/lib/isc/win32/include/isc: int.h
src/external/bsd/ntp/dist/libntp: a_md5encrypt.c decodenetnum.c
recvbuff.c strdup.c timexsup.c
src/external/bsd/ntp/dist/ntpd: ntp_config.c ntp_io.c ntp_proto.c
ntp_refclock.c ntp_request.c ntp_timer.c ntpd-opts.c ntpd-opts.h
refclock_jjy.c refclock_nmea.c refclock_palisade.c refclock_parse.c
src/external/bsd/ntp/dist/ntpdate: ntpdate.c
src/external/bsd/ntp/dist/ntpdc: ntpdc-opts.c ntpdc-opts.h
src/external/bsd/ntp/dist/ntpq: ntpq-opts.c ntpq-opts.h
src/external/bsd/ntp/dist/ntpsnmpd: ntpsnmpd-opts.c ntpsnmpd-opts.h
src/external/bsd/ntp/dist/sntp: crypto.c sntp-opts.c sntp-opts.h
version.c
src/external/bsd/ntp/dist/tests/libntp: decodenetnum.c netof.c
recvbuff.c run-decodenetnum.c sockaddrtest.c
src/external/bsd/ntp/dist/util: ntp-keygen-opts.c ntp-keygen-opts.h
src/external/bsd/ntp/include: config.h
src/external/bsd/ntp/scripts: mkver

Log Message:
merge conflicts between ntp-4.2.8p1{4,5}


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/ntp/importdate
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/ntp2netbsd
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/dist/configure.ac
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/include/l_stdlib.h
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/ntp/dist/include/ntp.h
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/include/ntp_config.h
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/dist/include/recvbuff.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/ntp/dist/lib/isc/win32/include/isc/int.h
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/ntp/dist/libntp/a_md5encrypt.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/libntp/decodenetnum.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/libntp/recvbuff.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/libntp/strdup.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/dist/libntp/timexsup.c
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/ntp/dist/ntpd/ntp_config.c
cvs rdiff -u -r1.31 -r1.32 src/external/bsd/ntp/dist/ntpd/ntp_io.c
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/ntp/dist/ntpd/ntp_proto.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/ntpd/ntp_refclock.c \
src/external/bsd/ntp/dist/ntpd/ntpd-opts.c \
src/external/bsd/ntp/dist/ntpd/refclock_nmea.c
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/ntp/dist/ntpd/ntp_request.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/ntp/dist/ntpd/ntp_timer.c
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/dist/ntpd/ntpd-opts.h
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/ntp/dist/ntpd/refclock_jjy.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/ntpd/refclock_palisade.c
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/ntp/dist/ntpd/refclock_parse.c
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/ntpdate/ntpdate.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/ntpdc/ntpdc-opts.c \
src/external/bsd/ntp/dist/ntpdc/ntpdc-opts.h
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/ntpq/ntpq-opts.c \
src/external/bsd/ntp/dist/ntpq/ntpq-opts.h
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c \
src/external/bsd/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/ntp/dist/sntp/crypto.c
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/sntp/sntp-opts.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/sntp/sntp-opts.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/dist/sntp/version.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/ntp/dist/tests/libntp/decodenetnum.c \
src/external/bsd/ntp/dist/tests/libntp/netof.c \
src/external/bsd/ntp/dist/tests/libntp/recvbuff.c \
src/external/bsd/ntp/dist/tests/libntp/sockaddrtest.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/ntp/dist/tests/libntp/run-decodenetnum.c
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/ntp/dist/util/ntp-keygen-opts.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/util/ntp-keygen-opts.h
cvs rdiff -u -r1.26 -r1.27 src/external/bsd/ntp/include/config.h
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/ntp/scripts/mkver

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/importdate
diff -u src/external/bsd/ntp/importdate:1.15 src/external/bsd/ntp/importdate:1.16
--- src/external/bsd/ntp/importdate:1.15	Mon May 25 16:47:18 2020
+++ src/external/bsd/ntp/importdate	Sun Oct  9 17:41:03 2022
@@ -1 +1 @@
-Mon May 25 15:53:34 EDT 2020 (import)
+Sun Oct  9 17:37:20 EDT 2022 (import)

Index: 

CVS commit: src/external/bsd/ntp

2022-10-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct  9 21:41:05 UTC 2022

Modified Files:
src/external/bsd/ntp: importdate ntp2netbsd
src/external/bsd/ntp/dist: configure.ac
src/external/bsd/ntp/dist/include: l_stdlib.h ntp.h ntp_config.h
recvbuff.h
src/external/bsd/ntp/dist/lib/isc/win32/include/isc: int.h
src/external/bsd/ntp/dist/libntp: a_md5encrypt.c decodenetnum.c
recvbuff.c strdup.c timexsup.c
src/external/bsd/ntp/dist/ntpd: ntp_config.c ntp_io.c ntp_proto.c
ntp_refclock.c ntp_request.c ntp_timer.c ntpd-opts.c ntpd-opts.h
refclock_jjy.c refclock_nmea.c refclock_palisade.c refclock_parse.c
src/external/bsd/ntp/dist/ntpdate: ntpdate.c
src/external/bsd/ntp/dist/ntpdc: ntpdc-opts.c ntpdc-opts.h
src/external/bsd/ntp/dist/ntpq: ntpq-opts.c ntpq-opts.h
src/external/bsd/ntp/dist/ntpsnmpd: ntpsnmpd-opts.c ntpsnmpd-opts.h
src/external/bsd/ntp/dist/sntp: crypto.c sntp-opts.c sntp-opts.h
version.c
src/external/bsd/ntp/dist/tests/libntp: decodenetnum.c netof.c
recvbuff.c run-decodenetnum.c sockaddrtest.c
src/external/bsd/ntp/dist/util: ntp-keygen-opts.c ntp-keygen-opts.h
src/external/bsd/ntp/include: config.h
src/external/bsd/ntp/scripts: mkver

Log Message:
merge conflicts between ntp-4.2.8p1{4,5}


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/ntp/importdate
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/ntp2netbsd
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/dist/configure.ac
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/include/l_stdlib.h
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/ntp/dist/include/ntp.h
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/include/ntp_config.h
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/dist/include/recvbuff.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/ntp/dist/lib/isc/win32/include/isc/int.h
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/ntp/dist/libntp/a_md5encrypt.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/libntp/decodenetnum.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/libntp/recvbuff.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/libntp/strdup.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/dist/libntp/timexsup.c
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/ntp/dist/ntpd/ntp_config.c
cvs rdiff -u -r1.31 -r1.32 src/external/bsd/ntp/dist/ntpd/ntp_io.c
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/ntp/dist/ntpd/ntp_proto.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/ntpd/ntp_refclock.c \
src/external/bsd/ntp/dist/ntpd/ntpd-opts.c \
src/external/bsd/ntp/dist/ntpd/refclock_nmea.c
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/ntp/dist/ntpd/ntp_request.c
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/ntp/dist/ntpd/ntp_timer.c
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/dist/ntpd/ntpd-opts.h
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/ntp/dist/ntpd/refclock_jjy.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/ntpd/refclock_palisade.c
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/ntp/dist/ntpd/refclock_parse.c
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/ntpdate/ntpdate.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/ntpdc/ntpdc-opts.c \
src/external/bsd/ntp/dist/ntpdc/ntpdc-opts.h
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/ntpq/ntpq-opts.c \
src/external/bsd/ntp/dist/ntpq/ntpq-opts.h
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c \
src/external/bsd/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/ntp/dist/sntp/crypto.c
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/sntp/sntp-opts.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/sntp/sntp-opts.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/dist/sntp/version.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/ntp/dist/tests/libntp/decodenetnum.c \
src/external/bsd/ntp/dist/tests/libntp/netof.c \
src/external/bsd/ntp/dist/tests/libntp/recvbuff.c \
src/external/bsd/ntp/dist/tests/libntp/sockaddrtest.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/ntp/dist/tests/libntp/run-decodenetnum.c
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/ntp/dist/util/ntp-keygen-opts.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/util/ntp-keygen-opts.h
cvs rdiff -u -r1.26 -r1.27 src/external/bsd/ntp/include/config.h
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/ntp/scripts/mkver

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-02-18 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Thu Feb 18 15:13:38 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_timer.c

Log Message:
PR bin/55973:

fix routing message triggered one shot interface update.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/ntpd/ntp_timer.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_timer.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.9 src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.10
--- src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.9	Sun Jan  3 15:33:05 2021
+++ src/external/bsd/ntp/dist/ntpd/ntp_timer.c	Thu Feb 18 15:13:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_timer.c,v 1.9 2021/01/03 15:33:05 roy Exp $	*/
+/*	$NetBSD: ntp_timer.c,v 1.10 2021/02/18 15:13:37 kardel Exp $	*/
 
 /*
  * ntp_timer.c - event timer support routines
@@ -428,6 +428,8 @@ timer(void)
 		if (interface_interval)
 			timer_interfacetimeout(current_time +
 			interface_interval);
+		else
+			timer_interfacetimeout(0);
 		DPRINTF(2, ("timer: interface update\n"));
 		interface_update(NULL, NULL);
 	}



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-02-18 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Thu Feb 18 15:13:38 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_timer.c

Log Message:
PR bin/55973:

fix routing message triggered one shot interface update.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/ntpd/ntp_timer.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jan 31 08:27:49 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c

Log Message:
ntpd: ignore errno EINTR on reads from the routing socket


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/bsd/ntp/dist/ntpd/ntp_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.30 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.31
--- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.30	Sun Jan 31 08:26:47 2021
+++ src/external/bsd/ntp/dist/ntpd/ntp_io.c	Sun Jan 31 08:27:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_io.c,v 1.30 2021/01/31 08:26:47 roy Exp $	*/
+/*	$NetBSD: ntp_io.c,v 1.31 2021/01/31 08:27:49 roy Exp $	*/
 
 /*
  * ntp_io.c - input/output routines for ntpd.	The socket-opening code
@@ -4741,7 +4741,7 @@ process_routing_msgs(struct asyncio_read
 cnt = read(reader->fd, buffer, sizeof(buffer));
 			} while (cnt != -1 || errno == ENOBUFS);
 			timer_interfacetimeout(current_time + UPDATE_GRACE);
-		} else {
+		} else if (errno != EINTR) {
 			msyslog(LOG_ERR,
 "routing socket reports: %m - disabling");
 			remove_asyncio_reader(reader);



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jan 31 08:27:49 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c

Log Message:
ntpd: ignore errno EINTR on reads from the routing socket


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/bsd/ntp/dist/ntpd/ntp_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jan 31 08:26:47 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c

Log Message:
ntpd: move route socket overflow message from LOG_ERR to LOG_DEBUG

While here stop caring about RTM_LOSING as that's purely informational.
If routing does change then we get RTM_ADD/DEL/CHANGE.
Also stop caring about RTM_IFANNOUNCE as we really only want addresses
and interface flag updates which we get by RTM_NEWADDR/DELADDR/CHGADDR and
RTM_IFINFO.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/external/bsd/ntp/dist/ntpd/ntp_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jan 31 08:26:47 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c

Log Message:
ntpd: move route socket overflow message from LOG_ERR to LOG_DEBUG

While here stop caring about RTM_LOSING as that's purely informational.
If routing does change then we get RTM_ADD/DEL/CHANGE.
Also stop caring about RTM_IFANNOUNCE as we really only want addresses
and interface flag updates which we get by RTM_NEWADDR/DELADDR/CHGADDR and
RTM_IFINFO.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/external/bsd/ntp/dist/ntpd/ntp_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.29 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.30
--- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.29	Sun Jan  3 15:33:05 2021
+++ src/external/bsd/ntp/dist/ntpd/ntp_io.c	Sun Jan 31 08:26:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_io.c,v 1.29 2021/01/03 15:33:05 roy Exp $	*/
+/*	$NetBSD: ntp_io.c,v 1.30 2021/01/31 08:26:47 roy Exp $	*/
 
 /*
  * ntp_io.c - input/output routines for ntpd.	The socket-opening code
@@ -4730,8 +4730,9 @@ process_routing_msgs(struct asyncio_read
 
 	if (cnt < 0) {
 		if (errno == ENOBUFS) {
-			msyslog(LOG_ERR,
-"routing socket reports: %m");
+			msyslog(LOG_DEBUG,
+"routing socket overflowed"
+" - will update interfaces");
 			/*
 			 * drain the routing socket as we need to update
 			 * the interfaces anyway
@@ -4792,15 +4793,9 @@ process_routing_msgs(struct asyncio_read
 #ifdef RTM_CHANGE
 		case RTM_CHANGE:
 #endif
-#ifdef RTM_LOSING
-		case RTM_LOSING:
-#endif
 #ifdef RTM_IFINFO
 		case RTM_IFINFO:
 #endif
-#ifdef RTM_IFANNOUNCE
-		case RTM_IFANNOUNCE:
-#endif
 #ifdef RTM_NEWLINK
 		case RTM_NEWLINK:
 #endif
@@ -4874,15 +4869,9 @@ init_async_notifications()
 #ifdef RTM_CHANGE
 		RTM_CHANGE,
 #endif
-#ifdef RTM_LOSING
-		RTM_LOSING,
-#endif
 #ifdef RTM_IFINFO
 		RTM_IFINFO,
 #endif
-#ifdef RTM_IFANNOUNCE
-		RTM_IFANNOUNCE,
-#endif
 #ifdef RTM_NEWLINK
 		RTM_NEWLINK,
 #endif



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jan  3 15:33:05 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: cmd_args.c ntp_io.c ntp_timer.c

Log Message:
ntp: respect user's wishes to disable interface scanning

While here, disable periodic scanning by default on NetBSD as it's
no longer needed.
The user can still enable it though with a positive number to the -U
option.

kardel@ So far I see no other issues from the pitfalls I know of


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/ntpd/cmd_args.c
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/ntp/dist/ntpd/ntp_io.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/ntpd/ntp_timer.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/cmd_args.c
diff -u src/external/bsd/ntp/dist/ntpd/cmd_args.c:1.6 src/external/bsd/ntp/dist/ntpd/cmd_args.c:1.7
--- src/external/bsd/ntp/dist/ntpd/cmd_args.c:1.6	Mon May 25 20:47:25 2020
+++ src/external/bsd/ntp/dist/ntpd/cmd_args.c	Sun Jan  3 15:33:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmd_args.c,v 1.6 2020/05/25 20:47:25 christos Exp $	*/
+/*	$NetBSD: cmd_args.c,v 1.7 2021/01/03 15:33:05 roy Exp $	*/
 
 /*
  * cmd_args.c = command-line argument processing
@@ -181,9 +181,11 @@ getCmdOpts(
 	if (HAVE_OPT( UPDATEINTERVAL )) {
 		long val = OPT_VALUE_UPDATEINTERVAL;
 
-		if (val >= 0)
+		if (val >= 0) {
 			interface_interval = val;
-		else {
+			if (interface_interval == 0)
+disable_dynamic_updates = 1;
+		} else {
 			fprintf(stderr,
 "command line interface update interval %ld must not be negative\n",
 val);

Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.28 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.29
--- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.28	Fri Jan  1 17:21:47 2021
+++ src/external/bsd/ntp/dist/ntpd/ntp_io.c	Sun Jan  3 15:33:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_io.c,v 1.28 2021/01/01 17:21:47 roy Exp $	*/
+/*	$NetBSD: ntp_io.c,v 1.29 2021/01/03 15:33:05 roy Exp $	*/
 
 /*
  * ntp_io.c - input/output routines for ntpd.	The socket-opening code
@@ -455,8 +455,13 @@ init_io(void)
 {
 	/* Init buffer free list and stat counters */
 	init_recvbuff(RECV_INIT);
+#ifdef SO_RERROR
+	/* route(4) overflow can be observed */
+	interface_interval = 0;
+#else
 	/* update interface every 5 minutes as default */
 	interface_interval = 300;
+#endif
 
 #ifdef WORK_PIPE
 	addremove_io_fd = _addremove_io_fd;

Index: src/external/bsd/ntp/dist/ntpd/ntp_timer.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.8 src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.9
--- src/external/bsd/ntp/dist/ntpd/ntp_timer.c:1.8	Mon May 25 20:47:25 2020
+++ src/external/bsd/ntp/dist/ntpd/ntp_timer.c	Sun Jan  3 15:33:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_timer.c,v 1.8 2020/05/25 20:47:25 christos Exp $	*/
+/*	$NetBSD: ntp_timer.c,v 1.9 2021/01/03 15:33:05 roy Exp $	*/
 
 /*
  * ntp_timer.c - event timer support routines
@@ -423,9 +423,11 @@ timer(void)
 	/*
 	 * Interface update timer
 	 */
-	if (interface_interval && interface_timer <= current_time) {
-		timer_interfacetimeout(current_time +
-		interface_interval);
+	if (!disable_dynamic_updates &&
+	interface_timer && interface_timer <= current_time) {
+		if (interface_interval)
+			timer_interfacetimeout(current_time +
+			interface_interval);
 		DPRINTF(2, ("timer: interface update\n"));
 		interface_update(NULL, NULL);
 	}



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jan  3 15:33:05 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: cmd_args.c ntp_io.c ntp_timer.c

Log Message:
ntp: respect user's wishes to disable interface scanning

While here, disable periodic scanning by default on NetBSD as it's
no longer needed.
The user can still enable it though with a positive number to the -U
option.

kardel@ So far I see no other issues from the pitfalls I know of


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/ntpd/cmd_args.c
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/ntp/dist/ntpd/ntp_io.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/ntpd/ntp_timer.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-03 Thread Frank Kardel

Hi Roy !

That looks more semantics (the ones I know of - dynamic interface 
scanning is one of my NTPd parts)


preserving now.

So far I see no other issues from the pitfalls I know of.

Lets hope our kernel and other SO_RERRORS systems miss any

interface scan worthy events.

Frank


On 01/03/21 12:03, Roy Marples wrote:

On 02/01/2021 23:33, Frank Kardel wrote:

Hi Roy !

This may look like a better solution from the interface tracking side.

People have requested being able to disable dynamic interface updates 
completely.


This was implemented via the -U 0.


...


This patch seems (by visual inspection) to break that logic.

Also the behavior now fully relies in the routing message 
functionality which can be disabled


on serious procession errors - at that point the code robustness 
relies on the periodic


re-scanning - so I am not sure whether the periodic re-scanning 
should be completely


Valid points.

New patch sets disable_dynamic_updates if the -U 0 is given.
The only other code to touch disable_dynamic_updates is this
disable_dynamic_updates |= (sw_uid != 0);  /* also notifies routing 
message listener *


So this should be good now.

diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/cmd_args.c
--- a/external/bsd/ntp/dist/ntpd/cmd_args.c Sat Jan 02 12:39:33 
2021 +
+++ b/external/bsd/ntp/dist/ntpd/cmd_args.c Sun Jan 03 10:56:58 
2021 +

@@ -181,9 +181,11 @@
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;

-   if (val >= 0)
+   if (val >= 0) {
interface_interval = val;
-   else {
+   if (interface_interval == 0)
+   disable_dynamic_updates = 1;
+   } else {
fprintf(stderr,
"command line interface update 
interval %ld must not be negative\n",

val);
diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_io.c
--- a/external/bsd/ntp/dist/ntpd/ntp_io.c   Sat Jan 02 12:39:33 
2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_io.c   Sun Jan 03 10:56:58 
2021 +

@@ -455,8 +455,13 @@
 {
/* Init buffer free list and stat counters */
init_recvbuff(RECV_INIT);
+#ifdef SO_RERROR
+   /* route(4) overflow can be observed */
+   interface_interval = 0;
+#else
/* update interface every 5 minutes as default */
interface_interval = 300;
+#endif

 #ifdef WORK_PIPE
addremove_io_fd = _addremove_io_fd;
diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_timer.c
--- a/external/bsd/ntp/dist/ntpd/ntp_timer.cSat Jan 02 12:39:33 
2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_timer.cSun Jan 03 10:56:58 
2021 +

@@ -423,9 +423,11 @@
/*
 * Interface update timer
 */
-   if (interface_interval && interface_timer <= current_time) {
-   timer_interfacetimeout(current_time +
-   interface_interval);
+   if (!disable_dynamic_updates &&
+   interface_timer && interface_timer <= current_time) {
+   if (interface_interval)
+   timer_interfacetimeout(current_time +
+   interface_interval);
DPRINTF(2, ("timer: interface update\n"));
interface_update(NULL, NULL);
}





Re: CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-03 Thread Roy Marples

On 02/01/2021 23:33, Frank Kardel wrote:
Also the behavior now fully relies in the routing message functionality which 
can be disabled


on serious procession errors - at that point the code robustness relies on the 
periodic


re-scanning - so I am not sure whether the periodic re-scanning should be 
completely


disabled.


Could you expand on this please? It sounds like you want it to be user disabled 
but not for routing messages? I don't understand.


Roy


Re: CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-03 Thread Roy Marples

On 02/01/2021 23:33, Frank Kardel wrote:

Hi Roy !

This may look like a better solution from the interface tracking side.

People have requested being able to disable dynamic interface updates 
completely.

This was implemented via the -U 0.


...


This patch seems (by visual inspection) to break that logic.

Also the behavior now fully relies in the routing message functionality which 
can be disabled


on serious procession errors - at that point the code robustness relies on the 
periodic


re-scanning - so I am not sure whether the periodic re-scanning should be 
completely


Valid points.

New patch sets disable_dynamic_updates if the -U 0 is given.
The only other code to touch disable_dynamic_updates is this
disable_dynamic_updates |= (sw_uid != 0);  /* also notifies routing message 
listener *


So this should be good now.

diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/cmd_args.c
--- a/external/bsd/ntp/dist/ntpd/cmd_args.c Sat Jan 02 12:39:33 2021 +
+++ b/external/bsd/ntp/dist/ntpd/cmd_args.c Sun Jan 03 10:56:58 2021 +
@@ -181,9 +181,11 @@
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;

-   if (val >= 0)
+   if (val >= 0) {
interface_interval = val;
-   else {
+   if (interface_interval == 0)
+   disable_dynamic_updates = 1;
+   } else {
fprintf(stderr,
"command line interface update interval %ld 
must not be negative\n",

val);
diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_io.c
--- a/external/bsd/ntp/dist/ntpd/ntp_io.c   Sat Jan 02 12:39:33 2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_io.c   Sun Jan 03 10:56:58 2021 +
@@ -455,8 +455,13 @@
 {
/* Init buffer free list and stat counters */
init_recvbuff(RECV_INIT);
+#ifdef SO_RERROR
+   /* route(4) overflow can be observed */
+   interface_interval = 0;
+#else
/* update interface every 5 minutes as default */
interface_interval = 300;
+#endif

 #ifdef WORK_PIPE
addremove_io_fd = _addremove_io_fd;
diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_timer.c
--- a/external/bsd/ntp/dist/ntpd/ntp_timer.cSat Jan 02 12:39:33 2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_timer.cSun Jan 03 10:56:58 2021 +
@@ -423,9 +423,11 @@
/*
 * Interface update timer
 */
-   if (interface_interval && interface_timer <= current_time) {
-   timer_interfacetimeout(current_time +
-   interface_interval);
+   if (!disable_dynamic_updates &&
+   interface_timer && interface_timer <= current_time) {
+   if (interface_interval)
+   timer_interfacetimeout(current_time +
+   interface_interval);
DPRINTF(2, ("timer: interface update\n"));
interface_update(NULL, NULL);
}



Re: CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-02 Thread Frank Kardel

Hi Roy !

This may look like a better solution from the interface tracking side.

People have requested being able to disable dynamic interface updates 
completely.


This was implemented via the -U 0.

See man ntpd:

...

−U number, −−updateinterval=number
 interval in seconds between scans for new or dropped 
inter‐
 faces.  This option takes an integer number as its 
argument.


 Give the time in seconds between two scans for new or 
dropped

 interfaces.  For systems with routing socket support the
 scans will be performed shortly after the interface change
 has been detected by the system.  Use 0 to disable 
scanning.

 60 seconds is the minimum time between scans.

...

This patch seems (by visual inspection) to break that logic.

Also the behavior now fully relies in the routing message functionality 
which can be disabled


on serious procession errors - at that point the code robustness relies 
on the periodic


re-scanning - so I am not sure whether the periodic re-scanning should 
be completely


disabled.

Best regards,

  Frank


On 01/02/21 19:41, Roy Marples wrote:

On 02/01/2021 17:23, Roy Marples wrote:
That's a good point, with this we can now remove that forced sync on 
a timer approach.


Does this look ok?


Better patch:

diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_io.c
--- a/external/bsd/ntp/dist/ntpd/ntp_io.c   Sat Jan 02 12:39:33 
2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_io.c   Sat Jan 02 18:39:34 
2021 +

@@ -455,8 +455,13 @@
 {
/* Init buffer free list and stat counters */
init_recvbuff(RECV_INIT);
+#ifdef SO_RERROR
+   /* route(4) overflow can be observed */
+   interface_interval = 0;
+#else
/* update interface every 5 minutes as default */
interface_interval = 300;
+#endif

 #ifdef WORK_PIPE
addremove_io_fd = _addremove_io_fd;
diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_timer.c
--- a/external/bsd/ntp/dist/ntpd/ntp_timer.cSat Jan 02 12:39:33 
2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_timer.cSat Jan 02 18:39:34 
2021 +

@@ -423,9 +423,10 @@
/*
 * Interface update timer
 */
-   if (interface_interval && interface_timer <= current_time) {
-   timer_interfacetimeout(current_time +
-   interface_interval);
+   if (interface_timer && interface_timer <= current_time) {
+   if (interface_interval)
+   timer_interfacetimeout(current_time +
+   interface_interval);
DPRINTF(2, ("timer: interface update\n"));
interface_update(NULL, NULL);
}




Re: CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-02 Thread Roy Marples

On 02/01/2021 17:23, Roy Marples wrote:
That's a good point, with this we can now remove that forced sync on a timer 
approach.


Does this look ok?


Better patch:

diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_io.c
--- a/external/bsd/ntp/dist/ntpd/ntp_io.c   Sat Jan 02 12:39:33 2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_io.c   Sat Jan 02 18:39:34 2021 +
@@ -455,8 +455,13 @@
 {
/* Init buffer free list and stat counters */
init_recvbuff(RECV_INIT);
+#ifdef SO_RERROR
+   /* route(4) overflow can be observed */
+   interface_interval = 0;
+#else
/* update interface every 5 minutes as default */
interface_interval = 300;
+#endif

 #ifdef WORK_PIPE
addremove_io_fd = _addremove_io_fd;
diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_timer.c
--- a/external/bsd/ntp/dist/ntpd/ntp_timer.cSat Jan 02 12:39:33 2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_timer.cSat Jan 02 18:39:34 2021 +
@@ -423,9 +423,10 @@
/*
 * Interface update timer
 */
-   if (interface_interval && interface_timer <= current_time) {
-   timer_interfacetimeout(current_time +
-   interface_interval);
+   if (interface_timer && interface_timer <= current_time) {
+   if (interface_interval)
+   timer_interfacetimeout(current_time +
+   interface_interval);
DPRINTF(2, ("timer: interface update\n"));
interface_update(NULL, NULL);
}


Re: CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-02 Thread Roy Marples

Hi Frank

On 02/01/2021 09:55, Frank Kardel wrote:

I doubt that the explicit draining is helpful here as it already happens


I was aware of that.
I was just trying to avoid excess timer interface timeouts if we don't get 
around to reading the next message in UPDATE_GRACE time.

Let's see what upstream says.

Also the ntp_io system will periodically refresh it interface lists in time as 
it was explicitly designed to be robust against lost messages from the routing 
socket.


That's a good point, with this we can now remove that forced sync on a timer 
approach.


Does this look ok?

diff -r 9e64cf4881a1 external/bsd/ntp/dist/ntpd/ntp_timer.c
--- a/external/bsd/ntp/dist/ntpd/ntp_timer.cSat Jan 02 12:39:33 2021 +
+++ b/external/bsd/ntp/dist/ntpd/ntp_timer.cSat Jan 02 17:19:28 2021 +
@@ -423,9 +423,18 @@
/*
 * Interface update timer
 */
-   if (interface_interval && interface_timer <= current_time) {
-   timer_interfacetimeout(current_time +
-   interface_interval);
+   if (interface_timer && interface_timer <= current_time) {
+#ifdef SO_RERROR
+   /*
+* Because we can catch route(4) overflow, there is no
+* need to update interfaces every interface_interval.
+*/
+   interface_timer = 0;
+#else
+   if (interface_interval)
+   timer_interfacetimeout(current_time +
+   interface_interval);
+#endif
DPRINTF(2, ("timer: interface update\n"));
interface_update(NULL, NULL);
}

We should try to keep the differences to the up-stream code as little as 
possible. Especially when the upstream code already handles the situation 
reasonably the is no need for additional code.


Agreed.
I already submitted the diff upstream, but will adjust it to remove the forced 
refresh.



Happy new year!


And the same to you!

Roy


Re: CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-02 Thread Frank Kardel

Hi Roy !

I doubt that the explicit draining is helpful here as it already happens

in the outer loop processing any routing socket input. All that is happening

in the routing messages processing path is to call 
timer_interfacetimeout(current_time + UPDATE_GRACE) and


this is robust for multiple calls.

Ignoring ENOBUFS was ok here due to the automatic periodic interface 
updates. calling timer_interfacetimeout(current_time + UPDATE_GRACE)


is also possible if you expect a single ENOBUFS within UPDATE_GRACE 
seconds. But there is no need o special case flushing the routing socket 
here. There is no functional improvement except for


save a few cycles in the overflow case.

Also the ntp_io system will periodically refresh it interface lists in 
time as it was explicitly designed to be robust against lost messages 
from the routing socket.


We should try to keep the differences to the up-stream code as little as 
possible. Especially when the upstream code already handles the 
situation reasonably the is no need for additional code.


Happy new year!

Frank


On 01/01/21 18:21, Roy Marples wrote:

cvs rdiff -u -r1.27 -r1.28 src/external/bsd/ntp/dist/ntpd/ntp_io.c




CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jan  1 17:21:47 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c

Log Message:
ntpd: In the event of route(4) overflow, update the interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/ntp/dist/ntpd/ntp_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.27 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.28
--- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.27	Mon May 25 20:47:25 2020
+++ src/external/bsd/ntp/dist/ntpd/ntp_io.c	Fri Jan  1 17:21:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_io.c,v 1.27 2020/05/25 20:47:25 christos Exp $	*/
+/*	$NetBSD: ntp_io.c,v 1.28 2021/01/01 17:21:47 roy Exp $	*/
 
 /*
  * ntp_io.c - input/output routines for ntpd.	The socket-opening code
@@ -4727,6 +4727,14 @@ process_routing_msgs(struct asyncio_read
 		if (errno == ENOBUFS) {
 			msyslog(LOG_ERR,
 "routing socket reports: %m");
+			/*
+			 * drain the routing socket as we need to update
+			 * the interfaces anyway
+			 */
+			do {
+cnt = read(reader->fd, buffer, sizeof(buffer));
+			} while (cnt != -1 || errno == ENOBUFS);
+			timer_interfacetimeout(current_time + UPDATE_GRACE);
 		} else {
 			msyslog(LOG_ERR,
 "routing socket reports: %m - disabling");
@@ -4837,6 +4845,9 @@ init_async_notifications()
 	struct sockaddr_nl sa;
 #else
 	int fd = socket(PF_ROUTE, SOCK_RAW, 0);
+#ifdef SO_RERROR
+	int on = 1;
+#endif
 #endif
 #ifdef RO_MSGFILTER
 	unsigned char msgfilter[] = {
@@ -4907,6 +4918,10 @@ init_async_notifications()
 	, sizeof(msgfilter)) == -1)
 		msyslog(LOG_ERR, "RO_MSGFILTER: %m");
 #endif
+#ifdef SO_RERROR
+	if (setsockopt(fd, SOL_SOCKET, SO_RERROR, , sizeof(on)) == -1)
+		msyslog(LOG_ERR, "SO_RERROR: %m");
+#endif
 	make_socket_nonblocking(fd);
 #if defined(HAVE_SIGNALED_IO)
 	init_socket_sig(fd);



CVS commit: src/external/bsd/ntp/dist/ntpd

2021-01-01 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Jan  1 17:21:47 UTC 2021

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c

Log Message:
ntpd: In the event of route(4) overflow, update the interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/ntp/dist/ntpd/ntp_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp

2020-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 18 15:20:13 UTC 2020

Modified Files:
src/external/bsd/ntp/bin: Makefile
src/external/bsd/ntp/bin/ntptrace: Makefile
src/external/bsd/ntp/lib: Makefile

Log Message:
include  where missing.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/bin/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ntp/bin/ntptrace/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ntp/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp

2020-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 18 15:20:13 UTC 2020

Modified Files:
src/external/bsd/ntp/bin: Makefile
src/external/bsd/ntp/bin/ntptrace: Makefile
src/external/bsd/ntp/lib: Makefile

Log Message:
include  where missing.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/bin/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ntp/bin/ntptrace/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ntp/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/bin/Makefile
diff -u src/external/bsd/ntp/bin/Makefile:1.4 src/external/bsd/ntp/bin/Makefile:1.5
--- src/external/bsd/ntp/bin/Makefile:1.4	Sun May 21 11:28:39 2017
+++ src/external/bsd/ntp/bin/Makefile	Sun Oct 18 11:20:13 2020
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.4 2017/05/21 15:28:39 riastradh Exp $
+#	$NetBSD: Makefile,v 1.5 2020/10/18 15:20:13 christos Exp $
+
+.include 
 
 SUBDIR= ntp-keygen ntpd ntpdate ntpdc ntpq ntptime ntptrace sntp 
 
 CPPFLAGS+=-DOPENSSL
 
-.include "Makefile.inc"
-
 .include 

Index: src/external/bsd/ntp/bin/ntptrace/Makefile
diff -u src/external/bsd/ntp/bin/ntptrace/Makefile:1.1 src/external/bsd/ntp/bin/ntptrace/Makefile:1.2
--- src/external/bsd/ntp/bin/ntptrace/Makefile:1.1	Sat Aug 28 11:42:45 2010
+++ src/external/bsd/ntp/bin/ntptrace/Makefile	Sun Oct 18 11:20:13 2020
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.1 2010/08/28 15:42:45 kardel Exp $
+#	$NetBSD: Makefile,v 1.2 2020/10/18 15:20:13 christos Exp $
+
+.include 
 
 MAN=	ntptrace.8
 BINDIR=	/usr/sbin

Index: src/external/bsd/ntp/lib/Makefile
diff -u src/external/bsd/ntp/lib/Makefile:1.1 src/external/bsd/ntp/lib/Makefile:1.2
--- src/external/bsd/ntp/lib/Makefile:1.1	Sun Dec 13 12:13:48 2009
+++ src/external/bsd/ntp/lib/Makefile	Sun Oct 18 11:20:13 2020
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.1 2009/12/13 17:13:48 kardel Exp $
+#	$NetBSD: Makefile,v 1.2 2020/10/18 15:20:13 christos Exp $
+
+.include 
 
 SUBDIR+= libntp libiscntp libopts libparse
 



CVS commit: src/external/bsd/ntp

2020-10-11 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Oct 11 07:07:32 UTC 2020

Modified Files:
src/external/bsd/ntp: Makefile.inc
src/external/bsd/ntp/bin/ntp-keygen: Makefile
src/external/bsd/ntp/bin/ntpd: Makefile
src/external/bsd/ntp/bin/ntpdc: Makefile
src/external/bsd/ntp/bin/ntpq: Makefile
src/external/bsd/ntp/bin/sntp: Makefile

Log Message:
Fix build; clean manpages only if they are generated automatically.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/bsd/ntp/Makefile.inc
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/bin/ntp-keygen/Makefile
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/ntp/bin/ntpd/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/bin/ntpdc/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/bin/ntpq/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/bin/sntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/Makefile.inc
diff -u src/external/bsd/ntp/Makefile.inc:1.20 src/external/bsd/ntp/Makefile.inc:1.21
--- src/external/bsd/ntp/Makefile.inc:1.20	Sat Oct 10 14:23:34 2020
+++ src/external/bsd/ntp/Makefile.inc	Sun Oct 11 07:07:31 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.20 2020/10/10 14:23:34 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.21 2020/10/11 07:07:31 rin Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=yes
@@ -90,8 +90,4 @@ COPTS.refclock_ulink.c+=	-Wno-error=impl
 
 .1sntpmdoc.1:
 	${TOOL_SED} -e 's/1sntpmdoc/1/g' < ${.IMPSRC} > ${.TARGET}
-
-
-CLEANFILES+=${MAN}
-
 .endif

Index: src/external/bsd/ntp/bin/ntp-keygen/Makefile
diff -u src/external/bsd/ntp/bin/ntp-keygen/Makefile:1.6 src/external/bsd/ntp/bin/ntp-keygen/Makefile:1.7
--- src/external/bsd/ntp/bin/ntp-keygen/Makefile:1.6	Fri Oct  4 09:47:28 2019
+++ src/external/bsd/ntp/bin/ntp-keygen/Makefile	Sun Oct 11 07:07:31 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2019/10/04 09:47:28 mrg Exp $
+#	$NetBSD: Makefile,v 1.7 2020/10/11 07:07:31 rin Exp $
 
 .include 
 
@@ -22,4 +22,6 @@ CPPFLAGS+=-I${IDIST}/include -I${IDIST}/
 
 COPTS.ntp-keygen.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :}
 
+CLEANFILES+=${MAN}
+
 .include 

Index: src/external/bsd/ntp/bin/ntpd/Makefile
diff -u src/external/bsd/ntp/bin/ntpd/Makefile:1.27 src/external/bsd/ntp/bin/ntpd/Makefile:1.28
--- src/external/bsd/ntp/bin/ntpd/Makefile:1.27	Sun Sep  6 07:20:26 2020
+++ src/external/bsd/ntp/bin/ntpd/Makefile	Sun Oct 11 07:07:31 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.27 2020/09/06 07:20:26 mrg Exp $
+#	$NetBSD: Makefile,v 1.28 2020/10/11 07:07:31 rin Exp $
 
 .include 
 
@@ -97,4 +97,6 @@ COPTS.refclock_leitch.c+=	${GCC_NO_FORMA
 COPTS.refclock_neoclock4x.c+=	${GCC_NO_FORMAT_TRUNCATION}
 COPTS.ntp_io.c+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}
 
+CLEANFILES+=${MAN}
+
 .include 

Index: src/external/bsd/ntp/bin/ntpdc/Makefile
diff -u src/external/bsd/ntp/bin/ntpdc/Makefile:1.6 src/external/bsd/ntp/bin/ntpdc/Makefile:1.7
--- src/external/bsd/ntp/bin/ntpdc/Makefile:1.6	Sat Dec 28 03:19:43 2013
+++ src/external/bsd/ntp/bin/ntpdc/Makefile	Sun Oct 11 07:07:31 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2013/12/28 03:19:43 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2020/10/11 07:07:31 rin Exp $
 
 .include 
 
@@ -22,4 +22,6 @@ CPPFLAGS+=-I${IDIST}/include -I${IDIST}/
 
 .PATH: ${DIST}
 
+CLEANFILES+=${MAN}
+
 .include 

Index: src/external/bsd/ntp/bin/ntpq/Makefile
diff -u src/external/bsd/ntp/bin/ntpq/Makefile:1.8 src/external/bsd/ntp/bin/ntpq/Makefile:1.9
--- src/external/bsd/ntp/bin/ntpq/Makefile:1.8	Sun Oct 13 07:28:07 2019
+++ src/external/bsd/ntp/bin/ntpq/Makefile	Sun Oct 11 07:07:31 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2019/10/13 07:28:07 mrg Exp $
+#	$NetBSD: Makefile,v 1.9 2020/10/11 07:07:31 rin Exp $
 
 .include 
 
@@ -23,4 +23,6 @@ CPPFLAGS+=-I${IDIST}/include -I${IDIST}/
 
 COPTS.ntpq.c+=	${GCC_NO_STRINGOP_TRUNCATION}
 
+CLEANFILES+=${MAN}
+
 .include 

Index: src/external/bsd/ntp/bin/sntp/Makefile
diff -u src/external/bsd/ntp/bin/sntp/Makefile:1.8 src/external/bsd/ntp/bin/sntp/Makefile:1.9
--- src/external/bsd/ntp/bin/sntp/Makefile:1.8	Sat Oct 10 14:23:05 2020
+++ src/external/bsd/ntp/bin/sntp/Makefile	Sun Oct 11 07:07:32 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2020/10/10 14:23:05 christos Exp $
+# $NetBSD: Makefile,v 1.9 2020/10/11 07:07:32 rin Exp $
 
 USE_FORT?= yes	# network client/server
 
@@ -35,4 +35,6 @@ DPADD+=	${LIBM} ${LIBEVENT}
 
 COPTS.utilities.c+=	${GCC_NO_FORMAT_TRUNCATION}
 
+CLEANFILES+=${MAN}
+
 .include 



CVS commit: src/external/bsd/ntp

2020-10-11 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Oct 11 07:07:32 UTC 2020

Modified Files:
src/external/bsd/ntp: Makefile.inc
src/external/bsd/ntp/bin/ntp-keygen: Makefile
src/external/bsd/ntp/bin/ntpd: Makefile
src/external/bsd/ntp/bin/ntpdc: Makefile
src/external/bsd/ntp/bin/ntpq: Makefile
src/external/bsd/ntp/bin/sntp: Makefile

Log Message:
Fix build; clean manpages only if they are generated automatically.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/bsd/ntp/Makefile.inc
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/bin/ntp-keygen/Makefile
cvs rdiff -u -r1.27 -r1.28 src/external/bsd/ntp/bin/ntpd/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/bin/ntpdc/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/bin/ntpq/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/bin/sntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/bin

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 14:25:21 UTC 2020

Removed Files:
src/external/bsd/ntp/bin/ntp-keygen: ntp-keygen.8
src/external/bsd/ntp/bin/ntpd: ntp.conf.5 ntp.keys.5 ntpd.8
src/external/bsd/ntp/bin/ntpdc: ntpdc.8
src/external/bsd/ntp/bin/ntpq: ntpq.8
src/external/bsd/ntp/bin/sntp: sntp.1

Log Message:
PR/55710: Kimmo Suominen: Delete manual pages so that they get copy from the
imported, already generated ones.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/external/bsd/ntp/bin/ntp-keygen/ntp-keygen.8
cvs rdiff -u -r1.1 -r0 src/external/bsd/ntp/bin/ntpd/ntp.conf.5
cvs rdiff -u -r1.2 -r0 src/external/bsd/ntp/bin/ntpd/ntp.keys.5 \
src/external/bsd/ntp/bin/ntpd/ntpd.8
cvs rdiff -u -r1.2 -r0 src/external/bsd/ntp/bin/ntpdc/ntpdc.8
cvs rdiff -u -r1.2 -r0 src/external/bsd/ntp/bin/ntpq/ntpq.8
cvs rdiff -u -r1.1 -r0 src/external/bsd/ntp/bin/sntp/sntp.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/bin

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 14:25:21 UTC 2020

Removed Files:
src/external/bsd/ntp/bin/ntp-keygen: ntp-keygen.8
src/external/bsd/ntp/bin/ntpd: ntp.conf.5 ntp.keys.5 ntpd.8
src/external/bsd/ntp/bin/ntpdc: ntpdc.8
src/external/bsd/ntp/bin/ntpq: ntpq.8
src/external/bsd/ntp/bin/sntp: sntp.1

Log Message:
PR/55710: Kimmo Suominen: Delete manual pages so that they get copy from the
imported, already generated ones.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/external/bsd/ntp/bin/ntp-keygen/ntp-keygen.8
cvs rdiff -u -r1.1 -r0 src/external/bsd/ntp/bin/ntpd/ntp.conf.5
cvs rdiff -u -r1.2 -r0 src/external/bsd/ntp/bin/ntpd/ntp.keys.5 \
src/external/bsd/ntp/bin/ntpd/ntpd.8
cvs rdiff -u -r1.2 -r0 src/external/bsd/ntp/bin/ntpdc/ntpdc.8
cvs rdiff -u -r1.2 -r0 src/external/bsd/ntp/bin/ntpq/ntpq.8
cvs rdiff -u -r1.1 -r0 src/external/bsd/ntp/bin/sntp/sntp.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 14:23:34 UTC 2020

Modified Files:
src/external/bsd/ntp: Makefile.inc

Log Message:
Add rules for manual pages builds, remove including Makefile.inc


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/bsd/ntp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/bin

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 14:23:48 UTC 2020

Modified Files:
src/external/bsd/ntp/bin: Makefile.inc

Log Message:
Use .PARSEDIR


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/bin/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/bin/Makefile.inc
diff -u src/external/bsd/ntp/bin/Makefile.inc:1.3 src/external/bsd/ntp/bin/Makefile.inc:1.4
--- src/external/bsd/ntp/bin/Makefile.inc:1.3	Sat Dec  4 18:08:33 2010
+++ src/external/bsd/ntp/bin/Makefile.inc	Sat Oct 10 10:23:48 2020
@@ -1,3 +1,3 @@
-#	$NetBSD: Makefile.inc,v 1.3 2010/12/04 23:08:33 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2020/10/10 14:23:48 christos Exp $
 
-.include "../Makefile.inc"
+.include "${.PARSEDIR}/../Makefile.inc"



CVS commit: src/external/bsd/ntp

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 14:23:34 UTC 2020

Modified Files:
src/external/bsd/ntp: Makefile.inc

Log Message:
Add rules for manual pages builds, remove including Makefile.inc


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/bsd/ntp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/Makefile.inc
diff -u src/external/bsd/ntp/Makefile.inc:1.19 src/external/bsd/ntp/Makefile.inc:1.20
--- src/external/bsd/ntp/Makefile.inc:1.19	Sun Sep 29 19:44:59 2019
+++ src/external/bsd/ntp/Makefile.inc	Sat Oct 10 10:23:34 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.19 2019/09/29 23:44:59 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.20 2020/10/10 14:23:34 christos Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=yes
@@ -12,9 +12,6 @@ CWARNFLAGS.clang+=	-Wno-unneeded-interna
 
 WARNS?=	4
 
-
-.include 
-
 IDIST=		${NETBSDSRCDIR}/external/bsd/ntp/dist
 NTP_SRCDIR=	${NETBSDSRCDIR}/external/bsd/ntp
 NTP_HTMLDIR=	/usr/share/doc/reference/ref8
@@ -74,4 +71,27 @@ COPTS.ntp_loopfilter.c+=	-Wno-error=impl
 COPTS.refclock_ulink.c+=	-Wno-error=implicit-fallthrough
 .endif
 
+.SUFFIXES: .1 .5 .8 .1ntpdmdoc .5mdoc .1ntp-keygenmdoc .1ntpdcmdoc .1ntpqmdoc .1sntpmdoc
+
+.5mdoc.5:
+	${TOOL_SED} -e 's/5mdoc/5/g' < ${.IMPSRC} > ${.TARGET}
+
+.1ntpdmdoc.8:
+	${TOOL_SED} -e 's/1ntpdmdoc/8/g' < ${.IMPSRC} > ${.TARGET}
+
+.1ntp-keygenmdoc.8:
+	${TOOL_SED} -e 's/1ntp-keygenmdoc/8/g' < ${.IMPSRC} > ${.TARGET}
+
+.1ntpdcmdoc.8:
+	${TOOL_SED} -e 's/1ntpdcmdoc/8/g' < ${.IMPSRC} > ${.TARGET}
+
+.1ntpqmdoc.8:
+	${TOOL_SED} -e 's/1ntpqmdoc/8/g' < ${.IMPSRC} > ${.TARGET}
+
+.1sntpmdoc.1:
+	${TOOL_SED} -e 's/1sntpmdoc/1/g' < ${.IMPSRC} > ${.TARGET}
+
+
+CLEANFILES+=${MAN}
+
 .endif



CVS commit: src/external/bsd/ntp/bin

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 14:23:48 UTC 2020

Modified Files:
src/external/bsd/ntp/bin: Makefile.inc

Log Message:
Use .PARSEDIR


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/bin/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/bin/sntp

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 14:23:05 UTC 2020

Modified Files:
src/external/bsd/ntp/bin/sntp: Makefile

Log Message:
include bsd.own.mk so that ../../Makefile.inc does not do it...


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/bin/sntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/bin/sntp

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 14:23:05 UTC 2020

Modified Files:
src/external/bsd/ntp/bin/sntp: Makefile

Log Message:
include bsd.own.mk so that ../../Makefile.inc does not do it...


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/bin/sntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/bin/sntp/Makefile
diff -u src/external/bsd/ntp/bin/sntp/Makefile:1.7 src/external/bsd/ntp/bin/sntp/Makefile:1.8
--- src/external/bsd/ntp/bin/sntp/Makefile:1.7	Sun Oct 13 03:28:07 2019
+++ src/external/bsd/ntp/bin/sntp/Makefile	Sat Oct 10 10:23:05 2020
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:07 mrg Exp $
+# $NetBSD: Makefile,v 1.8 2020/10/10 14:23:05 christos Exp $
 
 USE_FORT?= yes	# network client/server
 
+.include 
+
 PROG=	sntp
 MAN=	sntp.1
 SRCS= \



CVS commit: src/external/bsd/ntp/dist/libntp

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 13:41:14 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/libntp: work_fork.c

Log Message:
Wait for the asynchronous dns resolver child to be done (and close the
socket descriptors) before returning. Otherwise we might get bind errors.
Reported by kim@, fixed by mlelstv@.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/libntp/work_fork.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/libntp

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 13:41:14 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/libntp: work_fork.c

Log Message:
Wait for the asynchronous dns resolver child to be done (and close the
socket descriptors) before returning. Otherwise we might get bind errors.
Reported by kim@, fixed by mlelstv@.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/ntp/dist/libntp/work_fork.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/libntp/work_fork.c
diff -u src/external/bsd/ntp/dist/libntp/work_fork.c:1.14 src/external/bsd/ntp/dist/libntp/work_fork.c:1.15
--- src/external/bsd/ntp/dist/libntp/work_fork.c:1.14	Mon May 25 16:47:24 2020
+++ src/external/bsd/ntp/dist/libntp/work_fork.c	Sat Oct 10 09:41:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: work_fork.c,v 1.14 2020/05/25 20:47:24 christos Exp $	*/
+/*	$NetBSD: work_fork.c,v 1.15 2020/10/10 13:41:14 christos Exp $	*/
 
 /*
  * work_fork.c - fork implementation for blocking worker child.
@@ -559,6 +559,9 @@ fork_blocking_child(
 		/* wire into I/O loop */
 		(*addremove_io_fd)(c->resp_read_pipe, is_pipe, FALSE);
 
+		/* wait until child is done */
+		rc = netread(c->resp_read_pipe, , sizeof(rc));
+
 		return;		/* parent returns */
 	}
 
@@ -585,6 +588,10 @@ fork_blocking_child(
 	c->resp_write_pipe = blocking_pipes[3];
 
 	kill_asyncio(0);
+
+	/* Tell parent we are ready */
+	rc = netwrite(c->resp_write_pipe, , sizeof(rc));
+
 	closelog();
 	if (syslog_file != NULL) {
 		fclose(syslog_file);



CVS commit: src/external/bsd/ntp/dist/lib/isc

2020-09-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Sep  7 00:48:45 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/lib/isc: assertions.c

Log Message:
avoid calling printf %s with NULL.  fix idea from christos.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/lib/isc/assertions.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/lib/isc

2020-09-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Sep  7 00:48:45 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/lib/isc: assertions.c

Log Message:
avoid calling printf %s with NULL.  fix idea from christos.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/lib/isc/assertions.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/lib/isc/assertions.c
diff -u src/external/bsd/ntp/dist/lib/isc/assertions.c:1.6 src/external/bsd/ntp/dist/lib/isc/assertions.c:1.7
--- src/external/bsd/ntp/dist/lib/isc/assertions.c:1.6	Mon May 25 20:47:20 2020
+++ src/external/bsd/ntp/dist/lib/isc/assertions.c	Mon Sep  7 00:48:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: assertions.c,v 1.6 2020/05/25 20:47:20 christos Exp $	*/
+/*	$NetBSD: assertions.c,v 1.7 2020/09/07 00:48:45 mrg Exp $	*/
 
 /*
  * Copyright (C) 2004, 2005, 2007-2009  Internet Systems Consortium, Inc. ("ISC")
@@ -94,7 +94,7 @@ isc_assertion_typetotext(isc_assertionty
 		result = "INVARIANT";
 		break;
 	default:
-		result = NULL;
+		result = "*invalid*";
 	}
 	return (result);
 }



CVS commit: src/external/bsd/ntp/dist/ntpd

2020-09-03 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Thu Sep  3 07:26:41 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/ntpd: refclock_parse.c

Log Message:
remove unneeded newline in quotes variable string - keeps ntpq happy


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/ntp/dist/ntpd/refclock_parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/refclock_parse.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_parse.c:1.22 src/external/bsd/ntp/dist/ntpd/refclock_parse.c:1.23
--- src/external/bsd/ntp/dist/ntpd/refclock_parse.c:1.22	Mon May 25 20:47:25 2020
+++ src/external/bsd/ntp/dist/ntpd/refclock_parse.c	Thu Sep  3 07:26:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_parse.c,v 1.22 2020/05/25 20:47:25 christos Exp $	*/
+/*	$NetBSD: refclock_parse.c,v 1.23 2020/09/03 07:26:41 kardel Exp $	*/
 
 /*
  * /src/NTP/REPOSITORY/ntp4-dev/ntpd/refclock_parse.c,v 4.81 2009/05/01 10:15:29 kardel RELEASE_20090105_A
@@ -4287,7 +4287,7 @@ mk_utcinfo(
 	}
 	else
 	{
-		snprintf( t, size, "UTC offset parameter: %is, no leap second announced.\n", dtls );
+		snprintf( t, size, "UTC offset parameter: %is, no leap second announced.", dtls );
 	}
 
 }



CVS commit: src/external/bsd/ntp/dist/ntpd

2020-09-03 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Thu Sep  3 07:26:41 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/ntpd: refclock_parse.c

Log Message:
remove unneeded newline in quotes variable string - keeps ntpq happy


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/ntp/dist/ntpd/refclock_parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist

2020-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat May 30 23:52:10 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/include: ntp_config.h
src/external/bsd/ntp/dist/ntpd: ntp_config.c

Log Message:
Don't define psl as common symbol, move it into the only file using it.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/ntp/dist/include/ntp_config.h
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/ntp/dist/ntpd/ntp_config.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/include/ntp_config.h
diff -u src/external/bsd/ntp/dist/include/ntp_config.h:1.12 src/external/bsd/ntp/dist/include/ntp_config.h:1.13
--- src/external/bsd/ntp/dist/include/ntp_config.h:1.12	Mon May 25 20:47:19 2020
+++ src/external/bsd/ntp/dist/include/ntp_config.h	Sat May 30 23:52:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_config.h,v 1.12 2020/05/25 20:47:19 christos Exp $	*/
+/*	$NetBSD: ntp_config.h,v 1.13 2020/05/30 23:52:09 joerg Exp $	*/
 
 #ifndef NTP_CONFIG_H
 #define NTP_CONFIG_H
@@ -277,17 +277,6 @@ typedef struct settrap_parms_tag {
 	int		ifaddr_nonnull;
 } settrap_parms;
 
-
-/*
- * Poll Skew List
- */
-
-psl_item psl[17-3+1];		/* values for polls 3-17 */
-/* To simplify the runtime code we */
-/* don't want to have to special-case */
-/* dealing with a default */
-
-
 /*
 ** Data Minimization Items
 */

Index: src/external/bsd/ntp/dist/ntpd/ntp_config.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.23 src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.24
--- src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.23	Wed May 27 23:52:19 2020
+++ src/external/bsd/ntp/dist/ntpd/ntp_config.c	Sat May 30 23:52:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_config.c,v 1.23 2020/05/27 23:52:19 christos Exp $	*/
+/*	$NetBSD: ntp_config.c,v 1.24 2020/05/30 23:52:09 joerg Exp $	*/
 
 /* ntp_config.c
  *
@@ -69,6 +69,16 @@ extern int yyparse(void);
 # include 
 #endif
 
+/*
+ * Poll Skew List
+ */
+
+static psl_item psl[17-3+1];	/* values for polls 3-17 */
+/* To simplify the runtime code we */
+/* don't want to have to special-case */
+/* dealing with a default */
+
+
 /* list of servers from command line for config_peers() */
 int	cmdline_server_count;
 char **	cmdline_servers;



CVS commit: src/external/bsd/ntp/dist

2020-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat May 30 23:52:10 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/include: ntp_config.h
src/external/bsd/ntp/dist/ntpd: ntp_config.c

Log Message:
Don't define psl as common symbol, move it into the only file using it.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/ntp/dist/include/ntp_config.h
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/ntp/dist/ntpd/ntp_config.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/include

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:56:27 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/include: ntp_refclock.h

Log Message:
make it compile again


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/dist/include/ntp_refclock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/include/ntp_refclock.h
diff -u src/external/bsd/ntp/dist/include/ntp_refclock.h:1.7 src/external/bsd/ntp/dist/include/ntp_refclock.h:1.8
--- src/external/bsd/ntp/dist/include/ntp_refclock.h:1.7	Fri May 29 16:54:16 2020
+++ src/external/bsd/ntp/dist/include/ntp_refclock.h	Fri May 29 16:56:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_refclock.h,v 1.7 2020/05/29 20:54:16 christos Exp $	*/
+/*	$NetBSD: ntp_refclock.h,v 1.8 2020/05/29 20:56:27 christos Exp $	*/
 
 /*
  * ntp_refclock.h - definitions for reference clock support
@@ -13,6 +13,7 @@
 
 #include "ntp_types.h"
 #include "ntp_tty.h"
+#include "ntp_stdlib.h"
 #include "recvbuff.h"
 
 
@@ -246,7 +247,7 @@ extern	void	refclock_format_lcode(
 			struct refclockproc *, char const *, ...)
 			NTP_PRINTF(2, 3);
 extern	void	refclock_vformat_lcode(
-			struct refclockproc *, char const *, va_list);
+			struct refclockproc *, char const *, va_list)
 			NTP_PRINTF(2, 0);
    
 struct refclock_atom;



CVS commit: src/external/bsd/ntp/dist/include

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:56:27 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/include: ntp_refclock.h

Log Message:
make it compile again


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/dist/include/ntp_refclock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/include

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:54:16 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/include: ntp_refclock.h

Log Message:
Add more printf annotations


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/include/ntp_refclock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/include

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:54:16 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/include: ntp_refclock.h

Log Message:
Add more printf annotations


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/include/ntp_refclock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/include/ntp_refclock.h
diff -u src/external/bsd/ntp/dist/include/ntp_refclock.h:1.6 src/external/bsd/ntp/dist/include/ntp_refclock.h:1.7
--- src/external/bsd/ntp/dist/include/ntp_refclock.h:1.6	Mon May 25 16:47:19 2020
+++ src/external/bsd/ntp/dist/include/ntp_refclock.h	Fri May 29 16:54:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_refclock.h,v 1.6 2020/05/25 20:47:19 christos Exp $	*/
+/*	$NetBSD: ntp_refclock.h,v 1.7 2020/05/29 20:54:16 christos Exp $	*/
 
 /*
  * ntp_refclock.h - definitions for reference clock support
@@ -243,9 +243,11 @@ extern	void	refclock_save_lcode(
 			struct refclockproc *, char const *, size_t);
 /* format data into la_code */
 extern	void	refclock_format_lcode(
-			struct refclockproc *, char const *, ...);
+			struct refclockproc *, char const *, ...)
+			NTP_PRINTF(2, 3);
 extern	void	refclock_vformat_lcode(
 			struct refclockproc *, char const *, va_list);
+			NTP_PRINTF(2, 0);
    
 struct refclock_atom;
 extern int	refclock_ppsaugment(



CVS commit: src/external/bsd/ntp/lib/libntp

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:16:08 UTC 2020

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
put back the warn flags


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.23 src/external/bsd/ntp/lib/libntp/Makefile:1.24
--- src/external/bsd/ntp/lib/libntp/Makefile:1.23	Fri May 29 06:47:37 2020
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri May 29 16:16:07 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.23 2020/05/29 10:47:37 kamil Exp $
+#	$NetBSD: Makefile,v 1.24 2020/05/29 20:16:07 christos Exp $
 
 LIBISPRIVATE=yes
 
@@ -85,10 +85,6 @@ ymd2yd.c
 
 CPPFLAGS+= -I${IDIST}/sntp/libopts
 
-COPTS.msyslog.c+=	-Wno-error=format-nonliteral
-
-CWARNFLAGS.clang+=	-Wno-error=implicit-int-float-conversion
-
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 # Instead, use the date and time from ${IMPORTDATE_FILE}.
 #



CVS commit: src/external/bsd/ntp/lib/libntp

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:16:08 UTC 2020

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
put back the warn flags


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/libntp

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:15:14 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/libntp: timexsup.c

Log Message:
Add explicit casts


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/libntp/timexsup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/libntp/timexsup.c
diff -u src/external/bsd/ntp/dist/libntp/timexsup.c:1.2 src/external/bsd/ntp/dist/libntp/timexsup.c:1.3
--- src/external/bsd/ntp/dist/libntp/timexsup.c:1.2	Mon May 25 16:47:24 2020
+++ src/external/bsd/ntp/dist/libntp/timexsup.c	Fri May 29 16:15:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: timexsup.c,v 1.2 2020/05/25 20:47:24 christos Exp $	*/
+/*	$NetBSD: timexsup.c,v 1.3 2020/05/29 20:15:14 christos Exp $	*/
 
 /*
  * timexsup.c - 'struct timex' support functions
@@ -30,9 +30,9 @@ clamp_rounded(
 	dval = floor(dval + 0.5);
 
 	/* clamp / saturate */
-	if (dval >= LONG_MAX)
+	if (dval >= (double)LONG_MAX)
 		return LONG_MAX;
-	if (dval <= LONG_MIN)
+	if (dval <= (double)LONG_MIN)
 		return LONG_MIN;
 	return (long)dval;
 	



CVS commit: src/external/bsd/ntp/dist

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:15:38 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/include: ntp_stdlib.h
src/external/bsd/ntp/dist/libntp: msyslog.c

Log Message:
fix printf format warning with format_arg


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/dist/include/ntp_stdlib.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/libntp/msyslog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:15:38 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/include: ntp_stdlib.h
src/external/bsd/ntp/dist/libntp: msyslog.c

Log Message:
fix printf format warning with format_arg


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/dist/include/ntp_stdlib.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/libntp/msyslog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/include/ntp_stdlib.h
diff -u src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.16 src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.17
--- src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.16	Mon May 25 16:47:20 2020
+++ src/external/bsd/ntp/dist/include/ntp_stdlib.h	Fri May 29 16:15:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_stdlib.h,v 1.16 2020/05/25 20:47:20 christos Exp $	*/
+/*	$NetBSD: ntp_stdlib.h,v 1.17 2020/05/29 20:15:37 christos Exp $	*/
 
 /*
  * ntp_stdlib.h - Prototypes for NTP lib.
@@ -23,9 +23,11 @@
 #ifdef __GNUC__
 #define NTP_PRINTF(fmt, args) __attribute__((__format__(__printf__, fmt, args)))
 #define NTP_SYSLOG(fmt, args) __attribute__((__format__(__syslog__, fmt, args)))
+#define NTP_FORMAT_ARG(args) __attribute__((__format_arg__(args)))
 #else
 #define NTP_PRINTF(fmt, args)
 #define NTP_SYSLOG(fmt, args)
+#define NTP_FORMAT_ARG(args)
 #endif
 
 extern	int	mprintf(const char *, ...) NTP_SYSLOG(1, 2);

Index: src/external/bsd/ntp/dist/libntp/msyslog.c
diff -u src/external/bsd/ntp/dist/libntp/msyslog.c:1.6 src/external/bsd/ntp/dist/libntp/msyslog.c:1.7
--- src/external/bsd/ntp/dist/libntp/msyslog.c:1.6	Mon May 25 16:47:24 2020
+++ src/external/bsd/ntp/dist/libntp/msyslog.c	Fri May 29 16:15:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msyslog.c,v 1.6 2020/05/25 20:47:24 christos Exp $	*/
+/*	$NetBSD: msyslog.c,v 1.7 2020/05/29 20:15:38 christos Exp $	*/
 
 /*
  * msyslog - either send a message to the terminal or print it on
@@ -44,11 +44,14 @@ extern char const * progname;
 
 /* Declare the local functions */
 void	addto_syslog	(int, const char *);
-#ifndef VSNPRINTF_PERCENT_M
-void	format_errmsg	(char *, size_t, const char *, int);
+#ifdef VSNPRINTF_PERCENT_M
+#define format_errmsg(buf, len, fmt, error) (fmt)
+#else
+static const char *format_errmsg(char *, size_t, const char *, int)
+NTP_FORMAT_ARG(3);
 
 /* format_errmsg() is under #ifndef VSNPRINTF_PERCENT_M above */
-void
+static const char *
 format_errmsg(
 	char *		nfmt,
 	size_t		lennfmt,
@@ -86,6 +89,7 @@ format_errmsg(
 		}
 	}
 	*n = '\0';
+	return nfmt;
 }
 #endif	/* VSNPRINTF_PERCENT_M */
 
@@ -233,9 +237,7 @@ mvsnprintf(
 	)
 {
 #ifndef VSNPRINTF_PERCENT_M
-	char		nfmt[256];
-#else
-	const char *	nfmt = fmt;
+	char		fmtbuf[256];
 #endif
 	int		errval;
 
@@ -248,12 +250,11 @@ mvsnprintf(
 #endif /* SYS_WINNT */
 		errval = errno;
 
-#ifndef VSNPRINTF_PERCENT_M
-	format_errmsg(nfmt, sizeof(nfmt), fmt, errval);
-#else
+#ifdef VSNPRINTF_PERCENT_M
 	errno = errval;
 #endif
-	return vsnprintf(buf, bufsiz, nfmt, ap);
+	return vsnprintf(buf, bufsiz,
+	format_errmsg(fmtbuf, sizeof(fmtbuf), fmt, errval), ap);
 }
 
 
@@ -265,9 +266,7 @@ mvfprintf(
 	)
 {
 #ifndef VSNPRINTF_PERCENT_M
-	char		nfmt[256];
-#else
-	const char *	nfmt = fmt;
+	char		fmtbuf[256];
 #endif
 	int		errval;
 
@@ -280,12 +279,11 @@ mvfprintf(
 #endif /* SYS_WINNT */
 		errval = errno;
 
-#ifndef VSNPRINTF_PERCENT_M
-	format_errmsg(nfmt, sizeof(nfmt), fmt, errval);
-#else
+#ifdef VSNPRINTF_PERCENT_M
 	errno = errval;
 #endif
-	return vfprintf(fp, nfmt, ap);
+	return vfprintf(fp, 
+	format_errmsg(fmtbuf, sizeof(fmtbuf), fmt, errval), ap);
 }
 
 



CVS commit: src/external/bsd/ntp/dist/libntp

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 20:15:14 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/libntp: timexsup.c

Log Message:
Add explicit casts


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/libntp/timexsup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/external/bsd/ntp/bin/ntpd

2020-05-29 Thread Kamil Rytarowski
On 29.05.2020 16:15, Tobias Nygren wrote:
> On Fri, 29 May 2020 16:08:30 +0200
> Joerg Sonnenberger  wrote:
> 
>> On Fri, May 29, 2020 at 10:53:02AM +, Kamil Rytarowski wrote:
>>> Module Name:src
>>> Committed By:   kamil
>>> Date:   Fri May 29 10:53:02 UTC 2020
>>>
>>> Modified Files:
>>> src/external/bsd/ntp/bin/ntpd: Makefile
>>>
>>> Log Message:
>>> Fix the ntpd build with Clang/LLVM
>>>
>>> Set -Wno-format-nonliteral for ntp_refclock.c
>>
>> Please fix this properly by adding the appropiate format string
>> annotation.
> 
> I have these in my local tree. Can't reach cvs.
> Feel free to commit them if appropriate.
> 

I will do it once the CVS server will be back.

> Index: external/bsd/ntp/dist/libntp/timexsup.c
> ===
> RCS file: /cvsroot/src/external/bsd/ntp/dist/libntp/timexsup.c,v
> retrieving revision 1.2
> diff -p -u -r1.2 timexsup.c
> --- external/bsd/ntp/dist/libntp/timexsup.c   25 May 2020 20:47:24 -  
> 1.2
> +++ external/bsd/ntp/dist/libntp/timexsup.c   29 May 2020 14:13:35 -
> @@ -30,8 +30,8 @@ clamp_rounded(
>   dval = floor(dval + 0.5);
>  
>   /* clamp / saturate */
> - if (dval >= LONG_MAX)
> - return LONG_MAX;
> + if (dval >= (double)LONG_MAX)
> + return (double)LONG_MAX;
>   if (dval <= LONG_MIN)
>   return LONG_MIN;
>   return (long)dval;
> Index: external/bsd/ntp/dist/ntpd/ntp_refclock.c
> ===
> RCS file: /cvsroot/src/external/bsd/ntp/dist/ntpd/ntp_refclock.c,v
> retrieving revision 1.13
> diff -p -u -r1.13 ntp_refclock.c
> --- external/bsd/ntp/dist/ntpd/ntp_refclock.c 25 May 2020 20:47:25 -  
> 1.13
> +++ external/bsd/ntp/dist/ntpd/ntp_refclock.c 29 May 2020 14:13:37 -
> @@ -1737,7 +1737,7 @@ refclock_save_lcode(
>  }
>  
>  /* format data into a_lastcode */
> -void
> +void __printflike(2, 0)
>  refclock_vformat_lcode(
>   struct refclockproc *   pp,
>   char const *fmt,
> @@ -1757,7 +1757,7 @@ refclock_vformat_lcode(
>   /* !note! the NUL byte is needed in case vsnprintf() really fails */
>  }
>  
> -void
> +void __printflike(2, 0)
>  refclock_format_lcode(
>   struct refclockproc *   pp,
>   char const *fmt,
> 




signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/external/bsd/ntp/bin/ntpd

2020-05-29 Thread Tobias Nygren
On Fri, 29 May 2020 16:08:30 +0200
Joerg Sonnenberger  wrote:

> On Fri, May 29, 2020 at 10:53:02AM +, Kamil Rytarowski wrote:
> > Module Name:src
> > Committed By:   kamil
> > Date:   Fri May 29 10:53:02 UTC 2020
> > 
> > Modified Files:
> > src/external/bsd/ntp/bin/ntpd: Makefile
> > 
> > Log Message:
> > Fix the ntpd build with Clang/LLVM
> > 
> > Set -Wno-format-nonliteral for ntp_refclock.c
> 
> Please fix this properly by adding the appropiate format string
> annotation.

I have these in my local tree. Can't reach cvs.
Feel free to commit them if appropriate.

Index: external/bsd/ntp/dist/libntp/timexsup.c
===
RCS file: /cvsroot/src/external/bsd/ntp/dist/libntp/timexsup.c,v
retrieving revision 1.2
diff -p -u -r1.2 timexsup.c
--- external/bsd/ntp/dist/libntp/timexsup.c 25 May 2020 20:47:24 -  
1.2
+++ external/bsd/ntp/dist/libntp/timexsup.c 29 May 2020 14:13:35 -
@@ -30,8 +30,8 @@ clamp_rounded(
dval = floor(dval + 0.5);
 
/* clamp / saturate */
-   if (dval >= LONG_MAX)
-   return LONG_MAX;
+   if (dval >= (double)LONG_MAX)
+   return (double)LONG_MAX;
if (dval <= LONG_MIN)
return LONG_MIN;
return (long)dval;
Index: external/bsd/ntp/dist/ntpd/ntp_refclock.c
===
RCS file: /cvsroot/src/external/bsd/ntp/dist/ntpd/ntp_refclock.c,v
retrieving revision 1.13
diff -p -u -r1.13 ntp_refclock.c
--- external/bsd/ntp/dist/ntpd/ntp_refclock.c   25 May 2020 20:47:25 -  
1.13
+++ external/bsd/ntp/dist/ntpd/ntp_refclock.c   29 May 2020 14:13:37 -
@@ -1737,7 +1737,7 @@ refclock_save_lcode(
 }
 
 /* format data into a_lastcode */
-void
+void __printflike(2, 0)
 refclock_vformat_lcode(
struct refclockproc *   pp,
char const *fmt,
@@ -1757,7 +1757,7 @@ refclock_vformat_lcode(
/* !note! the NUL byte is needed in case vsnprintf() really fails */
 }
 
-void
+void __printflike(2, 0)
 refclock_format_lcode(
struct refclockproc *   pp,
char const *fmt,


Re: CVS commit: src/external/bsd/ntp/bin/ntpd

2020-05-29 Thread Joerg Sonnenberger
On Fri, May 29, 2020 at 10:53:02AM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Fri May 29 10:53:02 UTC 2020
> 
> Modified Files:
>   src/external/bsd/ntp/bin/ntpd: Makefile
> 
> Log Message:
> Fix the ntpd build with Clang/LLVM
> 
> Set -Wno-format-nonliteral for ntp_refclock.c

Please fix this properly by adding the appropiate format string
annotation.

Joerg


CVS commit: src/external/bsd/ntp/include

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 11:01:53 UTC 2020

Modified Files:
src/external/bsd/ntp/include: config.h

Log Message:
fix WORDS_BIGENDIAN


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/external/bsd/ntp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/include/config.h
diff -u src/external/bsd/ntp/include/config.h:1.25 src/external/bsd/ntp/include/config.h:1.26
--- src/external/bsd/ntp/include/config.h:1.25	Fri May 29 06:50:36 2020
+++ src/external/bsd/ntp/include/config.h	Fri May 29 07:01:53 2020
@@ -1687,6 +1687,7 @@ typedef unsigned int	uintptr_t;
 #endif
 
 #ifndef __NetBSD__
+
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
 #if defined AC_APPLE_UNIVERSAL_BUILD
@@ -1698,6 +1699,12 @@ typedef unsigned int	uintptr_t;
 /* #  undef WORDS_BIGENDIAN */
 # endif
 #endif
+
+#else /* __NetBSD */
+# include 
+# if _BYTE_ORDER == _BIG_ENDIAN
+#  define WORDS_BIGENDIAN 1
+# endif
 #endif
 
 /* routine worker child proc uses to exit. */



CVS commit: src/external/bsd/ntp/include

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 11:01:53 UTC 2020

Modified Files:
src/external/bsd/ntp/include: config.h

Log Message:
fix WORDS_BIGENDIAN


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/external/bsd/ntp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/bin/ntpd

2020-05-29 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri May 29 10:53:02 UTC 2020

Modified Files:
src/external/bsd/ntp/bin/ntpd: Makefile

Log Message:
Fix the ntpd build with Clang/LLVM

Set -Wno-format-nonliteral for ntp_refclock.c


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/external/bsd/ntp/bin/ntpd/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/bin/ntpd/Makefile
diff -u src/external/bsd/ntp/bin/ntpd/Makefile:1.25 src/external/bsd/ntp/bin/ntpd/Makefile:1.26
--- src/external/bsd/ntp/bin/ntpd/Makefile:1.25	Sat Feb  8 13:20:10 2020
+++ src/external/bsd/ntp/bin/ntpd/Makefile	Fri May 29 10:53:02 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.25 2020/02/08 13:20:10 fox Exp $
+#	$NetBSD: Makefile,v 1.26 2020/05/29 10:53:02 kamil Exp $
 
 .include 
 
@@ -78,7 +78,7 @@ LDADD+=		-L${LIBPARSE} -lparse -L${LIBIS
 DPADD+=		${LIBPARSE}/libparse.a ${LIBISC}/libiscntp.a ${LIBOPTS}/libopts.a  ${LIBNTP}/libntp.a ${LIBM} ${LIBUTIL}
 
 COPTS.ntp_control.c+=	${${ACTIVE_CC} == "gcc":? -Wno-format-nonliteral :}
-
+COPTS.ntp_refclock.c+=	-Wno-format-nonliteral
 
 DIST=${IDIST}/ntpd
 



CVS commit: src/external/bsd/ntp/bin/ntpd

2020-05-29 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri May 29 10:53:02 UTC 2020

Modified Files:
src/external/bsd/ntp/bin/ntpd: Makefile

Log Message:
Fix the ntpd build with Clang/LLVM

Set -Wno-format-nonliteral for ntp_refclock.c


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/external/bsd/ntp/bin/ntpd/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/include

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 10:50:36 UTC 2020

Modified Files:
src/external/bsd/ntp/include: config.h

Log Message:
Fix incorrect merge.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/ntp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/include

2020-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 29 10:50:36 UTC 2020

Modified Files:
src/external/bsd/ntp/include: config.h

Log Message:
Fix incorrect merge.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/ntp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/include/config.h
diff -u src/external/bsd/ntp/include/config.h:1.24 src/external/bsd/ntp/include/config.h:1.25
--- src/external/bsd/ntp/include/config.h:1.24	Mon May 25 16:47:37 2020
+++ src/external/bsd/ntp/include/config.h	Fri May 29 06:50:36 2020
@@ -1560,7 +1560,11 @@
 #define SIZEOF_LONG_LONG 8
 
 /* The size of `pthread_t', as computed by sizeof. */
+#ifdef _LP64
 #define SIZEOF_PTHREAD_T 8
+#else
+#define SIZEOF_PTHREAD_T 4
+#endif
 
 /* The size of `short', as computed by sizeof. */
 #define SIZEOF_SHORT 2



CVS commit: src/external/bsd/ntp/lib/libntp

2020-05-29 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri May 29 10:47:37 UTC 2020

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Fix the libntp build with Clang/LLVM

Set -Wno-error=implicit-int-float-conversion


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.22 src/external/bsd/ntp/lib/libntp/Makefile:1.23
--- src/external/bsd/ntp/lib/libntp/Makefile:1.22	Mon May 25 20:47:37 2020
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri May 29 10:47:37 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2020/05/25 20:47:37 christos Exp $
+#	$NetBSD: Makefile,v 1.23 2020/05/29 10:47:37 kamil Exp $
 
 LIBISPRIVATE=yes
 
@@ -87,6 +87,8 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 
 COPTS.msyslog.c+=	-Wno-error=format-nonliteral
 
+CWARNFLAGS.clang+=	-Wno-error=implicit-int-float-conversion
+
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 # Instead, use the date and time from ${IMPORTDATE_FILE}.
 #



CVS commit: src/external/bsd/ntp/lib/libntp

2020-05-29 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri May 29 10:47:37 UTC 2020

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Fix the libntp build with Clang/LLVM

Set -Wno-error=implicit-int-float-conversion


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/ntp/lib/libntp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist

2020-05-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 27 23:52:20 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_config.c refclock_neoclock4x.c
src/external/bsd/ntp/dist/ntpq: ntpq.c
src/external/bsd/ntp/dist/util: ntp-keygen.c

Log Message:
Adjustments to our patches requested by upstream


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/ntp/dist/ntpd/ntp_config.c
cvs rdiff -u -r1.11 -r1.12 \
src/external/bsd/ntp/dist/ntpd/refclock_neoclock4x.c
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/ntp/dist/ntpq/ntpq.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/util/ntp-keygen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_config.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.22 src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.23
--- src/external/bsd/ntp/dist/ntpd/ntp_config.c:1.22	Mon May 25 16:47:25 2020
+++ src/external/bsd/ntp/dist/ntpd/ntp_config.c	Wed May 27 19:52:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_config.c,v 1.22 2020/05/25 20:47:25 christos Exp $	*/
+/*	$NetBSD: ntp_config.c,v 1.23 2020/05/27 23:52:19 christos Exp $	*/
 
 /* ntp_config.c
  *
@@ -3892,7 +3892,7 @@ config_fudge(
 
 			case T_Refid:
 clock_stat.haveflags |= CLK_HAVEVAL2;
-/* strncpy() does exactly what we want here: */
+/* avoid using strncpy because gcc warns */
 len = strlen(curr_opt->value.s);
 if (len > sizeof(clock_stat.fudgeval2))
 	len = sizeof(clock_stat.fudgeval2);

Index: src/external/bsd/ntp/dist/ntpd/refclock_neoclock4x.c
diff -u src/external/bsd/ntp/dist/ntpd/refclock_neoclock4x.c:1.11 src/external/bsd/ntp/dist/ntpd/refclock_neoclock4x.c:1.12
--- src/external/bsd/ntp/dist/ntpd/refclock_neoclock4x.c:1.11	Mon May 25 16:47:25 2020
+++ src/external/bsd/ntp/dist/ntpd/refclock_neoclock4x.c	Wed May 27 19:52:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: refclock_neoclock4x.c,v 1.11 2020/05/25 20:47:25 christos Exp $	*/
+/*	$NetBSD: refclock_neoclock4x.c,v 1.12 2020/05/27 23:52:19 christos Exp $	*/
 
 /*
  *
@@ -727,6 +727,7 @@ neoclock4x_control(int unit,
   if(NULL != out)
 {
   char *tt;
+  /* the 199 here is almost 2x the max string */
   char tmpbuf[199];
 
   out->kv_list = (struct ctl_var *)0;
@@ -767,6 +768,7 @@ neoclock4x_control(int unit,
 snprintf(tt, 39, "dststatus=\"winter\"");
   else
 snprintf(tt, 39, "dststatus=\"unknown\"");
+  /* the 99 below is greater than 80 the max string */
   tt = add_var(>kv_list, 80, RO|DEF);
   snprintf(tt, 99, "firmware=\"%s\"", up->firmware);
   tt = add_var(>kv_list, 40, RO|DEF);

Index: src/external/bsd/ntp/dist/ntpq/ntpq.c
diff -u src/external/bsd/ntp/dist/ntpq/ntpq.c:1.21 src/external/bsd/ntp/dist/ntpq/ntpq.c:1.22
--- src/external/bsd/ntp/dist/ntpq/ntpq.c:1.21	Mon May 25 16:47:26 2020
+++ src/external/bsd/ntp/dist/ntpq/ntpq.c	Wed May 27 19:52:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntpq.c,v 1.21 2020/05/25 20:47:26 christos Exp $	*/
+/*	$NetBSD: ntpq.c,v 1.22 2020/05/27 23:52:19 christos Exp $	*/
 
 /*
  * ntpq - query an NTP server using mode 6 commands
@@ -3738,7 +3738,7 @@ cookedprint(
 		case SN:
 			if (!value)
 output_raw = '?';
-			else if (isdigit((unsigned char)*value)) {	/* number without sign */
+			else if (isdigit(*(const unsigned char *)value)) {	/* number without sign */
 bv[0] = '+';
 atoascii (value, MAXVALLEN, bv+1, sizeof(bv)-1);
 output(fp, name, bv);

Index: src/external/bsd/ntp/dist/util/ntp-keygen.c
diff -u src/external/bsd/ntp/dist/util/ntp-keygen.c:1.13 src/external/bsd/ntp/dist/util/ntp-keygen.c:1.14
--- src/external/bsd/ntp/dist/util/ntp-keygen.c:1.13	Mon May 25 16:47:37 2020
+++ src/external/bsd/ntp/dist/util/ntp-keygen.c	Wed May 27 19:52:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp-keygen.c,v 1.13 2020/05/25 20:47:37 christos Exp $	*/
+/*	$NetBSD: ntp-keygen.c,v 1.14 2020/05/27 23:52:20 christos Exp $	*/
 
 /*
  * Program to generate cryptographic keys for ntp clients and servers
@@ -281,7 +281,7 @@ followlink(
 
 	REQUIRE(bufsiz > 0);
 
-	len = readlink(fname, result, bufsiz);
+	len = readlink(fname, result, sizeof(result));
 	if (len < 0) {
 		fname[0] = '\0';
 		return;



CVS commit: src/external/bsd/ntp/dist

2020-05-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 27 23:52:20 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_config.c refclock_neoclock4x.c
src/external/bsd/ntp/dist/ntpq: ntpq.c
src/external/bsd/ntp/dist/util: ntp-keygen.c

Log Message:
Adjustments to our patches requested by upstream


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/ntp/dist/ntpd/ntp_config.c
cvs rdiff -u -r1.11 -r1.12 \
src/external/bsd/ntp/dist/ntpd/refclock_neoclock4x.c
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/ntp/dist/ntpq/ntpq.c
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/ntp/dist/util/ntp-keygen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist/sntp/libopts

2020-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 25 20:54:08 UTC 2020

Modified Files:
src/external/bsd/ntp/dist/sntp/libopts: boolean.c configfile.c

Log Message:
Add FALLTHROUGH


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/libopts/boolean.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/sntp/libopts/configfile.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/sntp/libopts/boolean.c
diff -u src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.5 src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.6
--- src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.5	Mon May 25 16:47:34 2020
+++ src/external/bsd/ntp/dist/sntp/libopts/boolean.c	Mon May 25 16:54:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: boolean.c,v 1.5 2020/05/25 20:47:34 christos Exp $	*/
+/*	$NetBSD: boolean.c,v 1.6 2020/05/25 20:54:07 christos Exp $	*/
 
 
 /**
@@ -66,8 +66,8 @@ optionBooleanVal(tOptions * opts, tOptDe
 long  val = strtol(od->optArg.argString, , 0);
 if ((val != 0) || (*pz != NUL))
 break;
-/* FALLTHROUGH */
 }
+/*FALLTHROUGH*/
 case 'N':
 case 'n':
 case 'F':

Index: src/external/bsd/ntp/dist/sntp/libopts/configfile.c
diff -u src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.9 src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.10
--- src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.9	Mon May 25 16:47:34 2020
+++ src/external/bsd/ntp/dist/sntp/libopts/configfile.c	Mon May 25 16:54:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: configfile.c,v 1.9 2020/05/25 20:47:34 christos Exp $	*/
+/*	$NetBSD: configfile.c,v 1.10 2020/05/25 20:54:07 christos Exp $	*/
 
 /**
  * \file configfile.c
@@ -468,7 +468,7 @@ file_preset(tOptions * opts, char const 
 ftext = strchr(ftext + 2, '>');
 if (ftext++ != NULL)
 break;
-
+		/*FALLTHROUGH*/
 default:
 ftext = NULL;
 }



  1   2   3   4   5   >