Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Commonise address any check
@ 2018-02-07 13:05 Sagi Grimberg
  2018-02-07 13:05 ` [PATCH v2 1/3] net/utils: Introduce inet_addr_is_any Sagi Grimberg
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sagi Grimberg @ 2018-02-07 13:05 UTC (permalink / raw)


Both iscsit and nvmet need to check the listening endpoint
portal is not INADDR_ANY (or IN6ADDR_ANY_INIT) when replying
to a discovery information query (iscsi sendtaragets or nvmet
discovery log pages). If indeed the nvmet port or iscsit portal
are listening on any address, they need to return the source
address of the socket that carried the query itslef.

iscsit already does this while nvmet did not.
instead of copying the inaddr_any check, place it in net-utils
and call it from both (patches 1+3).

In addition, fix the behavior in nvmet (patch 2).

Changes from v1:
- small alignment fix in inet_addr_is_any
- warn if got unexpected address family
- make in6_any static

Sagi Grimberg (3):
  net/utils: Introduce inet_addr_is_any
  nvmet: don't return "any" ip address in discovery log page
  iscsi-target: use common inet_addr_is_any

 drivers/nvme/target/discovery.c     | 30 +++++++++++++++++++++++++++---
 drivers/nvme/target/nvmet.h         |  2 ++
 drivers/nvme/target/rdma.c          | 18 ++++++++++++++++++
 drivers/target/iscsi/iscsi_target.c | 28 ++--------------------------
 include/linux/inet.h                |  1 +
 net/core/utils.c                    | 23 +++++++++++++++++++++++
 6 files changed, 73 insertions(+), 29 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-08  8:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-07 13:05 [PATCH v2 0/3] Commonise address any check Sagi Grimberg
2018-02-07 13:05 ` [PATCH v2 1/3] net/utils: Introduce inet_addr_is_any Sagi Grimberg
2018-02-07 19:24   ` Bart Van Assche
2018-02-07 13:05 ` [PATCH v2 2/3] nvmet: don't return "any" ip address in discovery log page Sagi Grimberg
2018-02-07 13:05 ` [PATCH v2 3/3] iscsi-target: use common inet_addr_is_any Sagi Grimberg
2018-02-07 19:26   ` Bart Van Assche
2018-02-08  8:12   ` Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox