]> git.proxmox.com Git - ovs.git/commit
netlink-notifier: Exit loop if nl_sock_recv() returns an error
authorDaniele Di Proietto <ddiproietto@vmware.com>
Tue, 22 Jul 2014 06:38:57 +0000 (06:38 +0000)
committerAlex Wang <alexw@nicira.com>
Tue, 22 Jul 2014 23:33:42 +0000 (16:33 -0700)
commit222f04515fe158935e61c3db9e974ce5b8615944
treeb65db6248395c70d38be0dfd3e86b7f7bad320b8
parent5a80e6062adcc2cfd937be56314281d17f9d517c
netlink-notifier: Exit loop if nl_sock_recv() returns an error

An error from nl_sock_recv() could mean that there are some issues with the
netlink socket (EBADF, ENOTSOCK, ...). Calling nl_sock_recv() in this case is
harmful: nln_run() will never return and since we are calling it from the main
thread, vswitchd becomes unresponsive.
Also, with this commit we avoid calling the notifier callback in case of error
(except for ENOBUFS, which means that there could be too many notifications)

Suggested-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
lib/netlink-notifier.c