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 <haowenchao@huawei.com>
This commit is contained in:
Wenchao Hao 2022-09-02 10:13:34 +08:00
parent 425ce36a19
commit 828417a1d5
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From c87b55dac84ac0702ef55345edf019cccf0c62d6 Mon Sep 17 00:00:00 2001
From: Wenchao Hao <haowenchao@huawei.com>
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 <haowenchao@huawei.com>
---
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

View File

@ -1,6 +1,6 @@
Name: open-isns
Version: 0.101
Release: 2
Release: 3
Summary: The iSNS server and client programs
License: LGPLv2+
URL: https://www.github.com/open-iscsi/open-isns
@ -8,6 +8,7 @@ Source0: https://www.github.com/open-iscsi/open-isns/archive/v%{version}.
Patch0001: 0001-Do-not-install-isnsd.socket-in-isnsd.service.patch
Patch0002: 0002-isnsadm-Fix-unparse-command-line-options-V-and-r.patch
Patch0003: 0003-isnsd-socket-Make-sure-to-create-IPv6-socket-default.patch
BuildRequires: gcc systemd automake autoconf make
BuildRequires: openssl-devel systemd-devel
@ -96,6 +97,9 @@ install -p -m 644 isnsd.service %{buildroot}%{_unitdir}/isnsd.service
%{_mandir}/man8/*
%changelog
* Fri Sep 2 2022 Wenchao Hao <haowenchao@huawei.com> - 0.101-3
- isnsd: socket: Make sure to isnsd would listen IPv6 socket default
* Sat Aug 13 2022 Wenchao Hao <haowenchao@huawei.com> - 0.101-2
- Backport patches to fix unparsed parameters