diff options
| -rw-r--r-- | ldpd/packet.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ldpd/packet.c b/ldpd/packet.c index 9b3151d720..ad78181311 100644 --- a/ldpd/packet.c +++ b/ldpd/packet.c @@ -292,16 +292,16 @@ disc_find_iface(unsigned int ifindex, int af, union ldpd_addr *src, if (iface == NULL) return (NULL); + ia = iface_af_get(iface, af); + if (!ia->enabled) + return (NULL); + /* * For unicast packets, we just need to make sure that the interface * is enabled for the given address-family. */ - if (!multicast) { - ia = iface_af_get(iface, af); - if (ia->enabled) - return (iface); - return (NULL); - } + if (!multicast) + return (iface); switch (af) { case AF_INET: |
