Date: Tue, 18 Aug 2009 09:37:14 GMT From: Ana Kukec <anchie@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 167467 for review Message-ID: <200908180937.n7I9bE6Z028741@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167467 Change 167467 by anchie@anchie_malimis on 2009/08/18 09:37:09 Clear any possible internally embedded scope before passing the packet to userspace for SeND cryptographic signature validation. Affected files ... .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#24 edit Differences ... ==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#24 (text+ko) ==== @@ -17,8 +17,9 @@ #include <net/route.h> #include <net/if.h> +#include <netinet6/in6_var.h> +#include <netinet6/scope6_var.h> #include <netinet6/send.h> -#include <netinet6/in6_var.h> MALLOC_DEFINE(M_SEND, "send", "Secure Neighbour Discovery"); @@ -92,9 +93,16 @@ { u_int len; void *data; + struct ip6_hdr *ip6; - if (m->m_flags & M_MCAST) - printf("%s: DEBUG %p M_MCAST packet\n", __func__, m); + /* + * Make sure to clear any possible internally embedded scope before + * passing the packet to userspace for SeND cryptographic signature + * validation to succeed. + */ + ip6 = mtod(m, struct ip6_hdr *); + in6_clearscope(&ip6->ip6_src); + in6_clearscope(&ip6->ip6_dst); len = m_length(m, NULL); if (len != msglen)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908180937.n7I9bE6Z028741>