diff options
author | Raimo Niskanen <[email protected]> | 2016-08-01 11:04:54 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2016-08-01 11:04:54 +0200 |
commit | 38d70ada48adb51e8f092ca604d5347fea56339f (patch) | |
tree | 241df28c5c0c9495ad9f098e2d1788d4ed8126fb /erts/preloaded/src/prim_inet.erl | |
parent | 564a186d3e97e4879f15a830db4504efa4db9e10 (diff) | |
parent | e840e73ee03d51dd12c7ed6ec9cecbaae1663454 (diff) | |
download | otp-38d70ada48adb51e8f092ca604d5347fea56339f.tar.gz otp-38d70ada48adb51e8f092ca604d5347fea56339f.tar.bz2 otp-38d70ada48adb51e8f092ca604d5347fea56339f.zip |
Merge branch 'raimo/erts/prim_inet-unknown-address-families/OTP-13775' into maint
* raimo/erts/prim_inet-unknown-address-families/OTP-13775:
Handle AF_UNSPEC and AF_UNDEFINED correctly
Diffstat (limited to 'erts/preloaded/src/prim_inet.erl')
-rw-r--r-- | erts/preloaded/src/prim_inet.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl index 560810d222..bcf16402b0 100644 --- a/erts/preloaded/src/prim_inet.erl +++ b/erts/preloaded/src/prim_inet.erl @@ -2401,13 +2401,13 @@ get_addrs([F|Addrs]) -> {Addr,Rest} = get_addr(F, Addrs), [Addr|get_addrs(Rest)]. -get_addr(?INET_AF_LOCAL, [0]) -> - {{local,<<>>},[]}; get_addr(?INET_AF_LOCAL, [N|Addr]) -> {A,Rest} = lists:split(N, Addr), {{local,iolist_to_binary(A)},Rest}; +get_addr(?INET_AF_UNSPEC, Rest) -> + {{unspec,<<>>},Rest}; get_addr(?INET_AF_UNDEFINED, Rest) -> - {{undefined,0},Rest}; + {{undefined,<<>>},Rest}; get_addr(Family, [P1,P0|Addr]) -> {IP,Rest} = get_ip(Family, Addr), {{IP,?u16(P1, P0)},Rest}. |