summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-03-01 11:10:01 -0500
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-03-01 11:10:01 -0500
commita975744835bb87e3cf62701e13248d66f1dac1df (patch)
treebca5ab1f29594688c43e0c36c9eb2f0c5c8e66c6 /lib/zclient.c
parent351c56649bfd8487676704a10995d736d1d893cc (diff)
parentc98f4d81aa5d4113ceea58ce6db4bebab5c99735 (diff)
Merge branch 'master' into docuser
* New manpage: mtracebis.rst * Makefile.am includes mtracebis.rst * configure.ac lines removed * Debian packaging files updated * Fixed up manpage |seealso-programs| in the process * Centos7 build package list updated to include systemd-devel * New paragraph on netns vrf support in zebra manpage Conflicts: configure.ac debianpkg/backports/ubuntu14.04/debian/frr.install debianpkg/frr.install doc/Makefile.am doc/developer/Building_FRR_on_CentOS7.rst doc/zebra.8.in Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 8e8b50b15e..ad91eb504b 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -363,7 +363,7 @@ static int zebra_hello_send(struct zclient *zclient)
return 0;
}
-void zclient_send_vrf_label(struct zclient *zclient, vrf_id_t vrf_id,
+void zclient_send_vrf_label(struct zclient *zclient, vrf_id_t vrf_id, afi_t afi,
mpls_label_t label, enum lsp_types_t ltype)
{
struct stream *s;
@@ -373,6 +373,7 @@ void zclient_send_vrf_label(struct zclient *zclient, vrf_id_t vrf_id,
zclient_create_header(s, ZEBRA_VRF_LABEL, vrf_id);
stream_putl(s, label);
+ stream_putc(s, afi);
stream_putc(s, ltype);
stream_putw_at(s, 0, stream_get_endp(s));
zclient_send_message(zclient);
@@ -1209,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;
@@ -1401,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);
}
@@ -2362,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;