Skip to content

Commit

Permalink
modules: readme files regenerated - blst ... [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kamailio-dev committed Oct 30, 2020
1 parent f294b39 commit 2a7d744
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
44 changes: 22 additions & 22 deletions src/modules/blst/README
@@ -1,4 +1,4 @@
Blst Module - Blacklist Management
Blst Module - Blocklist Management

Andrei Pelinescu-Onciul

Expand All @@ -17,7 +17,7 @@ Andrei Pelinescu-Onciul
2.1. blst_add([timeout])
2.2. blst_add_retry_after(min, max)
2.3. blst_del()
2.4. blst_is_blacklisted()
2.4. blst_is_blocklisted()
2.5. blst_set_ignore([flags])
2.6. blst_rpl_set_ignore([flags])
2.7. blst_clear_ignore([flags])
Expand All @@ -28,7 +28,7 @@ Andrei Pelinescu-Onciul
1.1. blst_add usage
1.2. blst_add_retry_after usage
1.3. blst_del usage
1.4. blst_is_blacklisted usage
1.4. blst_is_blocklisted usage
1.5. blst_set_ignore usage
1.6. blst_clear_ignore usage

Expand All @@ -42,44 +42,44 @@ Chapter 1. Admin Guide
2.1. blst_add([timeout])
2.2. blst_add_retry_after(min, max)
2.3. blst_del()
2.4. blst_is_blacklisted()
2.4. blst_is_blocklisted()
2.5. blst_set_ignore([flags])
2.6. blst_rpl_set_ignore([flags])
2.7. blst_clear_ignore([flags])
2.8. blst_rpl_clear_ignore([flags])

1. Overview

This module exports blacklist related functions to the script.
This module exports blocklist related functions to the script.

2. Functions

2.1. blst_add([timeout])
2.2. blst_add_retry_after(min, max)
2.3. blst_del()
2.4. blst_is_blacklisted()
2.4. blst_is_blocklisted()
2.5. blst_set_ignore([flags])
2.6. blst_rpl_set_ignore([flags])
2.7. blst_clear_ignore([flags])
2.8. blst_rpl_clear_ignore([flags])

2.1. blst_add([timeout])

Adds the source of the current message to the blacklist for timeout
seconds. If timeout is missing or 0 it uses the default blacklist
timeout (dst_blacklist_expire).
Adds the source of the current message to the blocklist for timeout
seconds. If timeout is missing or 0 it uses the default blocklist
timeout (dst_blocklist_expire).

Example 1.1. blst_add usage
...
if (src_ip==10.0.0.0/9)
blst_add(30); # 30 s
else
blst_add(); # use default blacklist timeout
blst_add(); # use default blocklist timeout
...

2.2. blst_add_retry_after(min, max)

Adds the source of the current message to the blacklist for the time
Adds the source of the current message to the blocklist for the time
interval specified in the Retry-After header. If the Retry-After header
is missing, it will fail (returns false). If the Retry-After value is
less than min, then min seconds will be used instead. If the
Expand All @@ -89,39 +89,39 @@ else
Example 1.2. blst_add_retry_after usage
...
# on_reply route
if (msg_status==503){ # blacklist 503 source for Retry-After seconds
if (msg_status==503){ # blocklist 503 source for Retry-After seconds
if (! blst_add_retry_after(30, 3600))
blst_add(60); # if no retry_after header add it for 60s
}
...

2.3. blst_del()

Removes the source of the current message from the blacklist. If the
address is not present in the blacklist at the time of the call it
Removes the source of the current message from the blocklist. If the
address is not present in the blocklist at the time of the call it
returns false.

Example 1.3. blst_del usage
...
blst_del();
...

2.4. blst_is_blacklisted()
2.4. blst_is_blocklisted()

Returns true if the source of the current message is blacklisted.
Returns true if the source of the current message is blocklisted.

Example 1.4. blst_is_blacklisted usage
Example 1.4. blst_is_blocklisted usage
...
if (blst_is_blacklisted()){
log("message from a blacklisted source");
if (blst_is_blocklisted()){
log("message from a blocklisted source");
drop;
}
...

2.5. blst_set_ignore([flags])

Set errors that will not be taken into account when deciding whether to
blacklist a destination for the current message or a local reply to the
blocklist a destination for the current message or a local reply to the
current message.

blst_set_ignore(..) works for forwarding the current message and
Expand All @@ -143,7 +143,7 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds
Note

TCP and TLS send and connect errors are handled per connection and not
per message. The connection blacklist ignore flags are inherited from
per message. The connection blocklist ignore flags are inherited from
the message that caused the connection establishment.

Example 1.5. blst_set_ignore usage
Expand All @@ -157,7 +157,7 @@ Note

2.7. blst_clear_ignore([flags])

Clears blacklist ignore flags previously set by the corresponding
Clears blocklist ignore flags previously set by the corresponding
blst_set_ignore(...) or blst_rpl_set_ignore(...) functions.

See also blst_set_ignore.
Expand Down
24 changes: 12 additions & 12 deletions src/modules/tm/README
Expand Up @@ -1002,13 +1002,13 @@ modparam("tm", "ac_extra_hdrs", "myfavoriteheaders-")

3.16. blst_503 (integer)

If set and the Kamailio blacklist support is enabled, every 503 reply
source is added to the blacklist. The initial blacklist timeout (or
If set and the Kamailio blocklist support is enabled, every 503 reply
source is added to the blocklist. The initial blocklist timeout (or
ttl) depends on the presence of a "Retry-After" header in the reply and
the values of the following tm parameters: blst_503_def_timeout,
blst_503_min_timeout and blst_503_max_timeout.

WARNING:blindly allowing 503 blacklisting could be very easily
WARNING:blindly allowing 503 blocklisting could be very easily
exploited for DOS attacks in most network setups.

The default value is 0 (disabled due to the reasons above).
Expand All @@ -1025,7 +1025,7 @@ modparam("tm", "blst_503", 1)
blst_503_max_timeout.

The default value is 0, which means that if no "Retry-After" header is
present, the 503 reply source will not be blacklisted (RFC 3261
present, the 503 reply source will not be blocklisted (RFC 3261
conformant behaviour).

Example 1.17. Set blst_503_def_timeout parameter
Expand All @@ -1035,7 +1035,7 @@ modparam("tm", "blst_503_def_timeout", 120)

3.18. blst_503_min_timeout (integer)

Minimum blacklist interval in seconds for a 503 reply with a
Minimum blocklist interval in seconds for a 503 reply with a
"Retry-After" header. It will be used if the "Retry-After" value is
smaller than this value.

Expand All @@ -1050,7 +1050,7 @@ modparam("tm", "blst_503_min_timeout", 30)

3.19. blst_503_max_timeout (integer)

Maximum blacklist interval in seconds for a 503 reply with a
Maximum blocklist interval in seconds for a 503 reply with a
"Retry-After header". It will be used if the "Retry-After" value is
greater than this limit.

Expand All @@ -1065,8 +1065,8 @@ modparam("tm", "blst_503_max_timeout", 604800)

3.20. blst_methods_add (unsigned integer)

Bitmap of method types that trigger blacklisting on transaction
timeouts. (This setting has no effect on blacklisting because of send
Bitmap of method types that trigger blocklisting on transaction
timeouts. (This setting has no effect on blocklisting because of send
failures.)

The following values are associated to the request methods: INVITE=1,
Expand All @@ -1076,21 +1076,21 @@ modparam("tm", "blst_503_max_timeout", 604800)

Change the value carefully, because requests that doesn't get a
provisional response (everything but INVITE) can easily cause the next
hop to be inserted into the blacklist by mistake. For example the next
hop to be inserted into the blocklist by mistake. For example the next
hop is a proxy, it is alive, but waiting for the response of the UAS,
and has higher fr_timer value.

The default value is 1, only INVITEs trigger blacklisting
The default value is 1, only INVITEs trigger blocklisting

Example 1.20. Set blst_methods_add parameter
...
# INVITEs and REGISTERs trigger blacklisting
# INVITEs and REGISTERs trigger blocklisting
modparam("tm", "blst_methods_add", 33)
...

3.21. blst_methods_lookup (unsigned integer)

Bitmap of method types that are looked-up in the blacklist before being
Bitmap of method types that are looked-up in the blocklist before being
forwarded statefully. See also blst_methods_add

The default value is 4294967287, every method type except BYE. (We try
Expand Down

0 comments on commit 2a7d744

Please sign in to comment.