msantos / procket

Erlang interface to low level socket operations
http://blog.listincomprehension.com/search/label/procket
BSD 3-Clause "New" or "Revised" License
283 stars 80 forks source link

packet: ifindex/2 returns wrong index number once the number goes beyond one byte #34

Closed GoelDeepak closed 7 years ago

GoelDeepak commented 7 years ago

If the index number is such that it is beyond 1 byte then packet:ifindex will return wrong number. This is happening because of a bug in the code: {ok, <<Ifname:16/bytes, Ifr:8, /binary>>} = procket:ioctl(Socket, ....).

msantos commented 7 years ago

Fixed in https://github.com/msantos/procket/pull/35