X-Git-Url: http://git.openwrt.org/?p=project%2Fodhcpd.git;a=blobdiff_plain;f=src%2Frouter.c;fp=src%2Frouter.c;h=541c0237dd7d21e75e3eefc796393ece33739c77;hp=d6ab4bb517ff67ca68491504a94f97a192b7720e;hb=8d8a8cd35137ff0fa11b6be455fdd596a8d7d2e9;hpb=3bda90079ec5574ef469e2a7804808302f17769d diff --git a/src/router.c b/src/router.c index d6ab4bb..541c023 100644 --- a/src/router.c +++ b/src/router.c @@ -518,9 +518,7 @@ static int send_router_advert(struct interface *iface, const struct in6_addr *fr continue; } - if (odhcpd_bmemcmp(&addr->addr, &iface->pio_filter_addr, - iface->pio_filter_length) != 0 || - addr->prefix < iface->pio_filter_length) { + if (ADDR_MATCH_PIO_FILTER(addr, iface)) { syslog(LOG_INFO, "Address %s filtered out as RA prefix on %s", inet_ntop(AF_INET6, &addr->addr.in6, buf, sizeof(buf)), iface->name); @@ -682,9 +680,7 @@ static int send_router_advert(struct interface *iface, const struct in6_addr *fr continue; /* Address not suitable */ } - if (odhcpd_bmemcmp(&addr->addr, &iface->pio_filter_addr, - iface->pio_filter_length) != 0 || - addr->prefix < iface->pio_filter_length) { + if (ADDR_MATCH_PIO_FILTER(addr, iface)) { syslog(LOG_INFO, "Address %s filtered out as RA route on %s", inet_ntop(AF_INET6, &addr->addr.in6, buf, sizeof(buf)), iface->name);