summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 714888a3f3..ad91eb504b 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -1210,14 +1210,20 @@ stream_failure:
}
bool zapi_route_notify_decode(struct stream *s, struct prefix *p,
+ uint32_t *tableid,
enum zapi_route_notify_owner *note)
{
+ uint32_t t;
+
STREAM_GET(note, s, sizeof(*note));
STREAM_GETC(s, p->family);
STREAM_GETC(s, p->prefixlen);
STREAM_GET(&p->u.prefix, s,
- PSIZE(p->prefixlen));
+ prefix_blen(p));
+ STREAM_GETL(s, t);
+
+ *tableid = t;
return true;
@@ -1402,8 +1408,8 @@ static void zclient_vrf_add(struct zclient *zclient, vrf_id_t vrf_id)
/* Lookup/create vrf by vrf_id. */
vrf = vrf_get(vrf_id, vrfname_tmp);
- vrf->data = data;
-
+ vrf->data.l.table_id = data.l.table_id;
+ memcpy(vrf->data.l.netns_name, data.l.netns_name, NS_NAMSIZ);
vrf_enable(vrf);
}
@@ -2363,9 +2369,9 @@ static int zclient_read(struct thread *thread)
vrf_id);
break;
case ZEBRA_ROUTE_NOTIFY_OWNER:
- if (zclient->notify_owner)
- (*zclient->notify_owner)(command, zclient,
- length, vrf_id);
+ if (zclient->route_notify_owner)
+ (*zclient->route_notify_owner)(command, zclient, length,
+ vrf_id);
break;
default:
break;