Package: libnet1-dev
Version: 1.1.2.1-2

The rec_ts_{int,frac} parameter weren't used at all and ntp_rec_ts was
initialized with the same values as ntp_orig_ts.  The fix is quite
obvious, see patch below.

This bug is fixed in libnet 1.1.3 (beta) the same way.
---
 src/libnet_build_ntp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libnet_build_ntp.c b/src/libnet_build_ntp.c
index dd3d64f..9ab427d 100644
--- a/src/libnet_build_ntp.c
+++ b/src/libnet_build_ntp.c
@@ -85,8 +85,8 @@ u_int8_t *payload, u_int32_t payload_s, libnet_t *l, 
libnet_ptag_t ptag)
     ntp_hdr.ntp_ref_ts.fraction     = htonl(ref_ts_frac);
     ntp_hdr.ntp_orig_ts.integer     = htonl(orig_ts_int);
     ntp_hdr.ntp_orig_ts.fraction    = htonl(orig_ts_frac);
-    ntp_hdr.ntp_rec_ts.integer      = htonl(orig_ts_int);
-    ntp_hdr.ntp_rec_ts.fraction     = htonl(orig_ts_frac);
+    ntp_hdr.ntp_rec_ts.integer      = htonl(rec_ts_int);
+    ntp_hdr.ntp_rec_ts.fraction     = htonl(rec_ts_frac);
     ntp_hdr.ntp_xmt_ts.integer      = htonl(xmt_ts_int);
     ntp_hdr.ntp_xmt_ts.fraction     = htonl(xmt_ts_frac);
 
-- 
1.5.1.81.gee969



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to