1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00

ctdb-scripts: Remove superseded compatibility code

Since commit 224e99804e, square brackets
have been parsed by daemon and tool code, so drop the compatibility
code from here.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15320
RN: Update CTDB to track all TCP connections to public IP addresses

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jerry Heyman <jheyman@ddn.com>
(cherry picked from commit 32e4f78660)
This commit is contained in:
Martin Schwenke 2023-10-23 14:23:45 +11:00 committed by Jule Anger
parent 0a571a6dbe
commit 5920d47149

View File

@ -1200,16 +1200,10 @@ update_tickles()
_my_connections="${tickledir}/${_port}.connections.$$"
# Parentheses are needed around the filters for precedence but
# the parentheses can't be empty!
#
# Recent versions of ss print square brackets around IPv6
# addresses. While it is desirable to update CTDB's address
# parsing and printing code, something needs to be done here
# for backward compatibility, so just delete the brackets.
ss -tn state established \
"${_ip_filter:+( ${_ip_filter} )}" \
"${_port_filter:+( ${_port_filter} )}" |
awk 'NR > 1 {print $4, $3}' |
tr -d '][' |
sort >"$_my_connections"
# Record our current tickles in a temporary file