Lines Matching defs:nonce
82 static bool nd6_dad_ownnonce(struct ifaddr *, struct nd_opt_nonce *nonce);
336 * Check that the nonce is not being used by the same address
406 const uint8_t *nonce /* duplicate address detection */)
474 if (nonce == NULL) {
546 if (nonce == NULL && (mac = nd6_ifptomac(ifp))) {
561 /* Add a nonce option (RFC 3971) to detect looped back NS messages.
563 if (nonce != NULL) {
575 memcpy(nd_opt + 1, nonce, ND_OPT_NONCE_LEN);
583 ip6_output(m, NULL, &ro, nonce != NULL ? IPV6_UNSPECSRC : 0,
1087 * This constraint could be removed by sending the on wire nonce as
1088 * hmac(key, dad_ns_ocount), but that would increase the nonce size
1106 nd6_dad_find(struct ifaddr *ifa, struct nd_opt_nonce *nonce, bool *found_nonce)
1117 if (nonce != NULL &&
1118 nonce->nd_opt_nonce_len != (ND_OPT_NONCE_LEN + 2) / 8)
1119 nonce = NULL;
1120 match_ifa = nonce == NULL || found_nonce == NULL || *found_nonce == false;
1134 if (nonce == NULL)
1139 if (memcmp(nonce->nd_opt_nonce,
1161 nd6_dad_ownnonce(struct ifaddr *ifa, struct nd_opt_nonce *nonce)
1166 nd6_dad_find(ifa, nonce, &found_nonce);
1453 uint8_t *nonce;
1470 nonce = dp->dad_nonce[dp->dad_ns_ocount % ND_OPT_NONCE_STORE];
1471 cprng_fast(nonce, ND_OPT_NONCE_LEN);
1474 nd6_ns_output(ifp, NULL, &ia->ia_addr.sin6_addr, NULL, nonce);
1478 nd6_dad_input(struct ifaddr *ifa, struct nd_opt_nonce *nonce,
1487 dp = nd6_dad_find(ifa, nonce, &found_nonce);