{
CAHistoryItem_t *item = &(history->items[i]);
if (id == item->messageId && tokenLength == item->tokenLength
- && ep->ifindex == item->ifindex && memcmp(item->token, token, tokenLength) == 0)
+ && memcmp(item->token, token, tokenLength) == 0)
{
- OIC_LOG_V(INFO, TAG, "IPv%c duplicate message ignored",
- familyFlags & CA_IPV6 ? '6' : '4');
- ret = true;
- break;
+ if ((familyFlags ^ item->flags) == CA_IPFAMILY_MASK)
+ {
+ OIC_LOG_V(INFO, TAG, "IPv%c duplicate message ignored",
+ familyFlags & CA_IPV6 ? '6' : '4');
+ ret = true;
+ break;
+ }
}
}
history->items[history->nextIndex].flags = familyFlags;
history->items[history->nextIndex].messageId = id;
- history->items[history->nextIndex].ifindex = ep->ifindex;
if (token && tokenLength)
{
memcpy(history->items[history->nextIndex].token, token, tokenLength);