From 5e852aed9249b3bfd0998aeb8fa8753bc9e1245c Mon Sep 17 00:00:00 2001 From: Wenchao Hao Date: Fri, 2 Sep 2022 10:13:34 +0800 Subject: [PATCH] isnsd: socket: Make sure to isnsd would listen IPv6 socket default As described in isnsd's manual, if not explictly specified, the isnsd should listen IPv6 address as default. Signed-off-by: Wenchao Hao (cherry picked from commit 2748d0c5338df1779cbd25aa7ff38cb13d9554c1) --- ...e-sure-to-create-IPv6-socket-default.patch | 30 +++++++++++++++++++ open-isns.spec | 7 +++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0007-isnsd-socket-Make-sure-to-create-IPv6-socket-default.patch diff --git a/0007-isnsd-socket-Make-sure-to-create-IPv6-socket-default.patch b/0007-isnsd-socket-Make-sure-to-create-IPv6-socket-default.patch new file mode 100644 index 0000000..4ad236d --- /dev/null +++ b/0007-isnsd-socket-Make-sure-to-create-IPv6-socket-default.patch @@ -0,0 +1,30 @@ +From c87b55dac84ac0702ef55345edf019cccf0c62d6 Mon Sep 17 00:00:00 2001 +From: Wenchao Hao +Date: Mon, 29 Aug 2022 22:40:46 +0800 +Subject: [PATCH] isnsd: socket: Make sure to create IPv6 socket default + +As described in isnsd's manual, if not explictly specified, the isnsd +should listen IPv6 address as default. + +Signed-off-by: Wenchao Hao +--- + isnsd.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/isnsd.c b/isnsd.c +index 6c41c30..4031b51 100644 +--- a/isnsd.c ++++ b/isnsd.c +@@ -29,7 +29,8 @@ enum { + }; + + static const char * opt_configfile = ISNS_DEFAULT_ISNSD_CONFIG; +-static int opt_af = AF_UNSPEC; ++static int opt_af = AF_INET6; // should be AF_INET6 as described in isnsd's manual ++ + static int opt_mode = MODE_NORMAL; + static int opt_foreground = 0; + +-- +2.27.0 + diff --git a/open-isns.spec b/open-isns.spec index 49c7d75..59ef606 100644 --- a/open-isns.spec +++ b/open-isns.spec @@ -1,6 +1,6 @@ Name: open-isns Version: 0.100 -Release: 9 +Release: 10 Summary: The iSNS server and client programs License: LGPLv2+ URL: https://www.github.com/open-iscsi/open-isns @@ -12,7 +12,7 @@ Patch3: 0003-Fix-586-compile-issue-and-remove-Werror.patch Patch4: 0004-Do-not-install-isnsd.socket-in-isnsd.service.patch Patch5: 0005-libisns-remove-sighold-and-sigrelse.patch Patch6: 0006-isnsadm-Fix-unparse-command-line-options-V-and-r.patch - +Patch7: 0007-isnsd-socket-Make-sure-to-create-IPv6-socket-default.patch BuildRequires: gcc systemd automake autoconf make BuildRequires: openssl-devel systemd-devel @@ -101,6 +101,9 @@ install -p -m 644 isnsd.service %{buildroot}%{_unitdir}/isnsd.service %{_mandir}/man8/* %changelog +* Fri Sep 2 2022 Wenchao Hao - 0.101-3 +- isnsd: socket: Make sure to isnsd would listen IPv6 socket default + * Sat Aug 13 2022 Wenchao Hao - 0.100-9 - Backport patches to fix unparsed parameters -- Gitee