Hi,
There is no IPv6 default scope in OpenBSD. Remove leftovers.
No binary change.
ok?
bluhm
Index: netinet6/raw_ip6.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/raw_ip6.c,v
retrieving revision 1.50
diff -u -p -r1.50 raw_ip6.c
--- netinet6/raw_ip6.c 30 Mar 2013 12:15:29 -0000 1.50
+++ netinet6/raw_ip6.c 31 Mar 2013 00:03:36 -0000
@@ -88,9 +88,6 @@
#include <netinet/in_pcb.h>
#include <netinet6/nd6.h>
#include <netinet6/ip6protosw.h>
-#ifdef ENABLE_DEFAULT_SCOPE
-#include <netinet6/scope6_var.h>
-#endif
#include <netinet6/raw_ip6.h>
#include <sys/stdarg.h>
@@ -682,11 +679,6 @@ rip6_usrreq(struct socket *so, int req,
error = EADDRNOTAVAIL;
break;
}
-#ifdef ENABLE_DEFAULT_SCOPE
- if (addr->sin6_scope_id == 0) /* not change if specified */
- addr->sin6_scope_id =
- scope6_addr2default(&addr->sin6_addr);
-#endif
/*
* we don't support mapped address here, it would confuse
* users so reject it
@@ -722,9 +714,6 @@ rip6_usrreq(struct socket *so, int req,
{
struct sockaddr_in6 *addr = mtod(nam, struct sockaddr_in6 *);
struct in6_addr *in6a = NULL;
-#ifdef ENABLE_DEFAULT_SCOPE
- struct sockaddr_in6 sin6;
-#endif
if (nam->m_len != sizeof(*addr)) {
error = EINVAL;
@@ -739,16 +728,6 @@ rip6_usrreq(struct socket *so, int req,
break;
}
-#ifdef ENABLE_DEFAULT_SCOPE
- if (addr->sin6_scope_id == 0) {
- /* protect *addr */
- sin6 = *addr;
- addr = &sin6;
- addr->sin6_scope_id =
- scope6_addr2default(&addr->sin6_addr);
- }
-#endif
-
/* Source address selection. XXX: need pcblookup? */
in6a = in6_selectsrc(addr, in6p->in6p_outputopts,
in6p->in6p_moptions, &in6p->in6p_route,
@@ -814,12 +793,6 @@ rip6_usrreq(struct socket *so, int req,
break;
}
}
-#ifdef ENABLE_DEFAULT_SCOPE
- if (dst->sin6_scope_id == 0) {
- dst->sin6_scope_id =
- scope6_addr2default(&dst->sin6_addr);
- }
-#endif
error = rip6_output(m, so, dst, control);
m = NULL;
break;