[Kamailio-Devel] New TM parameter: "drop_stateless_replies"
Iñaki Baz Castillo
ibc at aliax.net
Wed Mar 18 01:38:57 CET 2009
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
More information about the Devel
mailing list