Skip to content

Commit

Permalink
Merge pull request #214 from CarlosZaldivar/master
Browse files Browse the repository at this point in the history
Change expected TCP options type from str to bytes.
  • Loading branch information
phaethon authored Nov 7, 2017
2 parents 8f52633 + 9158960 commit 1ddbf73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scapy/layers/inet.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ def i2m(self, pkt, x):
continue
else:
onum = oname
if type(oval) is not str:
warning("option [%i] is not string." % onum)
if type(oval) is not bytes:
warning("option [%i] is not of type bytes." % onum)
continue
opt += bytes([(onum), (2 + len(oval))]) + oval
return opt + b"\x00" * (3 - ((len(opt) + 3) % 4))
Expand Down

0 comments on commit 1ddbf73

Please sign in to comment.