Skip to content

Commit 7f68cf9

Browse files
committed
Merged in p-l/scapy (pull request phaethon#136)
Bind layer PPP with IPv6 (fixes #5143)
2 parents 7555628 + 1d73605 commit 7f68cf9

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

scapy/layers/ppp.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@
1010
"""
1111

1212
import struct
13-
from scapy.packet import *
14-
from scapy.layers.l2 import *
15-
from scapy.layers.inet import *
16-
from scapy.fields import *
13+
from scapy.packet import Packet, bind_layers
14+
from scapy.layers.l2 import Ether, CookedLinux
15+
from scapy.layers.inet import IP
16+
from scapy.layers.inet6 import IPv6
17+
from scapy.fields import BitField, ByteEnumField, ByteField, \
18+
ConditionalField, FieldLenField, IPField, PacketListField, \
19+
ShortEnumField, ShortField, StrFixedLenField, StrLenField, XByteField, \
20+
XShortField
21+
1722

1823
class PPPoE(Packet):
1924
name = "PPP over Ethernet"
@@ -340,7 +345,8 @@ class PPP_ECP(Packet):
340345
bind_layers( CookedLinux, PPPoE, proto=0x8864)
341346
bind_layers( PPPoE, PPP, code=0)
342347
bind_layers( HDLC, PPP, )
343-
bind_layers( PPP, IP, proto=33)
348+
bind_layers( PPP, IP, proto=0x0021)
349+
bind_layers( PPP, IPv6, proto=0x0057)
344350
bind_layers( PPP, PPP_IPCP, proto=0x8021)
345351
bind_layers( PPP, PPP_ECP, proto=0x8053)
346352
bind_layers( Ether, PPP_IPCP, type=0x8021)

0 commit comments

Comments
 (0)