-/* $OpenBSD: nd6_nbr.c,v 1.129 2019/11/29 16:41:02 nayden Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.130 2021/12/13 14:30:16 bluhm Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
duplicate = 0;
dp = nd6_dad_find(ifa);
+ if (dp == NULL) {
+ log(LOG_ERR, "%s: DAD structure not found\n", __func__);
+ return;
+ }
/*
* if I'm yet to start DAD, someone else started using this address
* first. I have a duplicate and you win.
*/
- if (!dp || dp->dad_ns_ocount == 0)
+ if (dp->dad_ns_ocount == 0)
duplicate++;
/* XXX more checks for loopback situation - see nd6_dad_timer too */
* not sure if I got a duplicate.
* increment ns count and see what happens.
*/
- if (dp)
- dp->dad_ns_icount++;
+ dp->dad_ns_icount++;
}
}