]> git.puffer.fish Git - mirror/frr.git/commitdiff
pbrd: Use proper decode function for interface
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 10 Apr 2018 19:54:35 +0000 (15:54 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 17 Apr 2018 22:43:47 +0000 (18:43 -0400)
Use a proper decode function for a interface state change.

Ticket: CM-20489
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pbrd/pbr_zebra.c

index 931874748aec0431f770ebfefb4a05166ee4bc2d..4e5b5f3dde90d1142a59935b77251190063f53b8 100644 (file)
@@ -45,17 +45,6 @@ DEFINE_MTYPE_STATIC(PBRD, PBR_INTERFACE, "PBR Interface")
 /* Zebra structure to hold current status. */
 struct zclient *zclient;
 
-static struct interface *zebra_interface_if_lookup(struct stream *s)
-{
-       char ifname_tmp[INTERFACE_NAMSIZ];
-
-       /* Read interface name. */
-       stream_get(ifname_tmp, s, INTERFACE_NAMSIZ);
-
-       /* And look it up. */
-       return if_lookup_by_name(ifname_tmp, VRF_DEFAULT);
-}
-
 struct pbr_interface *pbr_if_new(struct interface *ifp)
 {
        struct pbr_interface *pbr_ifp;
@@ -140,7 +129,7 @@ static int interface_state_up(int command, struct zclient *zclient,
                              zebra_size_t length, vrf_id_t vrf_id)
 {
 
-       zebra_interface_if_lookup(zclient->ibuf);
+       zebra_interface_state_read(zclient->ibuf, vrf_id);
 
        return 0;
 }