]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/kernel_socket.c
lib: nuke the if_*_by_name_len() functions
[mirror_frr.git] / zebra / kernel_socket.c
index 9907ef5b7969a110598e15727594e3b7a35f0755..cbfc371199dc91b7c6c86bd58ddaecea44620589 100644 (file)
@@ -323,10 +323,7 @@ static int ifan_read(struct if_announcemsghdr *ifan)
                                __func__, ifan->ifan_index, ifan->ifan_name);
 
                /* Create Interface */
-               ifp = if_get_by_name_len(
-                       ifan->ifan_name,
-                       strnlen(ifan->ifan_name, sizeof(ifan->ifan_name)),
-                       VRF_DEFAULT, 0);
+               ifp = if_get_by_name(ifan->ifan_name, VRF_DEFAULT, 0);
                ifp->ifindex = ifan->ifan_index;
 
                if_get_metric(ifp);
@@ -517,7 +514,7 @@ int ifm_read(struct if_msghdr *ifm)
                if (ifp == NULL) {
                        /* Interface that zebra was not previously aware of, so
                         * create. */
-                       ifp = if_create(ifname, ifnlen, VRF_DEFAULT);
+                       ifp = if_create(ifname, VRF_DEFAULT);
                        if (IS_ZEBRA_DEBUG_KERNEL)
                                zlog_debug("%s: creating ifp for ifindex %d",
                                           __func__, ifm->ifm_index);