Commit 31cf68b0 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Use FOR_ALL_NETS in kernel_netlink.c.

parent 6802457e
...@@ -1028,7 +1028,7 @@ filter_link(struct nlmsghdr *nh, void *data) ...@@ -1028,7 +1028,7 @@ filter_link(struct nlmsghdr *nh, void *data)
int ifindex; int ifindex;
char *ifname; char *ifname;
unsigned int ifflags; unsigned int ifflags;
int i; struct network *net;
len = nh->nlmsg_len; len = nh->nlmsg_len;
...@@ -1046,11 +1046,10 @@ filter_link(struct nlmsghdr *nh, void *data) ...@@ -1046,11 +1046,10 @@ filter_link(struct nlmsghdr *nh, void *data)
return 0; return 0;
kdebugf("filter_interfaces: link change on if %s(%d): %s\n", kdebugf("filter_interfaces: link change on if %s(%d): %s\n",
ifname, ifindex, parse_ifflags(ifflags)); ifname, ifindex, parse_ifflags(ifflags));
for (i = 0; i < numnets; i++) { FOR_ALL_NETS(net) {
if (!strcmp(nets[i].ifname, ifname)) { if (strcmp(net->ifname, ifname) == 0)
return 1; return 1;
} }
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment