summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-05-16 09:48:39 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-05-16 09:48:39 +0000
commit31e21f5b57f1b228d5fed5d96b36976df78a35e2 (patch)
tree043095e06f75420d1c94efd13016a55a00b4f7c2 /sys/netinet6
parent096815990943e7237e8fd06a1d29b5f185bb417c (diff)
rfc 4861 mandates that target link local address must be included
with a neighbour advertisment sent to a multicast address; nits & ok bluhm
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6_nbr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 90e7d19c8b3..beba12165ef 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.62 2012/01/11 19:12:23 bluhm Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.63 2012/05/16 09:48:38 mikeb Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -605,6 +605,12 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len)
goto freeit;
}
+ if (IN6_IS_ADDR_MULTICAST(&daddr6) && !ndopts.nd_opts_tgt_lladdr) {
+ nd6log((LOG_INFO,
+ "nd6_na_input: multicast adv without TLLA\n"));
+ goto bad;
+ }
+
if (ndopts.nd_opts_tgt_lladdr) {
lladdr = (char *)(ndopts.nd_opts_tgt_lladdr + 1);
lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3;