From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Kuniyuki Iwashima <kuniyu@amazon.com>, grzegorz.szpetkowski@intel.com
Cc: netdev@vger.kernel.org, kuniyu@amazon.com
Subject: Re: [PATCH net] net: core: sock: add AF_PACKET unsupported binding error
Date: Fri, 12 Jul 2024 10:54:38 -0400 [thread overview]
Message-ID: <669143aedb989_24ac882945e@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20240711174123.66910-1-kuniyu@amazon.com>
Kuniyuki Iwashima wrote:
> From: "Szpetkowski, Grzegorz" <grzegorz.szpetkowski@intel.com>
> Date: Thu, 11 Jul 2024 13:48:07 +0000
> > Hi All,
> >
> > Currently, when setsockopt() API with SO_BINDTODEVICE option is
> > called over a raw packet socket, then although the function doesn't
> > return an error, the socket is not bound to a specific interface.
> >
> > The limitation itself is explicitly stated in man 7 socket, particularly
> > that SO_BINDTODEVICE is "not supported for packet sockets".
> >
> > The patch below is to align the API, so that it does return failure in
> > case of a packet socket.
>
> SO_XXX is generic options and can be set to any socket (except for
> SO_ZEROCOPY due to MSG_ZEROCOPY, see 76851d1212c11), and whether it's
> really used or not depends on each socket implementation.
>
> Otherwise, we need this kind of change for all socket options and
> families.
Making this change now might also break applications that
set it even though it is a noop for them.
prev parent reply other threads:[~2024-07-12 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 13:48 [PATCH net] net: core: sock: add AF_PACKET unsupported binding error Szpetkowski, Grzegorz
2024-07-11 17:41 ` Kuniyuki Iwashima
2024-07-12 14:54 ` Willem de Bruijn [this message]
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=669143aedb989_24ac882945e@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=grzegorz.szpetkowski@intel.com \
--cc=kuniyu@amazon.com \
--cc=netdev@vger.kernel.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