Module: kamailio
Branch: master
Commit: c89fe41b1583af74cdf7e20d2357d7c90990839f
URL: https://github.com/kamailio/kamailio/commit/c89fe41b1583af74cdf7e20d2357d7c…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-02-14T15:20:35+08:00
db_mysql: fix typos
The option opt_ssl_ca is a string not integer.
The comment for ea81e6cb should show the code fix as
mysql_options(ptr->con, MYSQL_OPT_SSL_CA, (void *)db_mysql_opt_ssl_ca)
-…
[View More]--
Modified: src/modules/db_mysql/doc/db_mysql_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c89fe41b1583af74cdf7e20d2357d7c…
Patch: https://github.com/kamailio/kamailio/commit/c89fe41b1583af74cdf7e20d2357d7c…
---
diff --git a/src/modules/db_mysql/doc/db_mysql_admin.xml b/src/modules/db_mysql/doc/db_mysql_admin.xml
index 7297f2d1b15..18c703838ce 100644
--- a/src/modules/db_mysql/doc/db_mysql_admin.xml
+++ b/src/modules/db_mysql/doc/db_mysql_admin.xml
@@ -219,7 +219,7 @@ modparam("db_mysql", "opt_ssl_mode", 1)
</example>
</section>
<section id="db_mysql.p.opt_ssl_ca">
- <title><varname>opt_ssl_ca</varname> (integer)</title>
+ <title><varname>opt_ssl_ca</varname> (string)</title>
<para>
Configures the CA certs used to verify the MySQL server cert when
SSL is enabled.
[View Less]
Module: kamailio
Branch: master
Commit: a61bfe9fb8357cedf5cb22e2698ec5d817fcfe5a
URL: https://github.com/kamailio/kamailio/commit/a61bfe9fb8357cedf5cb22e2698ec5d…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2024-02-14T08:16:19+01:00
modules: readme files regenerated - db_mysql ... [skip ci]
---
Modified: src/modules/db_mysql/README
---
Diff: https://github.com/kamailio/kamailio/commit/…
[View More]a61bfe9fb8357cedf5cb22e2698ec5d…
Patch: https://github.com/kamailio/kamailio/commit/a61bfe9fb8357cedf5cb22e2698ec5d…
---
diff --git a/src/modules/db_mysql/README b/src/modules/db_mysql/README
index 8e135cdcbf2..17f8795581a 100644
--- a/src/modules/db_mysql/README
+++ b/src/modules/db_mysql/README
@@ -32,6 +32,7 @@ Daniel-Constantin Mierla
3.5. insert_delayed (integer)
3.6. update_affected_found (integer)
3.7. opt_ssl_mode (integer)
+ 3.8. opt_ssl_ca (integer)
4. Functions
5. Installation
@@ -46,9 +47,10 @@ Daniel-Constantin Mierla
1.5. Set insert_delayed parameter
1.6. Set update_affected_found parameter
1.7. Set opt_ssl_mode parameter
- 1.8. Set a my.cnf group in db_url parameter
- 1.9. Adding a kamailio group to my.cnf
- 1.10. Using [client] and specific group
+ 1.8. Set opt_ssl_ca parameter
+ 1.9. Set a my.cnf group in db_url parameter
+ 1.10. Adding a kamailio group to my.cnf
+ 1.11. Using [client] and specific group
Chapter 1. Admin Guide
@@ -69,6 +71,7 @@ Chapter 1. Admin Guide
3.5. insert_delayed (integer)
3.6. update_affected_found (integer)
3.7. opt_ssl_mode (integer)
+ 3.8. opt_ssl_ca (integer)
4. Functions
5. Installation
@@ -107,6 +110,7 @@ Chapter 1. Admin Guide
3.5. insert_delayed (integer)
3.6. update_affected_found (integer)
3.7. opt_ssl_mode (integer)
+ 3.8. opt_ssl_ca (integer)
3.1. ping_interval (integer)
@@ -212,6 +216,21 @@ modparam("db_mysql", "update_affected_found", 1)
modparam("db_mysql", "opt_ssl_mode", 1)
...
+3.8. opt_ssl_ca (integer)
+
+ Configures the CA certs used to verify the MySQL server cert when SSL
+ is enabled.
+
+ Required when opt_ssl_mode = 4 or 5 and db_mysql is built with
+ libmysqlclient.
+
+ Default value is NULL (NULL - not configured).
+
+ Example 1.8. Set opt_ssl_ca parameter
+...
+modparam("db_mysql", "opt_ssl_ca", "/etc/ssl/certs/mysql-ca.pem")
+...
+
4. Functions
No function exported to be used from configuration file.
@@ -238,12 +257,12 @@ modparam("db_mysql", "opt_ssl_mode", 1)
* mysql://user:pass@[group]/db
* mysql://[group]/db
- Example 1.8. Set a my.cnf group in db_url parameter
+ Example 1.9. Set a my.cnf group in db_url parameter
...
modparam("usrloc", "db_url", "mysql://[kamailio]/kamailio)
...
- Example 1.9. Adding a kamailio group to my.cnf
+ Example 1.10. Adding a kamailio group to my.cnf
...
[kamailio]
socket = /path/to/mysql.sock
@@ -257,7 +276,7 @@ default-character-set = utf8
both your specific group and the client group, then the value is taken
from the last one.
- Example 1.10. Using [client] and specific group
+ Example 1.11. Using [client] and specific group
...
[client]
socket = /run/mysql/mysqld.sock
[View Less]
Hello all,
Following up on this, I made a patch (attached), could you please review
and apply if it looks ok?
The patch creates a new core cfg variable which, if set, will reject any
incoming NEW tcp connection attempt, so we can use this to gracefully drain
kamailio.
Thanks & Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Forwarded Conversation
Subject: Reject TCP SYN
------------------------
From: David Villasmil <david.villasmil.work(a)gmail.…
[View More]com>
Date: Thu, Feb 8, 2024 at 2:27 PM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Hello all,
Is there any way of actually rejecting (RST) NEW tcp connection attempts,
while allowing the ongoing ones to finish naturally?
I’m thinking maybe we can add this feature?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
----------
From: Henning Westerholt <hw(a)gilawa.com>
Date: Fri, Feb 9, 2024 at 2:08 PM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Cc: David Villasmil <david.villasmil.work(a)gmail.com>
Hello,
what about e.g. just using something like iptables, nftables etc..?
iptables -A INPUT -p tcp --syn --destination-port <port> -j REJECT
--reject-with icmp-host-prohibited
Cheers,
Henning
----------
From: David Villasmil <david.villasmil.work(a)gmail.com>
Date: Fri, Feb 9, 2024 at 2:42 PM
To: Henning Westerholt <hw(a)gilawa.com>
Cc: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Hey, Henning, yeah I thought about that, but thought that maybe there was a
better way to do it via Kamailio
Thanks!
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
[View Less]