r3 - 2012-06-10 - 09:09:06 - HarlanStennYou are here: NTP >  Dev Web > GoogleSummerOfCode > GSoC2012UnitTesting
NTP users are strongly urged to take immediate action to ensure that their NTP daemons are not susceptible to being used in distributed denial-of-service (DDoS) attacks. Please also take this opportunity to defeat denial-of-service attacks by implementing Ingress and Egress filtering through BCP38.

ntp-4.2.8p15 was released on 23 June 2020. It addresses 1 medium-severity security issue in ntpd, and provides 13 non-security bugfixes over 4.2.8p13.

Please see the NTP Security Notice for vulnerability and mitigation details.

Are you using Autokey in production? If so, please contact Harlan - he's got some questions for you.

Unit Testing (GSoC 2012)


The goal of this project is to continue with the work done on testing ntpd. The core of the project will be a library created with Packet Construction Set, which will permit thorough testing on ntpd. Various packets will be constructed and automated tests will be run.


The work will be structured following the steps below :

Create NTP wrapper in PCS

We need to create a wrapper class for NTP using existing PCS class. The new class, NTP, will be derived from pcs.Packet and will contain all the filed from the NTP packet structure defined in RFC958.

Create NTPTestPacket class

Using the NTP wrapper class we need to create a new NTPTestPacket class that will be a wrapper for the entire packet that will be sent (ethernet + ip + udp + ntp) on the wire. This class will handle packing, sending, receiving and unpacking NTP messages. The class will support XML serialization and XML deserialization. This will alow for entire NTP packets (from ethernet to ntp) to be stored and created from XML files.

The class will also be responsilble for altering fields in the packet. The information that a field is altered is also saved in the XML file.

Create NTPTest

Using the NTPTestPacket Class we will create a NTP Test. An NTP test will consist of a list of NTPTestPackets that will be sent and a corresponding list of NTPTestPackets that should be received in response. All the information for an NTPTest will be read from an XML file. This approach will give the users the ability to create very complex tests just by adding packets in the test XML file and then chaging values or altering values, depending on the test case.

Create NTPRegression

This will be a python script that will receive a list of test XML files and using the NTPTest class run the test and interpret the results


Date Task Description % Done
04-23 Community Bonding Students get to know mentors, read documentation, get up to speed to begin working on their projects. choice-yes
05-21 Coding Begins Students begin coding for their GSoC projects choice-yes
07-09 BO Midterm Evals Mentors and students can begin submitting mid-term evaluations.  
07-13 EO Midterm Evals Mid-term evaluations deadline.  
08-13 Wrap-up Suggested "Pencils Down" date. Take a week to scrub code, write tests, improve documentation, etc.  
08-20 Firm "Pencils Down" Mentors, students and organization administrators can begin submitting final evaluations to Google.  
08-24 Final Evaluation Final Evaluations Deadline  
08-27 Final Results Final Results Announced  
08-31 Code Samples Students begin uploading code samples  

Discussion and Comments

Adrian, thanks for updating this page. What do you plan to have completed by midterm?

-- HarlanStenn - 2012-06-10

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions...
SSL security by CAcert
Get the CAcert Root Certificate
This site is powered by the TWiki collaboration platform
IPv6 Ready
Copyright & 1999-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding the site? Send feedback