Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-12-01 Thread Antonio Quartulli
On 29/11/2024 18:00, Sabrina Dubroca wrote: 2024-11-14, 11:32:36 +0100, Antonio Quartulli wrote: On 13/11/2024 12:05, Sabrina Dubroca wrote: 2024-11-12, 15:26:59 +0100, Antonio Quartulli wrote: On 11/11/2024 16:41, Sabrina Dubroca wrote: 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-29 Thread Sabrina Dubroca
2024-11-14, 11:32:36 +0100, Antonio Quartulli wrote: > On 13/11/2024 12:05, Sabrina Dubroca wrote: > > 2024-11-12, 15:26:59 +0100, Antonio Quartulli wrote: > > > On 11/11/2024 16:41, Sabrina Dubroca wrote: > > > > 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > > > > > +void ovpn_peer_hash_v

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-21 Thread Antonio Quartulli
On 21/11/2024 17:02, Sabrina Dubroca wrote: [I'm still thinking about the locking problems for ovpn_peer_float, but just noticed this while staring at the rehash code] 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +void ovpn_peer_hash_vpn_ip(struct ovpn_peer *peer) + __must_hold(&p

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-21 Thread Sabrina Dubroca
[I'm still thinking about the locking problems for ovpn_peer_float, but just noticed this while staring at the rehash code] 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > +void ovpn_peer_hash_vpn_ip(struct ovpn_peer *peer) > + __must_hold(&peer->ovpn->peers->lock) > +{ > + struct h

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-20 Thread Sabrina Dubroca
2024-11-20, 12:34:08 +0100, Antonio Quartulli wrote: > On 20/11/2024 12:12, Sabrina Dubroca wrote: [...] > > > > I don't know when userspace would use v4mapped addresses, > > > > > > It happens when listening on [::] with a v6 socket that has no > > > "IPV6_V6ONLY" > > > set to true (you can chec

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-20 Thread Antonio Quartulli
On 20/11/2024 12:12, Sabrina Dubroca wrote: 2024-11-14, 10:21:18 +0100, Antonio Quartulli wrote: On 13/11/2024 17:56, Sabrina Dubroca wrote: 2024-11-12, 15:19:50 +0100, Antonio Quartulli wrote: On 04/11/2024 16:14, Sabrina Dubroca wrote: 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-20 Thread Sabrina Dubroca
2024-11-14, 10:21:18 +0100, Antonio Quartulli wrote: > On 13/11/2024 17:56, Sabrina Dubroca wrote: > > 2024-11-12, 15:19:50 +0100, Antonio Quartulli wrote: > > > On 04/11/2024 16:14, Sabrina Dubroca wrote: > > > > 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > > > > > +static int ovpn_nl_pe

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-14 Thread Antonio Quartulli
On 13/11/2024 12:05, Sabrina Dubroca wrote: 2024-11-12, 15:26:59 +0100, Antonio Quartulli wrote: On 11/11/2024 16:41, Sabrina Dubroca wrote: 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +void ovpn_peer_hash_vpn_ip(struct ovpn_peer *peer) + __must_hold(&peer->ovpn->peers->lock)

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-14 Thread Antonio Quartulli
On 13/11/2024 17:56, Sabrina Dubroca wrote: 2024-11-12, 15:19:50 +0100, Antonio Quartulli wrote: On 04/11/2024 16:14, Sabrina Dubroca wrote: 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +static int ovpn_nl_peer_precheck(struct ovpn_struct *ovpn, +struct

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-13 Thread Sabrina Dubroca
2024-11-12, 15:19:50 +0100, Antonio Quartulli wrote: > On 04/11/2024 16:14, Sabrina Dubroca wrote: > > 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > > > +static int ovpn_nl_peer_precheck(struct ovpn_struct *ovpn, > > > + struct genl_info *info, > > > +

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-13 Thread Sabrina Dubroca
2024-11-12, 15:26:59 +0100, Antonio Quartulli wrote: > On 11/11/2024 16:41, Sabrina Dubroca wrote: > > 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > > > +void ovpn_peer_hash_vpn_ip(struct ovpn_peer *peer) > > > + __must_hold(&peer->ovpn->peers->lock) > > > > Changes to peer->vpn_addrs are

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-12 Thread Antonio Quartulli
On 11/11/2024 16:41, Sabrina Dubroca wrote: 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +static int ovpn_nl_peer_modify(struct ovpn_peer *peer, struct genl_info *info, + struct nlattr **attrs) +{ + struct sockaddr_storage ss = {}; + u32 sockfd, i

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-12 Thread Antonio Quartulli
On 04/11/2024 16:14, Sabrina Dubroca wrote: 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +static int ovpn_nl_peer_precheck(struct ovpn_struct *ovpn, +struct genl_info *info, +struct nlattr **attrs) +{ + if (NL_REQ_ATTR

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-11 Thread Sabrina Dubroca
2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > +static int ovpn_nl_peer_modify(struct ovpn_peer *peer, struct genl_info > *info, > +struct nlattr **attrs) > +{ > + struct sockaddr_storage ss = {}; > + u32 sockfd, interv, timeout; > + struct socket *s

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-04 Thread Sabrina Dubroca
2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: > +static int ovpn_nl_peer_precheck(struct ovpn_struct *ovpn, > + struct genl_info *info, > + struct nlattr **attrs) > +{ > + if (NL_REQ_ATTR_CHECK(info->extack, info->attrs[OVPN_A_PEE

[PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-10-29 Thread Antonio Quartulli
This change introduces the netlink command needed to add, delete and retrieve/dump known peers. Userspace is expected to use these commands to handle known peer lifecycles. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/netlink.c | 578 - driver