mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:33:15 +00:00
zebra: fix for issues found during static analysis
This patch addresses fix for issues found during static analysis. rt_netlink - initialise vtep if there is NDA_DST attribute if_netlink - initialise vni_start and vni_end Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
This commit is contained in:
parent
fe44a3696f
commit
e8a392d91c
@ -737,6 +737,9 @@ static int netlink_bridge_vxlan_vlan_vni_map_update(struct interface *ifp,
|
|||||||
struct zebra_vxlan_vni vni_start;
|
struct zebra_vxlan_vni vni_start;
|
||||||
struct rtattr *aftb[IFLA_BRIDGE_VLAN_TUNNEL_MAX + 1];
|
struct rtattr *aftb[IFLA_BRIDGE_VLAN_TUNNEL_MAX + 1];
|
||||||
|
|
||||||
|
memset(&vni_start, 0, sizeof(vni_start));
|
||||||
|
memset(&vni_end, 0, sizeof(vni_end));
|
||||||
|
|
||||||
for (i = RTA_DATA(af_spec), rem = RTA_PAYLOAD(af_spec); RTA_OK(i, rem);
|
for (i = RTA_DATA(af_spec), rem = RTA_PAYLOAD(af_spec); RTA_OK(i, rem);
|
||||||
i = RTA_NEXT(i, rem)) {
|
i = RTA_NEXT(i, rem)) {
|
||||||
|
|
||||||
|
@ -3536,7 +3536,8 @@ static int netlink_macfdb_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
|
|||||||
IPV4_MAX_BYTELEN);
|
IPV4_MAX_BYTELEN);
|
||||||
snprintfrr(dst_buf, sizeof(dst_buf), " dst %pI4",
|
snprintfrr(dst_buf, sizeof(dst_buf), " dst %pI4",
|
||||||
&vtep_ip);
|
&vtep_ip);
|
||||||
}
|
} else
|
||||||
|
memset(&vtep_ip, 0, sizeof(vtep_ip));
|
||||||
|
|
||||||
if (tb[NDA_NH_ID])
|
if (tb[NDA_NH_ID])
|
||||||
nhg_id = *(uint32_t *)RTA_DATA(tb[NDA_NH_ID]);
|
nhg_id = *(uint32_t *)RTA_DATA(tb[NDA_NH_ID]);
|
||||||
|
Loading…
Reference in New Issue
Block a user