From 52b530fc64355933d428e2b88591cbf926b85bc8 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 30 Mar 2017 21:58:47 -0300 Subject: ldpd: fix configuration of non-existing VPLS interfaces and pseudowires If we don't know the ifindex, flags, etc of an interface at the time it's configured, we should make sure that once this information is available the appropriate structures are updated. Signed-off-by: Renato Westphal --- ldpd/interface.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ldpd/interface.c') diff --git a/ldpd/interface.c b/ldpd/interface.c index 17b3237b3..11bce12b0 100644 --- a/ldpd/interface.c +++ b/ldpd/interface.c @@ -49,17 +49,14 @@ iface_compare(struct iface *a, struct iface *b) } struct iface * -if_new(struct kif *kif) +if_new(const char *name) { struct iface *iface; if ((iface = calloc(1, sizeof(*iface))) == NULL) fatal("if_new: calloc"); - strlcpy(iface->name, kif->ifname, sizeof(iface->name)); - LIST_INIT(&iface->addr_list); - if (kif->ifindex) - if_update_info(iface, kif); + strlcpy(iface->name, name, sizeof(iface->name)); /* ipv4 */ iface->ipv4.af = AF_INET; -- cgit v1.2.3