diff options
Diffstat (limited to 'zebra/zserv.c')
| -rw-r--r-- | zebra/zserv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index fd2c5dd97c..cbc9f2bed9 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -825,6 +825,7 @@ static int zserv_fec_register(struct zserv *client, int sock, u_short length) while (l < length) { flags = stream_getw(s); + memset(&p, 0, sizeof(p)); p.family = stream_getw(s); if (p.family != AF_INET && p.family != AF_INET6) { zlog_err( @@ -875,6 +876,7 @@ static int zserv_fec_unregister(struct zserv *client, int sock, u_short length) while (l < length) { // flags = stream_getw(s); (void)stream_getw(s); + memset(&p, 0, sizeof(p)); p.family = stream_getw(s); if (p.family != AF_INET && p.family != AF_INET6) { zlog_err( @@ -998,14 +1000,13 @@ static int zread_interface_add(struct zserv *client, u_short length, struct zebra_vrf *zvrf) { struct vrf *vrf; - struct listnode *ifnode, *ifnnode; struct interface *ifp; /* Interface information is needed. */ vrf_bitmap_set(client->ifinfo, zvrf_id(zvrf)); RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) { - for (ALL_LIST_ELEMENTS(vrf->iflist, ifnode, ifnnode, ifp)) { + FOR_ALL_INTERFACES (vrf, ifp) { /* Skip pseudo interface. */ if (!CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_ACTIVE)) continue; |
