summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2019-04-11 23:39:48 +0200
committerGitHub <noreply@github.com>2019-04-11 23:39:48 +0200
commit45f3dcd317558fc2b96d23bc52e4489fd900df85 (patch)
treee8e190b8f1f5a2729d8f4ab9c6547f73daca39f1 /zebra
parentMerge pull request #4125 from mjstapp/fix_debug_pim_static (diff)
parentzebra: Fix late memset of pbr rule in rule_netlink (diff)
downloadfrr-45f3dcd317558fc2b96d23bc52e4489fd900df85.tar.xz
frr-45f3dcd317558fc2b96d23bc52e4489fd900df85.zip
Merge pull request #4111 from sworleys/Netlink-Rule-SA-Fix
zebra: Fix late memset of pbr rule in rule_netlink
Diffstat (limited to 'zebra')
-rw-r--r--zebra/rule_netlink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/zebra/rule_netlink.c b/zebra/rule_netlink.c
index 477549f42..8cc5b52b3 100644
--- a/zebra/rule_netlink.c
+++ b/zebra/rule_netlink.c
@@ -185,7 +185,7 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
struct rtattr *tb[FRA_MAX + 1];
int len;
char *ifname;
- struct zebra_pbr_rule rule;
+ struct zebra_pbr_rule rule = {};
char buf1[PREFIX_STRLEN];
char buf2[PREFIX_STRLEN];
@@ -230,7 +230,6 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
if (!rule.ifp)
return 0;
- memset(&rule, 0, sizeof(rule));
if (tb[FRA_PRIORITY])
rule.rule.priority = *(uint32_t *)RTA_DATA(tb[FRA_PRIORITY]);