diff options
author | Sven Eckelmann <sven@narfation.org> | 2018-10-30 22:01:24 +0100 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2018-11-12 10:41:51 +0100 |
commit | fb69be697916a2d0a9badcdef7f20fcfad1233bc (patch) | |
tree | 179a1043fce3fed4bd1741b9cbb6f2425ceecfee /net/batman-adv/main.h | |
parent | batman-adv: Add inconsistent gateway netlink dump detection (diff) | |
download | linux-fb69be697916a2d0a9badcdef7f20fcfad1233bc.tar.xz linux-fb69be697916a2d0a9badcdef7f20fcfad1233bc.zip |
batman-adv: Add inconsistent hardif netlink dump detection
The netlink dump functionality transfers a large number of entries from the
kernel to userspace. It is rather likely that the transfer has to
interrupted and later continued. During that time, it can happen that
either new entries are added or removed. The userspace could than either
receive some entries multiple times or miss entries.
Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a
mechanism to inform userspace about this problem. Userspace can then decide
whether it is necessary or not to retry dumping the information again.
The netlink dump functions have to be switched to exclusive locks to avoid
changes while the current message is prepared. And an external generation
sequence counter is introduced which tracks all modifications of the list.
Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r-- | net/batman-adv/main.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index b68a41190eb0..b572066325e4 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -247,6 +247,7 @@ static inline int batadv_print_vid(unsigned short vid) } extern struct list_head batadv_hardif_list; +extern unsigned int batadv_hardif_generation; extern unsigned char batadv_broadcast_addr[]; extern struct workqueue_struct *batadv_event_workqueue; |