Browse files

Mac OS X: use no_pi to disable protocol header

Sync with the Linux interface: disable the protocol header using the
no_pi flag. By default, the header is disabled.
  • Loading branch information...
1 parent e58d6e3 commit a3cf932ddd462b6f879ec5c8b9a1cbdff5ca02e1 @msantos committed Jun 20, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/tunctl_darwin.erl
View
6 src/tunctl_darwin.erl
@@ -64,11 +64,11 @@ create(Ifname, Opt) when byte_size(Ifname) < ?IFNAMSIZ, is_list(Opt) ->
end.
create_1(FD, Ifname, Opt) ->
- case proplists:get_bool(tap_pi, Opt) of
+ case proplists:get_bool(no_pi, Opt) of
true ->
- ok = tunctl:ioctl(FD, ?TUNSIFHEAD, 1);
+ ok;
false ->
- ok
+ ok = tunctl:ioctl(FD, ?TUNSIFHEAD, 1)
end,
{ok, FD, Ifname}.

0 comments on commit a3cf932

Please sign in to comment.