[Git][NTPsec/ntpsec][master] Packet reassembly is working.

Eric S. Raymond gitlab at mg.gitlab.com
Tue Oct 18 14:17:28 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
b5d217ec by Eric S. Raymond at 2016-10-18T10:15:53-04:00
Packet reassembly is working.

- - - - -


1 changed file:

- pylib/packet.py


Changes:

=====================================
pylib/packet.py
=====================================
--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -134,9 +134,6 @@ class Mode6Packet(Packet):
         "Return statistics on a fragment."
         return "%5d %5d\t%3d octets\n" % (self.offset, self.end(), self.count)
 
-    def endpoint(self):
-        return self.offset + len(self.extension)
-
     def send(self):
         self.session.sequence += 1
         self.sequence = self.session.sequence
@@ -489,7 +486,7 @@ class Mode6Session:
             # If there aren't any, we're done.
             if seenlastfrag and fragments[0].offset == 0:
                 for f in range(1, len(fragments)):
-                    if fragments[f-1].endpoint() != fragments[f].offset:
+                    if fragments[f-1].end() != fragments[f].offset:
                         break
                 else:
                     #warn("%d packets reassembled\n" % len(fragments))
@@ -498,6 +495,7 @@ class Mode6Session:
                         sys.stdout.write("Response packet:\n")
                         dump_hex_printable(self.response)
                     return None
+                break
 
     def doquery(self, opcode, associd=0, qdata="", auth=False):
         "send a request and save the response"



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/b5d217ec51fd62d7677dfd39a75e9c1f8641a1a4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161018/9f3f0837/attachment.html>


More information about the vc mailing list