From f50abc56add42a7bf2fa6d39df36703278a293a0 Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Sun, 12 Oct 2003 10:12:55 +0000 Subject: [PATCH] - Local registration was simply broken. Fixed. --- ChangeLog | 4 ++++ RELNOTES | 9 ++++++++- src/register.c | 2 +- src/siproxd.c | 6 ++++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b5117a..69d9e27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +0.4.0a +====== + 12-Oct-2003: - Local registration was simply broken. Fixed. + 0.4.0 ===== 11-Oct-2003: - released 0.4.0 diff --git a/RELNOTES b/RELNOTES index c3caf0f..bcd70ff 100644 --- a/RELNOTES +++ b/RELNOTES @@ -62,9 +62,16 @@ Known bugs: ----- -md5sum for siproxd-0.4.0.tar.gz: +md5sum for siproxd-0.4.0.tar.gz: 3cbf1ac50f122142ce8529e09d2f8796 GnuPG signature for siproxd-0.4.0.tar.gz archive: +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.2.1 (GNU/Linux) + +iD8DBQA/h86xCfzBioe83JQRAtVCAJ4nRI/gTWZBDGtRjJn4hIIaH0tf0ACfZiT0 +X5xlKUBA2O5x2RnKTwt6n6o= +=LXMi +-----END PGP SIGNATURE----- GnuPG: pub 1024D/87BCDC94 2000-03-19 Thomas Ries diff --git a/src/register.c b/src/register.c index dade431..d69f7d0 100644 --- a/src/register.c +++ b/src/register.c @@ -103,7 +103,7 @@ int register_client(osip_message_t *my_msg, int force_lcl_masq) { if (expires_hdr && expires_hdr->hvalue) { expires=atoi(expires_hdr->hvalue); } else { - /* it seems the expires filed in not present everywhere... */ + /* it seems the expires field is not present everywhere... */ WARN("no 'expires' header found - set time to 600 sec"); expires=600; osip_message_set_expires(my_msg, "600"); diff --git a/src/siproxd.c b/src/siproxd.c index 55421f3..a1ba1b7 100644 --- a/src/siproxd.c +++ b/src/siproxd.c @@ -246,13 +246,15 @@ INFO("got packet [%i bytes]from %s [%s]", i, inet_ntoa(from.sin_addr), tmp);} if (MSG_IS_REGISTER(my_msg) && MSG_IS_REQUEST(my_msg)) { if (access & ACCESSCTL_REG) { osip_uri_t *url; - struct in_addr addr1, addr2; + struct in_addr addr1, addr2, addr3; url = osip_message_get_uri(my_msg); sts = get_ip_by_host(url->host, &addr1); sts = get_ip_by_ifname(configuration.inbound_if,&addr2); + sts = get_ip_by_ifname(configuration.outbound_if,&addr3); - if (memcmp(&addr1, &addr2, sizeof(addr1)) == 0) { + if ((memcmp(&addr1, &addr2, sizeof(addr1)) == 0) || + (memcmp(&addr1, &addr3, sizeof(addr1)) == 0)) { /* I'm the registrar, send response myself */ sts = register_client(my_msg, 0); sts = register_response(my_msg, sts);