Skip to content

Commit

Permalink
Fix WARNING about IPv46 (#4465)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpotter2 committed Jul 15, 2024
1 parent ed7225d commit d7ae655
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scapy/arch/linux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def send(self, x):
sdto = (iff, conf.l3types.layer2num[type_x])
if sn[3] in conf.l2types:
ll = lambda x: conf.l2types.num2layer[sn[3]]() / x
if self.lvl == 3 and type_x != self.LL:
if self.lvl == 3 and not issubclass(self.LL, type_x):
warning("Incompatible L3 types detected using %s instead of %s !",
type_x, self.LL)
self.LL = type_x
Expand Down
2 changes: 1 addition & 1 deletion scapy/layers/inet6.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def answers(self, other):
return self.payload.answers(other.payload)


class IPv46(IP):
class IPv46(IP, IPv6):
"""
This class implements a dispatcher that is used to detect the IP version
while parsing Raw IP pcap files.
Expand Down

0 comments on commit d7ae655

Please sign in to comment.