Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-23 Thread Antonio Quartulli
On 22/11/2024 17:18, Sabrina Dubroca wrote: 2024-11-22, 10:41:26 +0100, Antonio Quartulli wrote: On 12/11/2024 14:20, Antonio Quartulli wrote: [...] +static int ovpn_peer_del_nolock(struct ovpn_peer *peer, +    enum ovpn_del_peer_reason reason) +{ +    switch (peer->ovpn->mode) { + 

Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-22 Thread Sabrina Dubroca
2024-11-22, 10:41:26 +0100, Antonio Quartulli wrote: > On 12/11/2024 14:20, Antonio Quartulli wrote: > [...] > > > > +static int ovpn_peer_del_nolock(struct ovpn_peer *peer, > > > > +    enum ovpn_del_peer_reason reason) > > > > +{ > > > > +    switch (peer->ovpn->mode) { > > > > +    c

Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-22 Thread Antonio Quartulli
On 12/11/2024 14:20, Antonio Quartulli wrote: [...] +static int ovpn_peer_del_nolock(struct ovpn_peer *peer, +    enum ovpn_del_peer_reason reason) +{ +    switch (peer->ovpn->mode) { +    case OVPN_MODE_MP: I think it would be nice to add lockdep_assert_held(&peer->ovpn->peer

Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-14 Thread Sabrina Dubroca
2024-11-14, 09:12:01 +0100, Antonio Quartulli wrote: > On 13/11/2024 11:36, Sabrina Dubroca wrote: > > 2024-11-12, 14:20:45 +0100, Antonio Quartulli wrote: > > > On 05/11/2024 19:10, Sabrina Dubroca wrote: > > > > 2024-10-29, 11:47:28 +0100, Antonio Quartulli wrote: > > > > > + /* check for pee

Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-14 Thread Antonio Quartulli
On 13/11/2024 11:36, Sabrina Dubroca wrote: 2024-11-12, 14:20:45 +0100, Antonio Quartulli wrote: On 05/11/2024 19:10, Sabrina Dubroca wrote: 2024-10-29, 11:47:28 +0100, Antonio Quartulli wrote: @@ -105,6 +132,9 @@ void ovpn_decrypt_post(void *data, int ret) goto drop; }

Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-13 Thread Sabrina Dubroca
2024-11-12, 14:20:45 +0100, Antonio Quartulli wrote: > On 05/11/2024 19:10, Sabrina Dubroca wrote: > > 2024-10-29, 11:47:28 +0100, Antonio Quartulli wrote: > > > @@ -105,6 +132,9 @@ void ovpn_decrypt_post(void *data, int ret) > > > goto drop; > > > } > > > + /* keep trac

Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-12 Thread Antonio Quartulli
On 05/11/2024 19:10, Sabrina Dubroca wrote: 2024-10-29, 11:47:28 +0100, Antonio Quartulli wrote: @@ -105,6 +132,9 @@ void ovpn_decrypt_post(void *data, int ret) goto drop; } + /* keep track of last received authenticated packet for keepalive */ + peer->last_recv

Re: [PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-11-05 Thread Sabrina Dubroca
2024-10-29, 11:47:28 +0100, Antonio Quartulli wrote: > @@ -105,6 +132,9 @@ void ovpn_decrypt_post(void *data, int ret) > goto drop; > } > > + /* keep track of last received authenticated packet for keepalive */ > + peer->last_recv = ktime_get_real_seconds(); It doesn'

[PATCH net-next v11 15/23] ovpn: implement keepalive mechanism

2024-10-29 Thread Antonio Quartulli
OpenVPN supports configuring a periodic keepalive packet. message to allow the remote endpoint detect link failures. This change implements the keepalive sending and timer expiring logic. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 77 + drivers/net/ovp