Commit 981b648a authored by Philipp Huebner's avatar Philipp Huebner

Merge branch 'master' into stretch-backports

parents 9a609c1f 76b8b7b6
sudo: false
language: erlang
before_install:
- pip install --user cpp-coveralls coveralls-merge
install:
- rebar get-deps
script: rebar compile xref && rebar skip_deps=true eunit
otp_release:
- 17.1
- 17.5
- 18.1
after_success:
- coveralls --exclude lib --exclude tests --gcov-options '\-lp' --dump c.json
- coveralls-merge c.json erlang.json
# Version 1.0.20
* Updating fast_tls to version 1.0.20.
# Version 1.0.19
* Updating fast_tls to version 1.0.19.
# Version 1.0.18
* Updating fast_tls to version 71250ae.
* Fix compilation warnings
# Version 1.0.17
* Updating fast_tls to version 1.0.18.
# Version 1.0.16
* Updating fast_tls to version 1.0.17.
# Version 1.0.15
* Updating fast_tls to version 1.0.16.
* Updating p1_utils to version 1.0.10.
# Version 1.0.14
* Updating fast_tls to version 1.0.15.
......
erlang-p1-stun (1.0.14-1~bpo9+1) stretch-backports; urgency=medium
erlang-p1-stun (1.0.20-1) unstable; urgency=medium
* Rebuild for stretch-backports.
* New upstream version 1.0.20
* (Build-)Depend on erlang-p1-tls (>= 1.0.20)
-- Philipp Huebner <debalance@debian.org> Sat, 02 Sep 2017 22:49:21 +0200
-- Philipp Huebner <debalance@debian.org> Sat, 13 Jan 2018 12:48:45 +0100
erlang-p1-stun (1.0.17-1) unstable; urgency=medium
* Set Maintainer: Ejabberd Packaging Team <ejabberd@packages.debian.org>
* Set Uploaders: Philipp Huebner <debalance@debian.org>
* Updated Vcs-* fields in debian/control for salsa.debian.org
* Updated years in debian/copyright
* Updated Standards-Version: 4.1.3 (no changes needed)
* New upstream version 1.0.17
* (Build-)Depend on erlang-p1-tls (>= 1.0.18)
-- Philipp Huebner <debalance@debian.org> Thu, 04 Jan 2018 11:37:58 +0100
erlang-p1-stun (1.0.16-1) unstable; urgency=medium
* New upstream version 1.0.16
* (Build-)Depend on erlang-base (>= 1:19.2)
* Updated Standards-Version: 4.1.1 (no changes needed)
-- Philipp Huebner <debalance@debian.org> Mon, 27 Nov 2017 20:21:41 +0100
erlang-p1-stun (1.0.14-1) unstable; urgency=medium
......
Source: erlang-p1-stun
Priority: optional
Maintainer: Philipp Huebner <debalance@debian.org>
Build-Depends: debhelper (>= 9), dh-rebar, erlang-base, erlang-eunit, erlang-p1-tls (>= 1.0.13), erlang-p1-utils (>= 1.0.9), erlang-syntax-tools
Standards-Version: 4.1.0
Maintainer: Ejabberd Packaging Team <ejabberd@packages.debian.org>
Uploaders: Philipp Huebner <debalance@debian.org>
Build-Depends: debhelper (>= 9), dh-rebar, erlang-base (>= 1:19.2), erlang-eunit, erlang-p1-tls (>= 1.0.20),
erlang-p1-utils (>= 1.0.10), erlang-syntax-tools
Standards-Version: 4.1.3
Section: libs
Homepage: https://github.com/processone/stun
Vcs-Git: https://anonscm.debian.org/git/users/debalance/erlang-p1-stun.git
Vcs-Browser: https://anonscm.debian.org/git/users/debalance/erlang-p1-stun.git
Vcs-Git: https://salsa.debian.org/ejabberd-packaging-team/erlang-p1-stun.git
Vcs-Browser: https://salsa.debian.org/ejabberd-packaging-team/erlang-p1-stun
Package: erlang-p1-stun
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, erlang-base | ${erlang-abi:Depends},
${erlang:Depends}, erlang-p1-tls (>= 1.0.13), erlang-p1-utils (>= 1.0.9)
Depends: ${shlibs:Depends}, ${misc:Depends}, erlang-base (>= 1:19.2) | ${erlang-abi:Depends},
${erlang:Depends}, erlang-p1-tls (>= 1.0.20), erlang-p1-utils (>= 1.0.10)
Suggests: stun-server | turn-server
Description: STUN library for Erlang
This library was written for ejabberd which still uses it.
......
......@@ -3,10 +3,10 @@ Upstream-Name: stun
Source: https://github.com/processone/stun
Files: *
Copyright: 2002-2017 ProcessOne
2003-2017 Alexey Shchepin <alexey@process-one.net>
2009-2017 Evgeniy Khramtsov <ekhramtsov@process-one.net>
2015-2017 Mickael Remond <mremond@process-one.net>
Copyright: 2002-2018 ProcessOne
2003-2018 Alexey Shchepin <alexey@process-one.net>
2009-2018 Evgeniy Khramtsov <ekhramtsov@process-one.net>
2015-2018 Mickael Remond <mremond@process-one.net>
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -25,7 +25,7 @@ License: Apache-2.0
`/usr/share/common-licenses/Apache-2.0'.
Files: debian/*
Copyright: 2014-2017 Philipp Huebner <debalance@debian.org>
Copyright: 2014-2018 Philipp Huebner <debalance@debian.org>
License: GPL-2+
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
......
......@@ -11,8 +11,8 @@ Index: erlang-p1-stun/rebar.config
{erl_opts, [debug_info, {i, "include"}]}.
-{deps, [{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.15"}}},
- {p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.9"}}}]}.
-{deps, [{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.20"}}},
- {p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.10"}}}]}.
{cover_enabled, true}.
{cover_export_enabled, true}.
......@@ -22,8 +22,8 @@
{erl_opts, [debug_info, {i, "include"}]}.
{deps, [{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.15"}}},
{p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.9"}}}]}.
{deps, [{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.20"}}},
{p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.10"}}}]}.
{cover_enabled, true}.
{cover_export_enabled, true}.
......
......@@ -23,10 +23,10 @@
{application, stun,
[{description, "STUN and TURN library for Erlang / Elixir"},
{vsn, "1.0.14"},
{vsn, "1.0.20"},
{modules, []},
{registered, []},
{applications, [kernel, stdlib]},
{applications, [kernel, stdlib, p1_utils]},
{mod, {stun_app,[]}},
%% hex.pm packaging:
......
......@@ -240,10 +240,9 @@ process(#state{auth = user} = State,
Key = {User, Realm, Pass},
case stun_codec:check_integrity(Msg, Key) of
true ->
error_logger:info_msg(
"accepted long-term STUN authentication "
"for ~s@~s from ~s",
[User, Realm, addr_to_str(State#state.peer)]),
?dbg("accepted long-term STUN authentication "
"for ~s@~s from ~s",
[User, Realm, addr_to_str(State#state.peer)]),
process(NewState, Msg, Key);
false ->
error_logger:info_msg(
......
......@@ -38,6 +38,7 @@
init_test() ->
?assertEqual(ok, application:start(fast_tls)),
?assertEqual(ok, application:start(p1_utils)),
?assertEqual(ok, application:start(stun)).
mk_cert_test() ->
......
......@@ -147,10 +147,9 @@ wait_for_allocate(#stun{class = request,
Lifetime = time_left(State#state.life_timer),
AddrPort = State#state.addr,
RelayAddr = {State#state.relay_ip, RelayPort},
error_logger:info_msg(
"created TURN allocation for ~s@~s from ~s: ~s",
[State#state.username, State#state.realm,
addr_to_str(AddrPort), addr_to_str(RelayAddr)]),
?dbg("created TURN allocation for ~s@~s from ~s: ~s",
[State#state.username, State#state.realm,
addr_to_str(AddrPort), addr_to_str(RelayAddr)]),
R = Resp#stun{class = response,
'XOR-RELAYED-ADDRESS' = RelayAddr,
'LIFETIME' = Lifetime,
......@@ -223,13 +222,12 @@ active(#stun{class = request,
TRef = erlang:start_timer(
?PERMISSION_LIFETIME, self(),
{permission_timeout, Addr}),
error_logger:info_msg(
"created/updated TURN permission for user "
"~s@~s from ~s: ~s <-> ~s",
[State#state.username, State#state.realm,
addr_to_str(State#state.addr),
addr_to_str(State#state.relay_addr),
addr_to_str({Addr, _Port})]),
?dbg("created/updated TURN permission for user "
"~s@~s from ~s: ~s <-> ~s",
[State#state.username, State#state.realm,
addr_to_str(State#state.addr),
addr_to_str(State#state.relay_addr),
addr_to_str({Addr, _Port})]),
?DICT:store(Addr, {Channel, TRef}, Acc)
end, State#state.permissions, XorPeerAddrs),
NewState = State#state{permissions = Perms},
......@@ -384,10 +382,10 @@ terminate(_Reason, _StateName, State) ->
case State#state.relay_addr of
undefined ->
ok;
RAddrPort ->
error_logger:info_msg(
"deleting TURN allocation for ~s@~s from ~s: ~s",
[Username, Realm, addr_to_str(AddrPort), addr_to_str(RAddrPort)])
_RAddrPort ->
?dbg("deleting TURN allocation for ~s@~s from ~s: ~s",
[Username, Realm, addr_to_str(_AddrPort),
addr_to_str(_RAddrPort)])
end,
if is_pid(State#state.owner) ->
stun:stop(State#state.owner);
......@@ -470,10 +468,12 @@ format_error({error, Reason}) ->
Res
end.
-ifdef(debug).
addr_to_str({Addr, Port}) ->
[inet_parse:ntoa(Addr), $:, integer_to_list(Port)];
addr_to_str(Addr) ->
inet_parse:ntoa(Addr).
-endif.
cancel_timer(undefined) ->
ok;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment