diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-19 13:50:39 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-19 13:56:59 +0200 |
commit | 1f4b428ea897c1e95b7088a7a048ab95a34efc91 (patch) | |
tree | 9e80e2004fe8db5b0d1717ea9336c49db9278701 | |
parent | send: don't take uninitialized lock (diff) | |
download | wireguard-monolithic-historical-1f4b428ea897c1e95b7088a7a048ab95a34efc91.tar.xz wireguard-monolithic-historical-1f4b428ea897c1e95b7088a7a048ab95a34efc91.zip |
device: properly arrange structs
-rw-r--r-- | src/device.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/device.h b/src/device.h index 66090e7..f7c8d40 100644 --- a/src/device.h +++ b/src/device.h @@ -23,6 +23,7 @@ struct multicore_worker { struct crypt_queue { spinlock_t lock; + int len; struct list_head queue; union { struct { @@ -31,28 +32,26 @@ struct crypt_queue { }; struct work_struct work; }; - int len; }; struct wireguard_device { struct net_device *dev; - struct list_head device_list; + struct crypt_queue encrypt_queue, decrypt_queue; struct sock __rcu *sock4, *sock6; - u16 incoming_port; - u32 fwmark; struct net *creating_net; struct noise_static_identity static_identity; struct workqueue_struct *handshake_receive_wq, *handshake_send_wq, *packet_crypt_wq; struct sk_buff_head incoming_handshakes; - struct crypt_queue encrypt_queue, decrypt_queue; int incoming_handshake_cpu; struct multicore_worker __percpu *incoming_handshakes_worker; struct cookie_checker cookie_checker; struct pubkey_hashtable peer_hashtable; struct index_hashtable index_hashtable; struct routing_table peer_routing_table; - struct list_head peer_list; struct mutex device_update_lock, socket_update_lock; + struct list_head device_list, peer_list; + u32 fwmark; + u16 incoming_port; }; int device_init(void); |