Permalink
Browse files

Fix inverted type conversion

  • Loading branch information...
msantos committed Jun 22, 2011
1 parent 9d370ce commit 0e386e817f1279ebf3e5f541c82a4ef51dab51c0
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/tunctl.erl
View
@@ -134,15 +134,15 @@ os() ->
os_up(Dev, {A,B,C,D}, Mask) ->
Cmd = "sudo ifconfig " ++ binary_to_list(Dev) ++ " " ++
inet_parse:ntoa({A,B,C,D}) ++
- "/" ++ list_to_integer(Mask) ++ " up",
+ "/" ++ integer_to_list(Mask) ++ " up",
case os:cmd(Cmd) of
[] -> ok;
Error -> {error, Error}
end;
os_up(Dev, {A,B,C,D,E,F,G,H}, Mask) ->
Cmd = "sudo ifconfig " ++ binary_to_list(Dev) ++ " inet6 add" ++
inet_parse:ntoa({A,B,C,D,E,F,G,H}) ++
- "/" ++ list_to_integer(Mask) ++ " up",
+ "/" ++ integer_to_list(Mask) ++ " up",
case os:cmd(Cmd) of
[] -> ok;
Error -> {error, Error}

0 comments on commit 0e386e8

Please sign in to comment.