With OpenWrt default awk - so awk from busybox - the filter is broken,
causing jsonrpc calls to fail, i.e. when running "kamctl ps". Below
patch makes the filter portable. Patch was already accepted upstream.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with
an invalid Via header causes a segmentation fault and crashes Kamailio. The
reason is missing input validation in the crcitt_string_array core function
for calculating a CRC hash for To tags. (An additional error is present in
the check_via_address core function: this function also misses input
validation.) This could result in denial of service and potentially the
execution of arbitrary code.
Patch from upstream.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
CVE-2018-14767: "In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a
crafted SIP message with a double "To" header and an empty "To" tag
causes a segmentation fault and crash. The reason is missing input
validation in the "build_res_buf_from_sip_req" core function. This could
result in denial of service and potentially the execution of arbitrary
code."
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The module list is necessary, unfortunately. But having working
PKG_CONFIG_DEPENDS is nice and the list rarely needs updating.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- The libraries and the Berkeley DB recovery utility are currently in
Libraries/Telephony and Utilities/Telephony. That makes little sense
as the are not general purpose libraries/utilities, hence it is better
to move them to where Kamailio 5 sits in menuconfig.
- Rename them by adding prefixes "lib" and "util" to their name.
- Update their titles a bit.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The recently added mod-db-berkeley comes with a companion utility.
Package kambdb_recover so it becomes available.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit moves libkamailio-ims & libtrie into their own packages to
keep the main package small.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
kamailio comes with internal libraries. Some are not built when only the
standard group of modules is compiled (i.e. no modules selected in
menuconfig).
The problem is that there is no way to rely on specific internal
libraries being available in the main kamailio package.
To fix this this add some modules (if they are not already selected)
that will kick of the build of the internal libraries in any case.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The INSTALL file from kamailio suggests to make the target "cfg" first.
All settinggs will then be reused when make is called again.
This has the side effect that "$(FPIC)" can be dropped from CFLAGS as
the build system adds the flags automatically now.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
When not specifying "run_target" the kamailio build system assumes
$(DESTDIR)/var/run/kamailio to be the run directory on the target
device. Add the variable to address this.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The kamailio build system provides an RPATH "///usr/lib/kamailio/" when
linking. OpenWrt's rstrip.sh inspects this RPATH and drops it. Now the
modules cannot find the needed libraries. Fix this by specifying a path
that rstrip.sh accepts.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The initial commit for this plugin missed that it comes with a
configuration file and extra files that go into
/usr/share/kamailio/xhttp_pi.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This installs the snmp mibs files provided by mod_snmpstats. A patch is
added to make the kamailio build system install the files in a proper
location in PKG_INSTALL_DIR.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The aim is to add the missing modules that Debian packages, minus the
ones for which depends are missing on OpenWrt.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- add install/conffile routine
- use it for main package
- setup BuildKamailio5Module to allow inclusion of configuration files
on a per-module basis (mod-tls is currently the only user)
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- dictionary.kamailio & kamailio-basic.cfg are gone, remove from
Makefilei accordingly
- Install the config files from PKG_INSTALL_DIR
- Use $(INSTALL_CONF) for config files
- Remove gratuitous directory creation
- Refresh 050-fix-kamailio-utils.patch
- Remove src/modules/cnxcc/Makefile change from 120-libevent-libs.patch
as $(EXTRA_LIBS) has been removed from Makefile in previous commit
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- Removes TLS_HOOKS as this is default anyway
- Removes -DUSE_PTHREAD_MUTEX as on supported arches FAST_LOCK is used
by default, which according to doc/tutorials/locking.txt is fastest.
-DUSE_PTHREAD_MUTEX will be set by the build system automatically in
case FAST_LOCK is unsupported, e.g. on ARC.
- Add OpenWrt LDFLAGS via LD_EXTRA_OPTS.
- With OpenWrt LDFLAGS and CPPFLAGS in place there is no need to declare
PCREDEFS, PCRELIBS nor EXTRA_LIBS. Remove them all.
- With this setup mod-dialplan now links to libpcre as well; add the
depend accordingly.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently three copies of every library are installed. Save space by
installing symbolic links instead.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Pass CPPFLAGS in the CFLAGS as otherwise the build system will ignore
them.
This way FORTIFY_SOURCE headers are passed to the compiler.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently INCL_MODULES is filled with all modules. This commit changes
this so that only the modules that are selected are added to it.
To further limit the number of modules built group_include="standard" is
added. This way only the modules of the standard group plus the modules
selected in menuconfig are built. The "standard" group only includes
modules without any depends.
This fixes build failures on targets where not all depends are
available, i.e. postgresql on ARC. Now these modules can be properly
prevented from being built.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently the Makefile pulls in depends even for packages which are not
selected. Fix this by prefixing the depends with the respective
PACKAGE_* item.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Adding KAM_MODULES variable is not needed. Remove it and call
BuildPackage from BuildKamailio5Module instead. For this to work
PKG_MAKE_ARGS and Build/Compile need to be moved up, before the module
evals.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>