The Samba-Bugzilla – Attachment 17064 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
bug-14934.patch (text/plain), 1.14 KB, created by
Volker Lendecke
on 2021-12-23 12:35:51 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2021-12-23 12:35:51 UTC
Size:
1.14 KB
patch
obsolete
>From 79b27fd9ec69b6b96ad75387f9aa47c963302f55 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: 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> >--- > ctdb/protocol/protocol_util.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/ctdb/protocol/protocol_util.c b/ctdb/protocol/protocol_util.c >index 2d0a6f33038..42b50906b73 100644 >--- a/ctdb/protocol/protocol_util.c >+++ b/ctdb/protocol/protocol_util.c >@@ -200,12 +200,24 @@ static int ipv4_from_string(const char *str, struct sockaddr_in *ip) > > static int ipv6_from_string(const char *str, struct sockaddr_in6 *ip6) > { >+ size_t len = strlen(str); >+ char s[64]; > int ret; > > *ip6 = (struct sockaddr_in6) { > .sin6_family = AF_INET6, > }; > >+ 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; >+ } >+ > ret = inet_pton(AF_INET6, str, &ip6->sin6_addr); > if (ret != 1) { > return EINVAL; >-- >2.30.2 >
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
Actions:
View
Attachments on
bug 14934
:
17064
|
17069
|
17085