summaryrefslogtreecommitdiff
path: root/zebra/kernel_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/kernel_netlink.c')
-rw-r--r--zebra/kernel_netlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index cd22e95737..8b631a3726 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -493,6 +493,7 @@ void netlink_parse_rtattr_flags(struct rtattr **tb, int max,
{
unsigned short type;
+ memset(tb, 0, sizeof(struct rtattr *) * (max + 1));
while (RTA_OK(rta, len)) {
type = rta->rta_type & ~flags;
if ((type <= max) && (!tb[type]))
@@ -504,6 +505,7 @@ void netlink_parse_rtattr_flags(struct rtattr **tb, int max,
void netlink_parse_rtattr(struct rtattr **tb, int max, struct rtattr *rta,
int len)
{
+ memset(tb, 0, sizeof(struct rtattr *) * (max + 1));
while (RTA_OK(rta, len)) {
if (rta->rta_type <= max)
tb[rta->rta_type] = rta;