From: itojun Date: Thu, 13 Apr 2000 14:34:10 +0000 (+0000) Subject: bark if sdl_alen == 0. test code for KAME PR 235. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b4ee66fc2bf7d1c35a2b51f0cc17aedc950e33c4;p=openbsd bark if sdl_alen == 0. test code for KAME PR 235. --- diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index c2def8c65ea..e1e60e61194 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.8 2000/04/13 14:11:17 itojun Exp $ */ +/* $OpenBSD: nd6.c,v 1.9 2000/04/13 14:34:10 itojun Exp $ */ /* $KAME: nd6.c,v 1.41 2000/02/24 16:34:50 itojun Exp $ */ /* @@ -1858,8 +1858,11 @@ nd6_storelladdr(ifp, rt, m, dst, desten) return(0); } sdl = SDL(rt->rt_gateway); - if (sdl->sdl_alen != 0) - bcopy(LLADDR(sdl), desten, sdl->sdl_alen); + if (sdl->sdl_alen == 0) { + printf("nd6_storelladdr: sdl_alen == 0\n"); + return(0); + } + bcopy(LLADDR(sdl), desten, sdl->sdl_alen); return(1); }