From: Sabrina Dubroca <sd@queasysnail.net>
To: Ralf Lici <ralf@mandelbit.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
Antonio Quartulli <antonio@openvpn.net>,
netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next 3/8] ovpn: notify userspace on client float event
Date: Fri, 14 Nov 2025 15:22:23 +0100 [thread overview]
Message-ID: <aRc7H4ne5cCgZvyL@krikkit> (raw)
In-Reply-To: <fdf87820e364dda792a962486bef595cd6428354.camel@mandelbit.com>
2025-11-14, 10:26:31 +0100, Ralf Lici wrote:
> On Thu, 2025-11-13 at 18:21 -0800, Jakub Kicinski wrote:
> > On Tue, 11 Nov 2025 22:47:36 +0100 Antonio Quartulli wrote:
> > > + if (ss->ss_family == AF_INET) {
> > > + sa = (struct sockaddr_in *)ss;
> > > + if (nla_put_in_addr(msg, OVPN_A_PEER_REMOTE_IPV4,
> > > + sa->sin_addr.s_addr) ||
> > > + nla_put_net16(msg, OVPN_A_PEER_REMOTE_PORT, sa-
> > > >sin_port))
> > > + goto err_cancel_msg;
> > > + } else if (ss->ss_family == AF_INET6) {
> > > + sa6 = (struct sockaddr_in6 *)ss;
> > > + if (nla_put_in6_addr(msg, OVPN_A_PEER_REMOTE_IPV6,
> > > + &sa6->sin6_addr) ||
> > > + nla_put_u32(msg,
> > > OVPN_A_PEER_REMOTE_IPV6_SCOPE_ID,
> > > + sa6->sin6_scope_id) ||
> > > + nla_put_net16(msg, OVPN_A_PEER_REMOTE_PORT,
> > > sa6->sin6_port))
> > > + goto err_cancel_msg;
> > > + } else {
> >
> > presumably on this branch ret should be set to something?
>
> You're right, otherwise it would return -EMSGSIZE which is not what we
> want here.
But that should never happen with the current code, since
ovpn_nl_peer_float_notify is only called by ovpn_peer_endpoints_update
when salen != 0, and in that case we can only have ss_family = AF_INET
or ss_family = AF_INET6? (and otherwise it'd be an unitialized value
from ovpn_peer_endpoints_update)
(no objection to making ovpn_nl_peer_float_notify handle that
situation better in case it grows some other callers/contexts)
--
Sabrina
next prev parent reply other threads:[~2025-11-14 14:22 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 21:47 [PATCH net-next 0/8] pull request: ovpn 2025-11-11 Antonio Quartulli
2025-11-11 21:47 ` [PATCH net-next 1/8] ovpn: use correct array size to parse nested attributes in ovpn_nl_key_swap_doit Antonio Quartulli
2025-11-14 2:26 ` Jakub Kicinski
2025-11-14 13:30 ` Antonio Quartulli
2025-11-11 21:47 ` [PATCH net-next 2/8] ovpn: pktid: use bitops.h API Antonio Quartulli
2025-11-15 10:10 ` Sabrina Dubroca
2025-11-11 21:47 ` [PATCH net-next 3/8] ovpn: notify userspace on client float event Antonio Quartulli
2025-11-14 2:21 ` Jakub Kicinski
2025-11-14 9:26 ` Ralf Lici
2025-11-14 14:22 ` Sabrina Dubroca [this message]
2025-11-14 14:43 ` Ralf Lici
2025-11-11 21:47 ` [PATCH net-next 4/8] ovpn: Allow IPv6 link-local addresses through RPF check Antonio Quartulli
2025-11-14 16:06 ` Sabrina Dubroca
2025-11-18 10:26 ` Antonio Quartulli
2025-11-11 21:47 ` [PATCH net-next 5/8] ovpn: add support for asymmetric peer IDs Antonio Quartulli
2025-11-13 13:58 ` Sabrina Dubroca
2025-11-13 14:12 ` Antonio Quartulli
2025-11-13 15:18 ` Sabrina Dubroca
2025-11-11 21:47 ` [PATCH net-next 6/8] ovpn: consolidate crypto allocations in one chunk Antonio Quartulli
2025-11-12 16:29 ` Sabrina Dubroca
2025-11-13 8:37 ` Antonio Quartulli
2025-11-13 10:35 ` Ralf Lici
2025-11-13 13:48 ` Sabrina Dubroca
2025-11-13 16:32 ` Ralf Lici
2025-11-14 2:25 ` Jakub Kicinski
2025-11-14 9:33 ` Ralf Lici
2025-11-11 21:47 ` [PATCH net-next 7/8] ovpn: use bound device in UDP when available Antonio Quartulli
2025-11-11 21:47 ` [PATCH net-next 8/8] ovpn: use bound address " Antonio Quartulli
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=aRc7H4ne5cCgZvyL@krikkit \
--to=sd@queasysnail.net \
--cc=antonio@openvpn.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ralf@mandelbit.com \
/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).