libntrack/libntrack-014-deadloop.patch

22 lines
564 B
Diff

--- modules/ntrack-libnl.c~ 2011-03-27 07:37:02.000000000 +0800
+++ modules/ntrack-libnl.c 2011-04-09 23:11:33.919862769 +0800
@@ -375,6 +375,7 @@
get_nl_link_by_index (ntrack_monitor_t *self, ntrack_list_t *linklist, int iindex)
{
ntrack_list_t *i = linklist;
+ ntrack_list_t *head = NULL;
struct rtnl_link *result = NULL;
while (i) {
struct rtnl_link *link = i->data;
@@ -384,6 +385,10 @@
}
if (rtnl_link_get_ifindex(link) > iindex)
break;
+ if (head == i)
+ break;
+ if (head == NULL)
+ head = i;
i = i->next;
}
return result;