Skip to content

Commit

Permalink
Fixing #251
Browse files Browse the repository at this point in the history
  • Loading branch information
phaethon committed Jul 2, 2018
1 parent 8868ef3 commit 7b3747c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kamene/layers/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ def i2m(self, pkt, s):
s = ret_s
elif pkt.type == 28: # AAAA
if s:
s = inet_pton(socket.AF_INET6, s.decode("utf-8"))
if type(s) is bytes:
s = s.decode('utf-8')
s = inet_pton(socket.AF_INET6, s)
return s

class RDLenField(Field):
Expand Down

0 comments on commit 7b3747c

Please sign in to comment.