sip-router
11 years agoMerge commit 'origin/ser_core_cvs'
Andrei Pelinescu-Onciul [Fri, 19 Dec 2008 13:24:50 +0000 (14:24 +0100)]
Merge commit 'origin/ser_core_cvs'

* commit 'origin/ser_core_cvs':
  dns: fix build warnings when compiling without ipv6
  core: fix build on Darwin
  doc: tcp tunning update
  sctp: SO_REUSEADDR on the sctp sockets
  tcp: fix for async write
  another switch where PROTO_SCTP was missing - added case
  sctp protocol decoded in RPC dst_blacklist.view
  clean up whitespace in makefile
  added README.prefix_route
  Use explicit comparison with NULL, it's more clear and shuts off gcc,
  Fix warnings on LP64 plarforms out there (all 64-bit amd64/emt64 unixes
  added new module prefix_route
  update RPM spec file
  t_suspend() and t_continue() functions have been documented.
  dns: naptr local preferences fix
  more type punning warnings fixed
  avp: warning fixes & more sane usr_avp struct
  dns cache: fixed missing sctp SRV queries
  dns: fixed missing sctp SRV queries

11 years agodns: fix build warnings when compiling without ipv6
Andrei Pelinescu-Onciul [Tue, 16 Dec 2008 14:35:55 +0000 (14:35 +0000)]
dns: fix build warnings when compiling without ipv6

Author: Vance Shipley <vances@motivity.ca>
Committer: Andrei Pelinescu-Onciul <andrei@iptel.org>

11 years agocore: fix build on Darwin
Andrei Pelinescu-Onciul [Tue, 16 Dec 2008 14:34:04 +0000 (14:34 +0000)]
core: fix build on Darwin

Author: Alfred Heggestad <aeh@db.org>
Committer: Andrei Pelinescu-Onciul <andrei@iptel.org>

11 years agodoc: tcp tunning update
Andrei Pelinescu-Onciul [Tue, 16 Dec 2008 14:30:48 +0000 (14:30 +0000)]
doc: tcp tunning update

- update with epoll tunning for kernels >= 2.6.27.8

Author: Andrei Pelinescu-Onciul <andrei@iptel.org>

11 years agosctp: SO_REUSEADDR on the sctp sockets
Andrei Pelinescu-Onciul [Fri, 12 Dec 2008 23:25:39 +0000 (23:25 +0000)]
sctp: SO_REUSEADDR on the sctp sockets

Reported-by: Michal Matyska, michal.matyska at iptel org
11 years agotcp: fix for async write
Andrei Pelinescu-Onciul [Fri, 12 Dec 2008 23:02:45 +0000 (23:02 +0000)]
tcp: fix for async write

- fixed bug in _wbufq_add() which caused packet corruption when
  multiple packets with size < default buffer size where queued.

Reported-by: Vaclav Kubart, vaclav.kubart at iptel org
Tested-by: Vaclav Kubart, vaclav.kubart at iptel org
11 years agoanother switch where PROTO_SCTP was missing - added case
Michal Matyska [Thu, 11 Dec 2008 19:12:41 +0000 (19:12 +0000)]
another switch where PROTO_SCTP was missing - added case

11 years agosctp protocol decoded in RPC dst_blacklist.view
Michal Matyska [Tue, 9 Dec 2008 14:09:22 +0000 (14:09 +0000)]
sctp protocol decoded in RPC dst_blacklist.view

so it does not show unknown protocol anymore

11 years agokamailio compatibility, add str_strcmp and str_casecmp functions
Henning Westerholt [Mon, 8 Dec 2008 17:13:57 +0000 (18:13 +0100)]
kamailio compatibility, add str_strcmp and str_casecmp functions

11 years agoclean up whitespace in makefile
Alfred E. Heggestad [Mon, 8 Dec 2008 12:26:39 +0000 (12:26 +0000)]
clean up whitespace in makefile

11 years agoadded README.prefix_route
Alfred E. Heggestad [Mon, 8 Dec 2008 10:36:46 +0000 (10:36 +0000)]
added README.prefix_route

11 years agoUse explicit comparison with NULL, it's more clear and shuts off gcc,
Maxim Sobolev [Mon, 8 Dec 2008 06:16:52 +0000 (06:16 +0000)]
Use explicit comparison with NULL, it's more clear and shuts off gcc,
which otherwise compain that condition is always true when argument is
pointer to the struct allocated on stack.

11 years agoFix warnings on LP64 plarforms out there (all 64-bit amd64/emt64 unixes
Maxim Sobolev [Mon, 8 Dec 2008 06:11:39 +0000 (06:11 +0000)]
Fix warnings on LP64 plarforms out there (all 64-bit amd64/emt64 unixes
and linuxes) where sizeof(*void) != sizeof(int).

11 years agoadded new module prefix_route
Alfred E. Heggestad [Sat, 6 Dec 2008 22:09:13 +0000 (22:09 +0000)]
added new module prefix_route

11 years agoupdate RPM spec file
Alfred E. Heggestad [Sat, 6 Dec 2008 21:49:27 +0000 (21:49 +0000)]
update RPM spec file

11 years agot_suspend() and t_continue() functions have been documented.
Miklos Tirpak [Fri, 5 Dec 2008 13:59:35 +0000 (13:59 +0000)]
t_suspend() and t_continue() functions have been documented.

11 years agodns: naptr local preferences fix
Andrei Pelinescu-Onciul [Wed, 3 Dec 2008 23:41:13 +0000 (23:41 +0000)]
dns: naptr local preferences fix

- in some cases the local preference for a protocol
  (dns_{udp,tcp,sctp,tls}_pref) was ignored (depending on the
  order of the records).

Reported-by: Vladimir Broz, vbroz at iptel org
Tested-by: Vladimir Broz, vbroz at iptel org
11 years agokamailio compatibility, add shm_strdup and pkg_strdup implementation
Henning Westerholt [Tue, 2 Dec 2008 15:05:48 +0000 (16:05 +0100)]
kamailio compatibility, add shm_strdup and pkg_strdup implementation

11 years agomore type punning warnings fixed
Andrei Pelinescu-Onciul [Fri, 28 Nov 2008 15:24:15 +0000 (15:24 +0000)]
more type punning warnings fixed

11 years agoavp: warning fixes & more sane usr_avp struct
Andrei Pelinescu-Onciul [Fri, 28 Nov 2008 15:24:01 +0000 (15:24 +0000)]
avp: warning fixes & more sane usr_avp struct

- type punning warning fixed (both for =-Wstrict-aliasing and
   -Wstrict-aliasing=2)
- replaced usr_avp->data with a union (more sane, looks better)

11 years agodns cache: fixed missing sctp SRV queries
Andrei Pelinescu-Onciul [Fri, 28 Nov 2008 10:41:40 +0000 (10:41 +0000)]
dns cache: fixed missing sctp SRV queries

- added missing support for sctp SRV queries

11 years agoMerge commit 'origin/henning/trie'
Henning Westerholt [Thu, 27 Nov 2008 13:00:30 +0000 (14:00 +0100)]
Merge commit 'origin/henning/trie'

* commit 'origin/henning/trie':
  add trie to library directory
  add SHM_MEM_ERROR and PKG_MEM_ERROR logging macros to mem.h

11 years agodns: fixed missing sctp SRV queries
Andrei Pelinescu-Onciul [Tue, 25 Nov 2008 19:15:05 +0000 (19:15 +0000)]
dns: fixed missing sctp SRV queries

- support for sctp SRV queries was missing

11 years agoMerge commit 'origin/andrei/fixups'
Andrei Pelinescu-Onciul [Mon, 24 Nov 2008 13:18:27 +0000 (14:18 +0100)]
Merge commit 'origin/andrei/fixups'

* commit 'origin/andrei/fixups':
  fixups: call them even for 0 params. functions
  str: kamailio str_init compatibility macro
  fparam_t/gparam_t unification

11 years agoMerge commit 'origin/daniel/pv'
Andrei Pelinescu-Onciul [Mon, 24 Nov 2008 13:18:03 +0000 (14:18 +0100)]
Merge commit 'origin/daniel/pv'

* commit 'origin/daniel/pv':
  more PV API integration
  PV get null helper added
  updated pvar.h file according to previous commit
  pseudo-variable engine api

11 years agoMerge commit 'origin/andrei/mod_register'
Andrei Pelinescu-Onciul [Mon, 24 Nov 2008 13:17:50 +0000 (14:17 +0100)]
Merge commit 'origin/andrei/mod_register'

* commit 'origin/andrei/mod_register':
  minor macro additions for kamailio compatibility
  modules: support for mod_register

11 years agoMerge commit 'origin/andrei/mod_f_params'
Andrei Pelinescu-Onciul [Mon, 24 Nov 2008 13:16:52 +0000 (14:16 +0100)]
Merge commit 'origin/andrei/mod_f_params'

* commit 'origin/andrei/mod_f_params':
  script: variable number of params for functions
  mod if: more prototypes and defines

11 years agoMerge commit 'origin/andrei/module_interface'
Andrei Pelinescu-Onciul [Mon, 24 Nov 2008 13:15:50 +0000 (14:15 +0100)]
Merge commit 'origin/andrei/module_interface'

* commit 'origin/andrei/module_interface':
  tm makefile: declare SER_MOD_INTERFACE
  kamailio LM_* compatibility macros
  dual module interface support: ser and kamailio
  kamailio compatibility header files
  added .gitignore
  module interface: minor changes from kamailio

11 years agoadd trie to library directory
Henning Westerholt [Fri, 21 Nov 2008 12:29:07 +0000 (13:29 +0100)]
add trie to library directory

- add generic digit trie implementation to lib directory,
  needed from userblacklist and carrieroute
- add a note to the README

11 years agoadd SHM_MEM_ERROR and PKG_MEM_ERROR logging macros to mem.h
Henning Westerholt [Fri, 21 Nov 2008 12:23:02 +0000 (13:23 +0100)]
add SHM_MEM_ERROR and PKG_MEM_ERROR logging macros to mem.h

11 years agofixups: call them even for 0 params. functions
Andrei Pelinescu-Onciul [Fri, 21 Nov 2008 10:49:48 +0000 (11:49 +0100)]
fixups: call them even for 0 params. functions

- kamailio compatibility: fixups for function with no parameters
 can be used

11 years agoMerge commit 'origin/daniel/pv' into fixups
Andrei Pelinescu-Onciul [Fri, 21 Nov 2008 10:47:56 +0000 (11:47 +0100)]
Merge commit 'origin/daniel/pv' into fixups

* commit 'origin/daniel/pv':
  more PV API integration

11 years agostr: kamailio str_init compatibility macro
Andrei Pelinescu-Onciul [Fri, 21 Nov 2008 00:03:51 +0000 (01:03 +0100)]
str: kamailio str_init compatibility macro

11 years agoMerge branch 'pvar' into fixups
Andrei Pelinescu-Onciul [Thu, 20 Nov 2008 23:01:53 +0000 (00:01 +0100)]
Merge branch 'pvar' into fixups

* pvar:
  PV get null helper added
  updated pvar.h file according to previous commit
  pseudo-variable engine api

11 years agofparam_t/gparam_t unification
Andrei Pelinescu-Onciul [Thu, 20 Nov 2008 21:27:50 +0000 (22:27 +0100)]
fparam_t/gparam_t unification

11 years agomore PV API integration
Daniel-Constantin Mierla [Thu, 20 Nov 2008 21:17:26 +0000 (23:17 +0200)]
more PV API integration

- register PV exported by modules
- added functions to evaluate PVs
- xlog module from Kamailio/OpenSER should run now in sip-router compiled with DEFS+= -DKAMAILIO_MOD_INTERFACE

11 years agoMerge branch 'andrei/mod_register' of ssh://git.sip-router.org/sip-router into daniel
Daniel-Constantin Mierla [Thu, 20 Nov 2008 20:05:38 +0000 (22:05 +0200)]
Merge branch 'andrei/mod_register' of ssh://git.sip-router.org/sip-router into daniel

* 'andrei/mod_register' of ssh://git.sip-router.org/sip-router:
  minor macro additions for kamailio compatibility
  modules: support for mod_register

11 years agominor macro additions for kamailio compatibility
Andrei Pelinescu-Onciul [Thu, 20 Nov 2008 19:02:05 +0000 (20:02 +0100)]
minor macro additions for kamailio compatibility

11 years agoMerge commit 'origin/daniel/pv' into pvar
Andrei Pelinescu-Onciul [Thu, 20 Nov 2008 17:01:12 +0000 (18:01 +0100)]
Merge commit 'origin/daniel/pv' into pvar

* commit 'origin/daniel/pv':
  PV get null helper added
  updated pvar.h file according to previous commit
  pseudo-variable engine api

11 years agomodules: support for mod_register
Andrei Pelinescu-Onciul [Thu, 20 Nov 2008 16:33:44 +0000 (17:33 +0100)]
modules: support for mod_register

- new mod_register function added to the module interface
 (separate from exports structure):
    If a module exports a mod_register function it will be called
    immediately after loading the module and checking the module
    version and module interface (this means way before calling
    mod_init).
    The mod_register function prototype is:
    int mod_register(char* path, int* dlflags, void* r1, void* r2)
    where path is the module path including the filename, dlflags
    is a pointer to the dlflags used when loading the module (If
    the value is changed to a different and non-zero value, the
    module will be reloaded with the new flags), and r1 and r2 are
    parameters reserved for future use.
    A 0 return means success and -1 means error (the module will not
    be loaded).
    This new function can be used to register new parsing functions,
    alter dynamically the mod_exports structure contents a.s.o.
- kamailio compatible mod exports dlflags handling (but a warning
  will be printed saying this is deprecated and the preferred way
  is using mod_register().

11 years agoPV get null helper added
Daniel-Constantin Mierla [Thu, 20 Nov 2008 12:45:47 +0000 (14:45 +0200)]
PV get null helper added

- PV get null helper function required to stay in the API
- removed unused PV types - now AVP type is used to detect the type of
  parameters, some related to R-URI are used by avpops, to be added if a
  different solution is not found. Would be hard to manage the types in
  core and do the implementation in module.

11 years agoupdated pvar.h file according to previous commit
Daniel-Constantin Mierla [Thu, 20 Nov 2008 12:28:35 +0000 (14:28 +0200)]
updated pvar.h file according to previous commit

- to include only PV and transformation API, no implementation
- (still learning GIT to do it in one step :-) )

11 years agopseudo-variable engine api
Daniel-Constantin Mierla [Thu, 20 Nov 2008 11:39:29 +0000 (13:39 +0200)]
pseudo-variable engine api

- imported pvar.h and unified PV and transformations interface in
  pvapi.c
- PV engine does not use anymore static array plus a linked list for PV
  implementations, PVs will be in module and indexed in a hash table
  (small performance enhancement)
- transformations are registered via same model as PV, they will be
  implemented in modules, the core will held a hash table to index them
- the core gets a smaller footprint now and better flexibility in
  hadling PVs and transformations. pv and transformations will be moved
  in pv module
- compiles but no testing so far

11 years agoscript: variable number of params for functions
Andrei Pelinescu-Onciul [Tue, 18 Nov 2008 23:10:46 +0000 (00:10 +0100)]
script: variable number of params for functions

- support for true variable number of parameters module functions
  ( f(sip_msg, param_no, param_array[]) )
- support for functions with 3-6 parameters using kamailio extended
  interface. The implementation is however different: while in kamailio
  all module functions where called with 6 parameters (even if they
  declared only 2), this version will generate different function
  calls (small performance benefit by avoiding unneeded stack pushes
  and register saving for the most common 2 parameter functions and
  works also with other calling conventions).
  For performance reasons, a separate script engine command is now
  generated for each type of function: module functions calls with 0-2
  parameters (MODULE_T), 3 (MODULE3_T), 4 (MODULE4_T), 5 (MODULE5_T)
  and 6 (MODULE6_T) parameters.
  In case of name conflicts with variable param. number function,
  it's undefined which actual function will get executed (it will be
  the "first" one, but the order depends on the module loading order
  a.s.o.).

11 years agomod if: more prototypes and defines
Andrei Pelinescu-Onciul [Tue, 18 Nov 2008 22:59:14 +0000 (23:59 +0100)]
mod if: more prototypes and defines

- prototypes for module (cmd_function) with 3, 4, 5, 6 and
  variable number of parameters added. The 3-6 versions just extend the
  old version with more char* parameters and are kamailio compatible.
  The variable number of parameters function is something new and
  experimental. It takes the sip_msg, the number of extra parameters
  and an array of action_u_t values (the internal routing engine
  parameters representation).

- added a magic value for the parameters numbers, to be used by
  variable parameter functions (VAR_PARAM_NO)

- moved/added the NO_SCRIPT macro (parameters number magic value for
  functions that should not be called from the script) from tm.

11 years agoMerge branch 'module_interface' into mod_f_params
Andrei Pelinescu-Onciul [Tue, 18 Nov 2008 00:13:21 +0000 (01:13 +0100)]
Merge branch 'module_interface' into mod_f_params

* module_interface:
  tm makefile: declare SER_MOD_INTERFACE
  kamailio LM_* compatibility macros
  dual module interface support: ser and kamailio
  kamailio compatibility header files
  added .gitignore
  module interface: minor changes from kamailio

11 years agoadded .gitignore
Andrei Pelinescu-Onciul [Mon, 17 Nov 2008 23:20:30 +0000 (00:20 +0100)]
added .gitignore

- .gitignore containing patterns for all the files that git should
   ignore (from *.o, *.d to config.mak, modules.lst  a.s.o).

11 years agotm makefile: declare SER_MOD_INTERFACE
Andrei Pelinescu-Onciul [Tue, 18 Nov 2008 00:01:18 +0000 (01:01 +0100)]
tm makefile: declare SER_MOD_INTERFACE

11 years agokamailio LM_* compatibility macros
Andrei Pelinescu-Onciul [Mon, 17 Nov 2008 23:58:18 +0000 (00:58 +0100)]
kamailio LM_* compatibility macros

- added  LM_* macros (LM_ERR, LM_BUG a.s.o) for compatibility with
  kamailio (for now they just use ser ERR, BUG ... macros)

11 years agodual module interface support: ser and kamailio
Andrei Pelinescu-Onciul [Mon, 17 Nov 2008 23:48:59 +0000 (00:48 +0100)]
dual module interface support: ser and kamailio

Added support for both ser and kamailio module interfaces: a module
just needs to define its module interface prior to including sr_module.h
(e.g. by adding EXTRA_DEFS+=-DSER_MOD_INTERFACE for a ser module or
 EXTRA_DEFS+=-DKAMAILIO_MOD_INTERFACE to the module Makefile).
This way ser and kamailio modules can be mixed at will with only one
Makefile change.
Under the hood, now each module declares its interface version (by
exporting a global symbol named module_interface_ver) and the internal
module loader and module export finder were updated to take the interface
version into account.
Internally the core works now with a generic module_export_u union.

11 years agokamailio compatibility header files
Andrei Pelinescu-Onciul [Mon, 17 Nov 2008 23:21:51 +0000 (00:21 +0100)]
kamailio compatibility header files

- mi, pvar & statistics basic include files. For now they contain only
  basic type declarations and defines to allow compilation (so you cannot
   use them, but the code will compile).
- pvar needs more work or replacement

11 years agoadded .gitignore
Andrei Pelinescu-Onciul [Mon, 17 Nov 2008 23:20:30 +0000 (00:20 +0100)]
added .gitignore

- .gitignore containing patterns for all the files that git should
   ignore (from *.o, *.d to config.mak, modules.lst  a.s.o).

11 years agomodule interface: minor changes from kamailio
Andrei Pelinescu-Onciul [Mon, 17 Nov 2008 17:21:53 +0000 (18:21 +0100)]
module interface: minor changes from kamailio

- changed callback with no params prototypes from f() into f(void), original
 commit message:
    - sync function definitions with declarations for functions w/o parameters
    - this functions were declared as 'f()', that means they can have a
      arbitrary number of arguments (because of compatibility to the old style
      definitions in the C standard), even if they are defined as f(void)
    - there is no warning reported if somebody call a function like this with
      some parameters
    - another potential problem is, when somebody change the definition to
      accept some parameter, but forgot to change also the declaration. Then
      the compiler will not report wrong usage of this functions too.
    - sometimes ago the '-Wold-style-definition' warning was introduced, the
      definitions get then fixed subsequently, but not all declarations

- added free_fixup_function type definition
- added some doxygen comments

Credits go to: Henning Westerholt <henning.westerholt@1und1.de>

11 years agodoc/NEWS: minor update
Andrei Pelinescu-Onciul [Sun, 16 Nov 2008 18:29:06 +0000 (18:29 +0000)]
doc/NEWS: minor update

- added missing sigio_rt poll method to tcp_poll_method

11 years agomakefile: exclude_modules updated
Andrei Pelinescu-Onciul [Thu, 13 Nov 2008 16:24:41 +0000 (16:24 +0000)]
makefile: exclude_modules updated

- modules no longer on CVS removed
- add some presence modules to list of not compilable modules (pa & rls
 problems with the new DB API)

(see SER-415)

Reported-by: Bogdan Pintea <pintea@iptego.de>
Author: Bogdan Pintea <pintea@iptego.de>
Committer: Andrei Pelinescu-Onciul <andrei@iptel.org>

11 years agomakefile: fix group_modules
Andrei Pelinescu-Onciul [Thu, 13 Nov 2008 16:23:32 +0000 (16:23 +0000)]
makefile: fix group_modules

- make cfg group_include="standard presence"; make all did not make the
presence modules because the excluded list was re-evaluated.
(see SER-415)

Reported-by: Bogdan Pintea <pintea@iptego.de>
11 years agot_suspend() and t_continue() functions are introduced.
Miklos Tirpak [Mon, 10 Nov 2008 12:47:02 +0000 (12:47 +0000)]
t_suspend() and t_continue() functions are introduced.

These fuctions can be used by other modules to implement
asynchronous actions: t_suspend() saves the transaction, returns its
identifiers, and t_continue() continues the SIP request processing.
(The transaction processing does not continue from the same point
in the script, a separate route block defined by the parameter of
t_continue() is executed instead. The reply lock is held during the
route block execution.) FR timer is ticking while the
transaction is suspended, and the transaction's failure route is
executed if t_continue() is not called in time.

Missing: msg lumps are saved by t_suspend() and are not updated by
the subsequent t_relay(). This means that the modifications made
between them are lost.

11 years agosctp: minor fix for sctp_send_reties fixup
Andrei Pelinescu-Onciul [Fri, 7 Nov 2008 21:07:21 +0000 (21:07 +0000)]
sctp: minor fix for sctp_send_reties fixup

- the value too high check was done only if compiled without sctp support
(#ifndef USE_SCTP instead of USE_SCTP)

11 years agotypo fixed
Michal Matyska [Fri, 7 Nov 2008 17:29:46 +0000 (17:29 +0000)]
typo fixed

11 years agosctp: new config option: sctp_send_retries
Andrei Pelinescu-Onciul [Fri, 7 Nov 2008 14:53:35 +0000 (14:53 +0000)]
sctp: new config option: sctp_send_retries

- new ser.cfg option sctp_send_retries + doc

11 years agosctp: send retries option and unordered fix
Andrei Pelinescu-Onciul [Fri, 7 Nov 2008 14:53:04 +0000 (14:53 +0000)]
sctp: send retries option and unordered fix

- added a new option for forcing send retries by attempting to re-open
 the association (useful for example when a peer reboots or performs a
 failover to another host, to avoid loosing the current association send
 queue)
- fix: SCTP_UNORDERED properly set

11 years agosctp: minor spelling & comments changes
Andrei Pelinescu-Onciul [Fri, 7 Nov 2008 14:52:40 +0000 (14:52 +0000)]
sctp: minor spelling & comments changes

11 years agoFixed: IP address in Warning header was not 3261 ABNF compliant
Nils Ohlmeier [Wed, 29 Oct 2008 23:03:22 +0000 (23:03 +0000)]
Fixed: IP address in Warning header was not 3261 ABNF compliant
       (discovered at SIPit23)

11 years agocore: typo fix in ip_addr_loopback()
Andrei Pelinescu-Onciul [Thu, 23 Oct 2008 11:22:19 +0000 (11:22 +0000)]
core: typo fix in ip_addr_loopback()

- compiling ser without -DUSE_IPV6 used to fail because of a misplaced
bracket

11 years agodns: comment addition
Andrei Pelinescu-Onciul [Thu, 23 Oct 2008 11:21:59 +0000 (11:21 +0000)]
dns: comment addition

11 years agoDon't malloc zero-byte string if the replacement string is empty.
Maxim Sobolev [Tue, 21 Oct 2008 03:21:38 +0000 (03:21 +0000)]
Don't malloc zero-byte string if the replacement string is empty.

Sponsored by:   Sippy Software, Inc.
Debugging:      mpatrol

11 years agoIn MDStringArray() don't call MD5Update() on empty elements of array. This
Maxim Sobolev [Tue, 21 Oct 2008 03:10:47 +0000 (03:10 +0000)]
In MDStringArray() don't call MD5Update() on empty elements of array. This
doesn't change checksum, but could cause memory copy to be called with
zero length and/or NULL source/destination.

Sponsored by:   Sippy Software, Inc.
Debugging:      mpatrol

11 years agoIn get_to_uid() throw an error when username is empty. Judging by the
Maxim Sobolev [Tue, 21 Oct 2008 03:05:33 +0000 (03:05 +0000)]
In get_to_uid() throw an error when username is empty. Judging by the
fact that the get_to_uid() is trying to do zero-byte copy and underlying
consumers doing other nasty things such as trying to allocate 0-byte
memory buffer nobody expects this condition to happen.

Sponsored by:   Sippy Software, Inc.
Debugging:      mpatrol

11 years agodns: fix bug when using srv failover, ipv4 and ipv6
Andrei Pelinescu-Onciul [Fri, 17 Oct 2008 19:30:07 +0000 (19:30 +0000)]
dns: fix bug when using srv failover, ipv4 and ipv6

- fix crash during ipv4->ipv6 fallback when doing srv failover and when
listening on both ipv4 and ipv6 addresses (the hostname used in the
 AAAA fallback lookup was null).

Reported by: Nils Ohlmeier <nils@iptel.org>.

11 years agoipv6: avoid using as default socket a loopback addr.
Andrei Pelinescu-Onciul [Thu, 16 Oct 2008 18:02:50 +0000 (18:02 +0000)]
ipv6: avoid using as default socket a loopback addr.

- prefer non-loopback and non-multicast addresses as default sockets for ipv6

11 years agocore: attempt harder to filter loopback addresses
Andrei Pelinescu-Onciul [Thu, 16 Oct 2008 15:17:44 +0000 (15:17 +0000)]
core: attempt harder to filter loopback addresses

- on startup detect not only loopback interfaces (e.g. -l lo) but also
ipv4 and ipv6 loopback addresses (e.g. 127.0.0.1, ::1). This helps filtering
 them out when choosing the default socket for each of the protocols.

11 years agocore: don't force a socket if the dst af is different
Andrei Pelinescu-Onciul [Wed, 15 Oct 2008 14:13:56 +0000 (14:13 +0000)]
core: don't force a socket if the dst af is different

- get_send_socket() will now ignore a forced send socket if the destination
 address family is different from the forced socket (e.g. force ipv6 but
 attempt to send to ipv4). A non-obvious example of a scenario triggering
 this bug is registering over ipv4 an ipv6 contact.
 Reported by: Nils Ohlmeier <nils@iptel.org>

11 years agocore: fix socket list iteration
Andrei Pelinescu-Onciul [Wed, 15 Oct 2008 10:27:47 +0000 (10:27 +0000)]
core: fix socket list iteration

- socket list iteration didn't work properly on ser startup when some
of the protocols where compile-time disabled (no support for them compiled).
Symptomps: ser -l lo -f ser.cfg  prints a BUG message and doesn't start.
- small socket list related cleanups

11 years agosctp: if SCTP support not compiled, next_proto() shouldn't return SCTP
Andrei Pelinescu-Onciul [Tue, 14 Oct 2008 14:13:14 +0000 (14:13 +0000)]
sctp: if SCTP support not compiled, next_proto() shouldn't return SCTP

- minor fix: if no SCTP support was compiled, init_proto_order() didn't
 remove PROTO_SCTP references and this caused a BUG message on ser start

11 years agoCFG_READONLY flag is introduced. Variables marked with this flag
Miklos Tirpak [Mon, 13 Oct 2008 14:09:18 +0000 (14:09 +0000)]
CFG_READONLY flag is introduced. Variables marked with this flag
can be stored in the configuration framework even if they are read-only.

11 years agosctp: if USE_COMP, set comp to none
Andrei Pelinescu-Onciul [Thu, 9 Oct 2008 07:32:59 +0000 (07:32 +0000)]
sctp: if USE_COMP, set comp to none

11 years agosctp: more compatibility changes with old sctp versions
Andrei Pelinescu-Onciul [Tue, 7 Oct 2008 11:23:49 +0000 (11:23 +0000)]
sctp: more compatibility changes with old sctp versions

- warn about missing sctp sockopt at compile time too
- fow now ignore sctp adaption layer events (not supported by lksctp
1.0.6 which unfortunately is still widely used)

11 years agosctp: suggest kernel upgrade if not all the sctp options are supported
Andrei Pelinescu-Onciul [Tue, 7 Oct 2008 11:23:23 +0000 (11:23 +0000)]
sctp: suggest kernel upgrade if not all the sctp options are supported

11 years agosctp: command line options fix
Andrei Pelinescu-Onciul [Tue, 7 Oct 2008 11:22:56 +0000 (11:22 +0000)]
sctp: command line options fix

- some sctp options were untreated in the first getopt() switch, causing ser
to immediately abort() if the options were used

11 years agosctp: support for older sctp libraries and autoclose fix
Andrei Pelinescu-Onciul [Tue, 7 Oct 2008 11:22:43 +0000 (11:22 +0000)]
sctp: support for older sctp libraries and autoclose fix

- try to compile even if the used sctp library doesn't support all the
 sctp socket options that we would like to set, but warn about it both at
 compile time and each time ser is started
- ser -V will print a list of unsupported sctp options (due to missing
support in the sctp library/*.h files that ser was compiled against)
- fix: the autoclose sctp socket option was not properly set (paste typo)

11 years agosctp: added sctp_enable and sctp auto mode
Andrei Pelinescu-Onciul [Tue, 7 Oct 2008 11:22:05 +0000 (11:22 +0000)]
sctp: added sctp_enable and sctp auto mode

- added a new ser.cfg option: sctp_enable = 0|1|2. 0 means disable
 (equivalent with sctp_disable=yes), 1 enable (sctp_disable=no) and
  2 is auto mode (sctp enabled only if supported by the OS).
- sctp is now by default in auto enable mode: enabled if supported by the OS

11 years agodns_*_preference updated to include sctp
Andrei Pelinescu-Onciul [Tue, 7 Oct 2008 11:21:32 +0000 (11:21 +0000)]
dns_*_preference updated to include sctp

11 years agosctp: set TOS and ignore unsuported socket options
Andrei Pelinescu-Onciul [Wed, 1 Oct 2008 17:32:36 +0000 (17:32 +0000)]
sctp: set TOS and ignore unsuported socket options

- set TOS
- ignore non-critical unsuported socket options for better compatibility with
older kernels (e.g. 2.6.18 does not support SCTP_FRAGMENT_INTERLEAVE or
 SCTP_PARTIAL_DELIVERY_POINT)

11 years agosctp: init function for one-to-one sockets
Andrei Pelinescu-Onciul [Wed, 1 Oct 2008 17:32:06 +0000 (17:32 +0000)]
sctp: init function for one-to-one sockets

11 years agosctp: cleanup
Andrei Pelinescu-Onciul [Wed, 1 Oct 2008 17:30:57 +0000 (17:30 +0000)]
sctp: cleanup

sctp_init_sock() broken into several functions (sctp_init_su,
sctp_init_sock_opt_common, sctp_bind_sock), to allow for code reuse
with a future sctp one-to-one implementation.

11 years agoenable is renamed to enabled
Miklos Tirpak [Mon, 15 Sep 2008 15:53:44 +0000 (15:53 +0000)]
enable is renamed to enabled

11 years agoenable is renamed to enabled (enable is a keyword)
Miklos Tirpak [Mon, 15 Sep 2008 15:51:44 +0000 (15:51 +0000)]
enable is renamed to enabled (enable is a keyword)

11 years agoadding debconf options for disabling replication, which were already there but someon...
Pavel Kasparek [Mon, 15 Sep 2008 15:25:10 +0000 (15:25 +0000)]
adding debconf options for disabling replication, which were already there but someone deleted them

11 years agotypo fixed
Pavel Kasparek [Mon, 15 Sep 2008 14:40:47 +0000 (14:40 +0000)]
typo fixed

11 years agoDebian packaging - another attempt to make compilation and installation of modules...
Pavel Kasparek [Mon, 15 Sep 2008 14:24:10 +0000 (14:24 +0000)]
Debian packaging - another attempt to make compilation and installation of modules work again: reverting back to using of group_include and adding cleaning of saved config and saved module list before every call to make

11 years agoDebian packaging - added make modules
Pavel Kasparek [Mon, 15 Sep 2008 13:43:57 +0000 (13:43 +0000)]
Debian packaging - added make modules

11 years agoDebian packaging - replacing using of include_modules by modules
Pavel Kasparek [Mon, 15 Sep 2008 13:34:00 +0000 (13:34 +0000)]
Debian packaging - replacing using of include_modules by modules

11 years agoDebian packaging - trying to make modules installation work again, it installs lot...
Pavel Kasparek [Mon, 15 Sep 2008 12:56:27 +0000 (12:56 +0000)]
Debian packaging - trying to make modules installation work again, it installs lot of other modules not specified using include_modules=".."

11 years agoDebian packaging - forgotten " removed
Pavel Kasparek [Mon, 15 Sep 2008 12:03:19 +0000 (12:03 +0000)]
Debian packaging - forgotten " removed

11 years agoDebian packaging - fixed wrong format of variables assignment
Pavel Kasparek [Mon, 15 Sep 2008 12:01:24 +0000 (12:01 +0000)]
Debian packaging - fixed wrong format of variables assignment

11 years agoDebian packaging - replacing inclusion of modules by group by listing them individually
Pavel Kasparek [Mon, 15 Sep 2008 11:57:27 +0000 (11:57 +0000)]
Debian packaging - replacing inclusion of modules by group by listing them individually

11 years agoDebian packaging changes:
Pavel Kasparek [Mon, 15 Sep 2008 10:11:53 +0000 (10:11 +0000)]
Debian packaging changes:
- removing make proper in libs, which is done by main make proper anyway
- adding more modules to list of excluded modules (temporary hack until group inclusion of modules to compile works)

11 years agoremoving avpops module from list of standard modules, as it is unmaintained and all...
Pavel Kasparek [Mon, 15 Sep 2008 09:25:41 +0000 (09:25 +0000)]
removing avpops module from list of standard modules, as it is unmaintained and all the AVP functionality is already in the core

11 years agoadding debconf option for enabling/disabling rtp proxy
Pavel Kasparek [Mon, 15 Sep 2008 07:59:25 +0000 (07:59 +0000)]
adding debconf option for enabling/disabling rtp proxy

11 years agortp_proxy.enable configuration option is introduced, the following
Miklos Tirpak [Fri, 12 Sep 2008 11:01:19 +0000 (11:01 +0000)]
rtp_proxy.enable configuration option is introduced, the following
values are supported:
"0" -- disable
"1" -- enable
"detect" -- detect whether the UAC or the UAS is behind NAT, and enable
the RTP Proxy when necessary

WARNING: disabling the RTP Proxy runtime may leave the RTP sessions
being proxied unmaintained.