PERFORCE change 167467 for review
Ana Kukec
anchie at FreeBSD.org
Tue Aug 18 09:37:15 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=167467
Change 167467 by anchie at 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)
More information about the p4-projects
mailing list