<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/642d12423900f2e5c93a0ce7f79c21d8ef1ccc10">642d1242</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-08T00:04:28Z</i>
</div>
<pre class='commit-message'>TESTFRAME: Last oiece of intercept layer in place, but untested.

Tis pretty much finishes capture mode, though it's still possible
the dump format might need revision.</pre>
</li>
</ul>
<h4>2 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>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/642d12423900f2e5c93a0ce7f79c21d8ef1ccc10#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">@@ -351,22 +351,25 @@ void intercept_sendpkt(const char *legend,
</span> 
 void intercept_receive(struct recvbuf *rbufp)
 {
<span style="color: #000000;background-color: #ffdddd">-    if (mode != replay)
-       receive(rbufp);
-
</span>     if (mode != none) {
        /*
<span style="color: #000000;background-color: #ffdddd">-         * Order is: cast flags, receipt time, source address, packet, length.
-        * Cast flags are only kept because they change the ntpq display,
-        * they have no implications for the protocol machine.
-        * We don't dump srcadr because only the parse clock uses that.
</span><span style="color: #000000;background-color: #ddffdd">+    * Order is: cast flags, receipt time, interface name, source
+        * address, packet, length.  Cast flags are only kept because
+        * they change the ntpq display, they have no implications for
+        * the protocol machine.  We don't dump srcadr because only
+        * the parse clock uses that.
</span>    */
<span style="color: #000000;background-color: #ffdddd">-        printf("event receive %0x %s ",
-              rbufp->cast_flags, lfptoa(&rbufp->recv_time, 10));
</span><span style="color: #000000;background-color: #ddffdd">+   printf("event receive %0x %s %s ",
+              rbufp->cast_flags,
+              lfptoa(&rbufp->recv_time, 10),
+              rbufp->dstadr->name);
</span>   packet_dump(&rbufp->recv_srcadr, &rbufp->recv_pkt, rbufp->recv_length);
        fputs("\n", stdout);
     }
 
<span style="color: #000000;background-color: #ddffdd">+    if (mode != replay)
+       receive(rbufp);
+
</span>     /* FIXME: replay logic goes here */
 }
 
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/642d12423900f2e5c93a0ce7f79c21d8ef1ccc10#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">@@ -3550,7 +3550,7 @@ read_network_packet(
</span>   ts = fetch_timestamp(rb, &msghdr, ts);
 #endif
        rb->recv_time = ts;
<span style="color: #000000;background-color: #ffdddd">-        rb->receiver = receive;
</span><span style="color: #000000;background-color: #ddffdd">+   rb->receiver = intercept_receive;
</span> 
        add_full_recv_buffer(rb);
 
</code></pre>

<br>
</li>

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

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/642d12423900f2e5c93a0ce7f79c21d8ef1ccc10">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/642d12423900f2e5c93a0ce7f79c21d8ef1ccc10"}}</script>
</p>
</div>
</body>
</html>