Thread (90 messages) 90 messages, 8 authors, 2024-04-02

Re: [PATCH net-next v2 04/22] ovpn: add basic interface creation/destruction/management routines

From: Antonio Quartulli <antonio@openvpn.net>
Date: 2024-03-06 14:49:28

On 05/03/2024 17:27, Andrew Lunn wrote:
quoted
quoted
quoted
+void ovpn_iface_destruct(struct ovpn_struct *ovpn, bool unregister_netdev)
+{
+	ASSERT_RTNL();
+
+	netif_carrier_off(ovpn->dev);
You often see virtual devices turn their carrier off in there
probe/create function, because it is unclear what state it is in after
register_netdevice().
Are you suggesting to turn it off both here and in the create function?
Or should I remove the invocation above?
I noticed it in the _destruct function and went back to look at
create. You probably want it in both, unless as part of destruct, you
first disconnect all peers, which should set the carrier to off when
the last peer disconnects?
I think keeping the carrier on while no peer is connected is better for 
OpenVPN.

I will then turn the carrier off in the create function as well. Thanks!

-- 
Antonio Quartulli
OpenVPN Inc.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help