From 6375390cfcbe8536aacd3428678ea19109b89522 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Wed, 9 Mar 2011 23:31:26 +0000 Subject: Log MAC address changes in the IPv6 neighbor discovery protocol cache as "ndp info overwritten". This makes the behavior similar to ARP. ok todd@, deraadt@, henning@, giovanni@, claudio@ --- sys/netinet6/nd6_nbr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/netinet6/nd6_nbr.c') diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 66640769cf3..f1ef2abc899 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_nbr.c,v 1.55 2010/02/08 11:56:09 jsing Exp $ */ +/* $OpenBSD: nd6_nbr.c,v 1.56 2011/03/09 23:31:25 bluhm Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -750,6 +750,11 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) /* * Update link-local address, if any. */ + if (llchange) { + log(LOG_INFO, "ndp info overwritten for %s " + "by %s on %s\n", ip6_sprintf(&taddr6), + ether_sprintf(lladdr), ifp->if_xname); + } if (lladdr) { sdl->sdl_alen = ifp->if_addrlen; bcopy(lladdr, LLADDR(sdl), ifp->if_addrlen); -- cgit v1.2.3