]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Remove superseded compatibility code
authorMartin Schwenke <mschwenke@ddn.com>
Mon, 23 Oct 2023 03:23:45 +0000 (14:23 +1100)
committerJule Anger <janger@samba.org>
Mon, 25 Nov 2024 12:39:11 +0000 (12:39 +0000)
Since commit 224e99804efef960ef4ce2ff2f4f6dced1e74146, 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 32e4f786601712e57992ce4c8f46e5d38620a5dd)

ctdb/config/functions

index 45092cda26ef504194a9e84f65a460c443a50c9d..34382c465e0d334c07ce0f8ce03d583ba17ffb7c 100755 (executable)
@@ -1173,16 +1173,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