]> git.proxmox.com Git - mirror_frr.git/commitdiff
staticd: Do not ready prefix for printing till it's decoded
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 28 Dec 2018 02:46:01 +0000 (21:46 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 29 Dec 2018 02:06:09 +0000 (21:06 -0500)
The static daemon is setting up the prefix for printing
before it is decoded when we get notified about our
route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
staticd/static_zebra.c

index 1e23f597b0384eb4f30ff2e98b4c1617e011c59f..d6db60d3ed604676986901abd0db5005721c9a7a 100644 (file)
@@ -154,11 +154,11 @@ static int route_notify_owner(int command, struct zclient *zclient,
        uint32_t table_id;
        char buf[PREFIX_STRLEN];
 
-       prefix2str(&p, buf, sizeof(buf));
-
        if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, &note))
                return -1;
 
+       prefix2str(&p, buf, sizeof(buf));
+
        switch (note) {
        case ZAPI_ROUTE_FAIL_INSTALL:
                zlog_warn("%s: Route %s failed to install for table: %u",