X-Git-Url: http://git.archive.openwrt.org/?p=project%2Frelayd.git;a=blobdiff_plain;f=main.c;h=b3c13f7f7a49f3693df2efa1adfcae8dbaba56cf;hp=bd330ee0581be961588e4336ca1a893835776690;hb=refs%2Fheads%2Fmaster;hpb=83dba5d525a3b7c2ae4fcb24961143bfcfc93ba7 diff --git a/main.c b/main.c index bd330ee..b3c13f7 100644 --- a/main.c +++ b/main.c @@ -653,6 +653,11 @@ static struct relayd_interface *alloc_interface(const char *ifname, bool managed if (strlen(ifname) >= IFNAMSIZ) return NULL; + list_for_each_entry(rif, &interfaces, list) { + if (!strncmp(rif->ifname, ifname, IFNAMSIZ)) + return rif; + } + rif = calloc(1, sizeof(*rif)); if (!rif) return NULL;