]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd, ospfd: fix opaque zapi source parsing 13867/head
authorMark Stapp <mjs@labn.net>
Tue, 27 Jun 2023 20:32:54 +0000 (16:32 -0400)
committerMark Stapp <mjs@labn.net>
Tue, 27 Jun 2023 20:32:54 +0000 (16:32 -0400)
Opaque zapi messages carry the sender's zclient tuple now,
daemons shouldn't try to parse those bits directly.

Signed-off-by: Mark Stapp <mjs@labn.net>
isisd/isis_zebra.c
ospfd/ospf_zebra.c

index 59b80c1e20a1c5d31970abd5dd508ebef2d09481..95bd37812f507840707ffdfc65ecd78f499ef5b2 100644 (file)
@@ -772,9 +772,9 @@ static int isis_opaque_msg_handler(ZAPI_CALLBACK_ARGS)
 
        switch (info.type) {
        case LINK_STATE_SYNC:
-               STREAM_GETC(s, dst.proto);
-               STREAM_GETW(s, dst.instance);
-               STREAM_GETL(s, dst.session_id);
+               dst.proto = info.src_proto;
+               dst.instance = info.src_instance;
+               dst.session_id = info.src_session_id;
                dst.type = LINK_STATE_SYNC;
                ret = isis_te_sync_ted(dst);
                break;
index 27d74cd4fcd9199543b635720b447f1e22292aef..a5372dfc4976829e35e8f22d9a781a2b9b126813 100644 (file)
@@ -2161,9 +2161,9 @@ static int ospf_opaque_msg_handler(ZAPI_CALLBACK_ARGS)
 
        switch (info.type) {
        case LINK_STATE_SYNC:
-               STREAM_GETC(s, dst.proto);
-               STREAM_GETW(s, dst.instance);
-               STREAM_GETL(s, dst.session_id);
+               dst.proto = info.src_proto;
+               dst.instance = info.src_instance;
+               dst.session_id = info.src_session_id;
                dst.type = LINK_STATE_SYNC;
                ret = ospf_te_sync_ted(dst);
                break;