From 2bbd2905d8d464b3ac211f0f65d493663e0bbfb1 Mon Sep 17 00:00:00 2001 From: gpotter2 <gabriel@potter.fr> Date: Thu, 27 Jul 2017 19:41:52 +0200 Subject: [PATCH] Fixup PPP and sys.maxint --- scapy/layers/inet6.py | 2 +- scapy/layers/ppp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scapy/layers/inet6.py b/scapy/layers/inet6.py index 69501fce..c62bed76 100644 --- a/scapy/layers/inet6.py +++ b/scapy/layers/inet6.py @@ -390,7 +390,7 @@ class _IPv6GuessPayload: t = ord(p[0]) if len(p) > 2 and (t == 139 or t == 140): # Node Info Query return _niquery_guesser(p) - if len(p) >= icmp6typesminhdrlen.get(t, sys.maxint): # Other ICMPv6 messages + if len(p) >= icmp6typesminhdrlen.get(t, float("inf")): # Other ICMPv6 messages return get_cls(icmp6typescls.get(t,"Raw"), "Raw") return Raw elif self.nh == 135 and len(p) > 3: # Mobile IPv6 diff --git a/scapy/layers/ppp.py b/scapy/layers/ppp.py index 5bcc8e2d..6a16d3d7 100644 --- a/scapy/layers/ppp.py +++ b/scapy/layers/ppp.py @@ -256,7 +256,7 @@ class PPP_IPCP_Option(Packet): @classmethod def dispatch_hook(cls, _pkt=None, *args, **kargs): if _pkt: - o = ord(_pkt[0]) + o = orb(_pkt[0]) return cls.registered_options.get(o, cls) return cls -- GitLab