The Samba-Bugzilla – Attachment 17085 Details for
Bug 14934
kill_tcp_connections does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-15-test, v4-14-test
BZ14934.patch (text/plain), 1.20 KB, created by
Martin Schwenke
on 2022-01-14 00:03:41 UTC
(
hide
)
Description:
Patch for v4-15-test, v4-14-test
Filename:
MIME Type:
Creator:
Martin Schwenke
Created:
2022-01-14 00:03:41 UTC
Size:
1.20 KB
patch
obsolete
>From 60c1e1a19adb091b8e9e0a22ba95cc19ccd82776 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Thu, 23 Dec 2021 11:52:38 +0100 >Subject: [PATCH] ctdb-protocol: Allow rfc5952 "[2001:db8::1]:80" ipv6 notation > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=14934 >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Martin Schwenke <martin@meltin.net> >(cherry picked from commit 224e99804efef960ef4ce2ff2f4f6dced1e74146) >--- > ctdb/protocol/protocol_util.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > >diff --git a/ctdb/protocol/protocol_util.c b/ctdb/protocol/protocol_util.c >index 2d0a6f33038..3eea95a274e 100644 >--- a/ctdb/protocol/protocol_util.c >+++ b/ctdb/protocol/protocol_util.c >@@ -240,6 +240,19 @@ static int ip_from_string(const char *str, ctdb_sock_addr *addr) > uint8_t ipv4_mapped_prefix[12] = { > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff > }; >+ size_t len = strlen(str); >+ char s[64]; >+ >+ len = strlcpy(s, str, sizeof(s)); >+ if (len >= sizeof(s)) { >+ return EINVAL; >+ } >+ >+ if ((len >= 2) && (s[0] == '[') && (s[len-1] == ']')) { >+ s[len-1] = '\0'; >+ str = s+1; >+ p = strrchr(str, ':'); >+ } > > ret = ipv6_from_string(str, &addr->ip6); > if (ret != 0) { >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 14934
:
17064
|
17069
| 17085