summaryrefslogtreecommitdiffstats
path: root/src/rtnl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtnl.c')
-rw-r--r--src/rtnl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rtnl.c b/src/rtnl.c
index 0206d30..29fc184 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -91,9 +91,10 @@ int rtnl_handler_unregister(struct rtnl_handle *rtnl_handle,
return 0;
}
-/* rtnl_arse_rtattr - parse rtattr */
int rtnl_parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len)
{
+ memset(tb, 0, sizeof(struct rtattr *) * max);
+
while (RTA_OK(rta, len)) {
if (rta->rta_type <= max)
tb[rta->rta_type] = rta;