| 386 | auto retrta = static_cast<const struct rtattr*>(IFA_RTA(ifa_struct)); |
| 387 | while |
| 388 | RTA_OK(retrta, length) { |
| 389 | if (retrta->rta_type == IFA_ADDRESS) { |
| 390 | if (address_.is_v4() && RTA_PAYLOAD(retrta) == sizeof(struct in_addr) |
| 391 | && ::memcmp(RTA_DATA(retrta), address_.to_v4().to_bytes().data(), sizeof(struct in_addr)) == 0) { |
| 392 | return true; |
| 393 | } else if (address_.is_v6() && RTA_PAYLOAD(retrta) == sizeof(struct in6_addr) |
| 394 | && ::memcmp(RTA_DATA(retrta), address_.to_v6().to_bytes().data(), sizeof(struct in6_addr)) == 0) { |
| 395 | return true; |
| 396 | } |
| 397 | } |
| 398 | retrta = RTA_NEXT(retrta, length); |
| 399 | } |
| 400 | |
| 401 | return false; |
| 402 | } |
no test coverage detected