DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Jakub Grajciar <jgrajcia@cisco.com>, dev@dpdk.org
Cc: stephen@networkplumber.org
Subject: Re: [dpdk-dev] [PATCH] net/memif: fix invalid unix domain address length
Date: Tue, 22 Oct 2019 17:32:54 +0100	[thread overview]
Message-ID: <0320dd0c-eb8a-f3e8-2a9c-29fcb911e5c2@intel.com> (raw)
In-Reply-To: <20191022160829.21664-1-jgrajcia@cisco.com>

On 10/22/2019 5:08 PM, Jakub Grajciar wrote:
> Define MEMIF_SOCKET_UN_SIZE to size of unix domain socket address.
> Report error in case of longer path.
> 
> Fixes: b923866c6974 ("net/memif: allow for full key size in socket name")
> Cc: stephen@networkplumber.org
> 
> Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>

<...>

> +  if (strlen(filename) != MEMIF_SOCKET_UN_SIZE) {
> +		MIF_LOG(ERR, "Unix socket address too long (max 108).");
> +		return -1;
> +	}

Are you sure about this check, I didn't test it but intention looks like ">=".

btw, it is possible to print 'MEMIF_SOCKET_UN_SIZE' as max value, instead of
hardcoded '108'.

  reply	other threads:[~2019-10-22 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 16:08 Jakub Grajciar
2019-10-22 16:32 ` Ferruh Yigit [this message]
2019-10-22 16:35   ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-10-22 16:37 ` Stephen Hemminger
2019-10-22 16:50   ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-10-22 17:37     ` Stephen Hemminger
2019-10-23  8:07 ` [dpdk-dev] [PATCH v2] " Jakub Grajciar
2019-10-23 17:42   ` Ferruh Yigit

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=0320dd0c-eb8a-f3e8-2a9c-29fcb911e5c2@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=jgrajcia@cisco.com \
    --cc=stephen@networkplumber.org \
    /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;
as well as URLs for NNTP newsgroup(s).