[Kamailio-Devel] New TM parameter: "drop_stateless_replies"

Ovidiu Sas osas at voipembedded.com
Wed Mar 18 01:43:54 CET 2009


Keep in mind that changes to core and tm module are useless since next
release will be based on the sr core and tm module.  You should check
the tm module from sr.


Regards,
Ovidiu Sas

On Tue, Mar 17, 2009 at 8:38 PM, Iñaki Baz Castillo <ibc at aliax.net> wrote:
> Hi, I've added a new paratemer to TM module:
>
>  drop_stateless_replies (BOLEAN)
>
> If enabled, when Kamailio receives a reply with no matching transaction it's
> dropped instead of being forwarded stateless based on Via header. This is
> based on draft-sparks-sip-invfix-03 which fixes some issues in RFC 3261 about
> transactions.
>
> It seems to work, but I would like someone to review the code before
> commiting.
>
> Basically I've added the following code to "reply_received()" function
> in "t_reply.c":
>
> ------------------------
>  not_found:
>        set_t(T_UNDEFINED);
> +       /* if drop_stateless_replies is enabled then replies no
> +        * matching a client transaction are dropped instead of
> +        * being forwarded stateless based on Via header.
> +        */
> +       if (drop_stateless_replies) {
> +               LM_DBG("reply with no transaction -> drop\n");
> +               return 0;
> +       }
>        return 1;
>  }
> -------------------
>
> Any comment please?
>
> PD: By default it's dissabled but I really think it should be enabled by
> default (it avoids an attacker sending responses with spoofed Via).
>
>
>
> --
> Iñaki Baz Castillo
>
> _______________________________________________
> Kamailio (OpenSER) - Devel mailing list
> Devel at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel



More information about the Devel mailing list