Browse files

packet: pasto in endian conversion

2 byte family field was inadvervently made into a 4 byte field and
byte swapped.
  • Loading branch information...
1 parent 917f729 commit 928bb05112448c50f4001131113e5b0e815b886d @msantos committed Apr 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/packet.erl
View
2 src/packet.erl
@@ -75,7 +75,7 @@ socket() ->
socket(?ETH_P_IP).
socket(Protocol) when is_integer(Protocol) ->
procket:open(0, [
- {protocol, procket:ntohl(Protocol)},
+ {protocol, procket:ntohs(Protocol)},
{type, raw},
{family, packet}
]).

0 comments on commit 928bb05

Please sign in to comment.