]> git.meshlink.io Git - catta/blobdiff - netlink.c
add code for recieving packets
[catta] / netlink.c
index 3bc7d0160baf1341e959adaee4ed441b98ac0b68..92eb44e23b819d27bb54eeedfe047a28bb306af0 100644 (file)
--- a/netlink.c
+++ b/netlink.c
@@ -60,7 +60,7 @@ static gboolean check_func(GSource *source) {
     nl = *((flxNetlink**) (((guint8*) source) + sizeof(GSource)));
     g_assert(nl);
     
-    return nl->poll_fd.revents & G_IO_IN;
+    return nl->poll_fd.revents & (G_IO_IN|G_IO_HUP|G_IO_ERR);
 }
 
 static gboolean dispatch_func(GSource *source, GSourceFunc callback, gpointer user_data) {