History

ovpn: ensure TCP vars are initialized first

Netlink calls may access TCP global vars (i.e. when attaching a TCP socket), therefore we need to make sure the latters are initialized beforehand. For this reason move the global TCP initialization at the top of the module init function.

Antonio Quartulli committed 3 months ago

Commit 4680c0e1 parent 0301aa31 file · +4 −3Browse files

Unified · Split

drivers/net/ovpn/main.c+4−3
@@ -260,8 +260,11 @@ static struct rtnl_link_ops ovpn_link_ops = { · 259 unmodified lines
260260
261261 static int __init ovpn_init(void)
262262 {
263− int err = rtnl_link_register(&ovpn_link_ops);
263+ int err;
264264
265+ ovpn_tcp_init();
266+
267+ err = rtnl_link_register(&ovpn_link_ops);
265268 if (err) {
266269 pr_err("ovpn: can't register rtnl link ops: %d\n", err);
267270 return err;
@@ -273,8 +276,6 @@ static int __init ovpn_init(void) · 5 unmodified lines
273276 goto unreg_rtnl;
274277 }
275278
276− ovpn_tcp_init();
277−
278279 return 0;
279280
280281 unreg_rtnl:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t