Skip to content
Browse files

Fix inverted type conversion

  • Loading branch information...
1 parent 9d370ce commit 0e386e817f1279ebf3e5f541c82a4ef51dab51c0 @msantos committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/tunctl.erl
View
4 src/tunctl.erl
@@ -134,7 +134,7 @@ 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}
@@ -142,7 +142,7 @@ os_up(Dev, {A,B,C,D}, Mask) ->
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.
Something went wrong with that request. Please try again.