[Git][NTPsec/ntpsec][master] 4 commits: Minor tweak to doc for mrulist
Hal Murray
gitlab at mg.gitlab.com
Tue Dec 13 05:39:23 UTC 2016
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
e50cbb33 by Hal Murray at 2016-12-12T20:38:37-08:00
Minor tweak to doc for mrulist
- - - - -
f3d3de14 by Hal Murray at 2016-12-12T20:38:37-08:00
Remove unused hop option for expanding-ring search
- - - - -
5fbb13f3 by Hal Murray at 2016-12-12T20:38:37-08:00
More broadcastclient/multicastclient cleanups
- - - - -
dab20365 by Hal Murray at 2016-12-12T20:38:37-08:00
pythonize.header doesn't like lower case names
- - - - -
7 changed files:
- docs/includes/misc-options.txt
- docs/includes/ntpq-body.txt
- include/ntp.h
- ntpd/ntp_config.c
- ntpd/ntp_control.c
- ntpd/ntp_proto.c
- pylib/util.py
Changes:
=====================================
docs/includes/misc-options.txt
=====================================
--- a/docs/includes/misc-options.txt
+++ b/docs/includes/misc-options.txt
@@ -282,10 +282,4 @@ The variables operate as follows:
Specifies the maximum number of file descriptors ntpd may have open
at once. Defaults to the system default.
-+hop+ +...+::
- This command specifies a list of TTL values in increasing order, up to
- 8 values can be specified. In manycast mode these values are used in
- turn in an expanding-ring search. The default is eight multiples of 32
- starting at 31.
-
// end
=====================================
docs/includes/ntpq-body.txt
=====================================
--- a/docs/includes/ntpq-body.txt
+++ b/docs/includes/ntpq-body.txt
@@ -273,8 +273,8 @@ ind assid status conf reach auth condition last_event cnt
+mrulist+ [+limited+ | +kod+ | +mincount=+'count' | +laddr=+'localaddr' | +sort=+'sortorder' | +resany=+'hexmask' | +resall=+'hexmask']::
Obtain and print traffic counts collected and maintained by the
- monitor facility. This is useful for tracking who _uses_ your
- server.
+ monitor facility. This is useful for tracking who _uses_ or
+ _abuses_ your server.
+
With the exception of +sort=+'sortorder', the options
filter the list returned by +ntpd+. The +limited+ and +kod+ options
=====================================
include/ntp.h
=====================================
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -397,11 +397,12 @@ struct peer {
* These can appear in packets
*/
#define MODE_CONTROL 6 /* control mode */
-#define MODE_PRIVATE 7 /* Dead: private mode */
+#define MODE_PRIVATE 7 /* Dead: private mode, ntpdc */
/*
- * This is a madeup mode for broadcast client.
+ * This is a madeup mode for broadcast client. No longer used by ntpd.
*/
-#define MODE_BCLIENT 6 /* broadcast client mode */
+/* #define MODE_BCLIENT 6 ** broadcast client mode */
+#define MODE_BCLIENTX 6 /* for pylib/util.py */
#define LEN_PKT_NOMAC 48 /* min header length */
@@ -612,13 +613,13 @@ struct pkt {
/*
* Configuration items. These are for the protocol module (proto_config())
*/
-#define PROTO_BROADCLIENT 1 /* (not used) */
-#define PROTO_PRECISION 2 /* (not used) */
-#define PROTO_AUTHENTICATE 3 /* (not used) */
-#define PROTO_BROADDELAY 4 /* (not used) */
-#define PROTO_AUTHDELAY 5
-#define PROTO_MULTICAST_ADD 6 /* (not used) */
-#define PROTO_MULTICAST_DEL 7 /* (not used) */
+/* #define PROTO_BROADCLIENT 1 */
+/* #define PROTO_PRECISION 2 */
+/* #define PROTO_AUTHENTICATE 3 */
+/* #define PROTO_BROADDELAY 4 */
+/* #define PROTO_AUTHDELAY 5 */
+/* #define PROTO_MULTICAST_ADD 6 */
+/* #define PROTO_MULTICAST_DEL 7 */
#define PROTO_NTP 8
#define PROTO_KERNEL 9
#define PROTO_MONITOR 10
=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -2186,10 +2186,6 @@ apply_enable_disable(
option);
break;
- case T_Auth:
- proto_config(PROTO_AUTHENTICATE, enable, 0.);
- break;
-
case T_Calibrate:
proto_config(PROTO_CAL, enable, 0.);
break;
=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -164,7 +164,7 @@ static const struct ctl_proc control_codes[] = {
#define CS_SS_PROCESSED 43
#define CS_PEERADR 44
#define CS_PEERMODE 45
-#define CS_BCASTDELAY 46 /* not used */
+/* was CS_BCASTDELAY 46 */
#define CS_AUTHDELAY 47
#define CS_AUTHKEYS 48
#define CS_AUTHFREEK 49
@@ -338,7 +338,7 @@ static const struct ctl_var sys_var[] = {
{ CS_SS_PROCESSED, RO, "ss_processed" }, /* 43 */
{ CS_PEERADR, RO, "peeradr" }, /* 44 */
{ CS_PEERMODE, RO, "peermode" }, /* 45 */
- //{ CS_BCASTDELAY, RO, "bcastdelay" }, /* 46 */
+ /*{ CS_BCASTDELAY, RO, "bcastdelay" }, ** 46 */
{ CS_AUTHDELAY, RO, "authdelay" }, /* 47 */
{ CS_AUTHKEYS, RO, "authkeys" }, /* 48 */
{ CS_AUTHFREEK, RO, "authfreek" }, /* 49 */
=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -963,11 +963,7 @@ transmit(
if (peer->retry > 0)
peer->retry--;
- /*
- * Do not transmit if in broadcast client mode.
- */
- if (peer->hmode != MODE_BCLIENT)
- peer_xmit(peer);
+ peer_xmit(peer);
poll_update(peer, hpoll);
}
@@ -1252,7 +1248,6 @@ peer_clear(
)
{
uint8_t u;
- l_fp xmt = peer->xmt;
/*
* Clear all values, including the optional crypto values above.
@@ -1264,11 +1259,6 @@ peer_clear(
peer->flash = peer_unfit(peer);
peer->jitter = LOGTOD(sys_precision);
- /* Don't throw away our broadcast replay protection */
- if (peer->hmode == MODE_BCLIENT) {
- peer->xmt = xmt;
- }
-
for (u = 0; u < NTP_SHIFT; u++) {
peer->filter_order[u] = u;
peer->filter_disp[u] = sys_maxdisp;
=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -229,7 +229,7 @@ class PeerSummary:
srcport = value
elif name == "reftime":
reftime = value # l_fp timestamp
- if hmode == ntp.magic.MODE_BCLIENT:
+ if hmode == ntp.magic.MODE_BCLIENTX:
# broadcastclient or multicastclient
ptype = 'b'
elif hmode == ntp.magic.MODE_BROADCAST:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/c74ccb19ecb4e7eee9f024ea3fe743a84dd3b446...dab20365d328e980c1a9f6945d38c92f90b99d72
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161213/7b3d9f51/attachment.html>
More information about the vc
mailing list