<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Eric S. Raymond pushed to branch master
at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/9d0fd001ce7bf70a0de2a220000467a902452421">9d0fd001</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-19T05:45:06Z</i>
</div>
<pre class='commit-message'>Checkpoint:  tweak the capture logging.</pre>
</li>
</ul>
<h4>4 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
ntpd/ntp_intercept.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
ntpd/ntp_io.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
ntpd/ntp_proto.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
ntpd/ntp_timer.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/9d0fd001ce7bf70a0de2a220000467a902452421#diff-0'>
<strong>
ntpd/ntp_intercept.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_intercept.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_intercept.c
</span><span style="color: #aaaaaa">@@ -741,25 +741,13 @@ void intercept_replay(void)
</span>   get_operation(NULL);
        if (strncmp(linebuf, "finish", 6) == 0)
            break;
<span style="color: #000000;background-color: #ffdddd">-#if 0
</span>   else if (strncmp(linebuf, "sendpkt ", 9) == 0)
<span style="color: #000000;background-color: #ffdddd">-        {
-           struct pkt pkt;
-           char legend[BUFSIZ], recvbuf[BUFSIZ], destbuf[BUFSIZ];
-           char pktbuf[BUFSIZ], macbuf[BUFSIZ];
-
-           if (sscanf(linebuf, "sendpkt %x %s %s %s %s",
-                      legend, recvbuf, destbuf, pktbuf, macbuf) != 5)
-           {
-               fprintf(stderr, "ntpd: bad receive format at line %d\n", lineno);
-               exit(1);
-           }
-
-           packet_parse(recvbuf, macbuf, &pkt);
-
-
-       }
-#endif
</span><span style="color: #000000;background-color: #ddffdd">+       /*
+            * If we get here, this is a sendpkt generated not by the protocol
+            * machine but by an initial association setup. No way to check it,
+            * so skip it.
+            */
+           continue;
</span>   else if (strncmp(linebuf, "receive ", 8) == 0)
        {
            struct recvbuf rbuf;
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/9d0fd001ce7bf70a0de2a220000467a902452421#diff-1'>
<strong>
ntpd/ntp_io.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_io.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_io.c
</span><span style="color: #aaaaaa">@@ -3804,11 +3804,12 @@ input_handler(
</span>   }
        /* We've done our work */
 #ifdef DEBUG_TIMING
<span style="color: #000000;background-color: #ffdddd">-        intercept_get_systime(__func__, &ts_e);
</span><span style="color: #000000;background-color: #ddffdd">+   get_systime(&ts_e);
</span>   /*
         * (ts_e - ts) is the amount of time we spent
         * processing this gob of file descriptors.  Log
<span style="color: #000000;background-color: #ffdddd">-         * it.
</span><span style="color: #000000;background-color: #ddffdd">+    * it.  Because it's only used for logging, this
+        * get_systime doesn't have to be captured/replayed.
</span>    */
        L_SUB(&ts_e, &ts);
        collect_timing(NULL, "input handler", 1, &ts_e);
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/9d0fd001ce7bf70a0de2a220000467a902452421#diff-2'>
<strong>
ntpd/ntp_proto.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_proto.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_proto.c
</span><span style="color: #aaaaaa">@@ -3103,11 +3103,10 @@ peer_xmit(
</span> #endif    /* !ENABLE_AUTOKEY */
 
                /*
<span style="color: #000000;background-color: #ffdddd">-                 * Transmit a-priori timestamps.  We don't need to log these
-                * for replay because the timestamp gets stuffed in the packet
-                * which is what's visible in the replay log.
</span><span style="color: #000000;background-color: #ddffdd">+            * Transmit a-priori timestamps.  This is paired with
+                * a later call used to record transmission time.
</span>            */
<span style="color: #000000;background-color: #ffdddd">-                get_systime(&xmt_tx);
</span><span style="color: #000000;background-color: #ddffdd">+           intercept_get_systime("pre-sendpkt", &xmt_tx);
</span>           if (peer->flip == 0) {       /* basic mode */
                        peer->aorg = xmt_tx;
                        HTONL_FP(&xmt_tx, &xpkt.xmt);
<span style="color: #aaaaaa">@@ -3138,7 +3137,7 @@ peer_xmit(
</span>           /*
                 * Capture a-posteriori timestamps
                 */
<span style="color: #000000;background-color: #ffdddd">-                intercept_get_systime(__func__, &xmt_ty);
</span><span style="color: #000000;background-color: #ddffdd">+           intercept_get_systime("post-sendpkt", &xmt_ty);
</span>           if (peer->flip != 0) {               /* interleaved modes */
                        if (peer->flip > 0)
                                peer->aorg = xmt_ty;
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/9d0fd001ce7bf70a0de2a220000467a902452421#diff-3'>
<strong>
ntpd/ntp_timer.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_timer.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_timer.c
</span><span style="color: #aaaaaa">@@ -331,6 +331,9 @@ timer(void)
</span>           sys_rootdisp = 0;
        }
 
<span style="color: #000000;background-color: #ddffdd">+        /*
+        * Recorded and played back in case the leap-second check fires.
+        */
</span>   intercept_get_systime(__func__, &now);
        time(&tnow);
 
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/9d0fd001ce7bf70a0de2a220000467a902452421">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/NTPsec/ntpsec/commit/9d0fd001ce7bf70a0de2a220000467a902452421"}}</script>
</p>
</div>
</body>
</html>