Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH 0/3] Commonise address any check
Date: Tue,  6 Feb 2018 11:44:29 +0200	[thread overview]
Message-ID: <20180206094432.12761-1-sagi@grimberg.me> (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).

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

             reply	other threads:[~2018-02-06  9:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06  9:44 Sagi Grimberg [this message]
2018-02-06  9:44 ` [PATCH 1/3] net/utils: Introduce inet_addr_is_any Sagi Grimberg
2018-02-06 14:42   ` David Miller
2018-02-06 15:27   ` Bart Van Assche
2018-02-06  9:44 ` [PATCH 2/3] nvmet: don't return "any" ip address in discovery log page Sagi Grimberg
2018-02-06 10:36   ` Johannes Thumshirn
2018-02-06  9:44 ` [PATCH 3/3] iscsi-target: use common inet_addr_is_any Sagi Grimberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180206094432.12761-1-sagi@grimberg.me \
    --to=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox