aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorSUZUKI Shinsuke <suz@FreeBSD.org>2002-04-19 11:39:54 +0000
committerSUZUKI Shinsuke <suz@FreeBSD.org>2002-04-19 11:39:54 +0000
commit16837d2d217061001d2c4e743d4b81237deb194c (patch)
tree17264a786f07c1f7091aef40ae261e05c04dc53b /usr.sbin
parent8f1e43587124432d57b5e93cb2baf842101f4de3 (diff)
downloadsrc-16837d2d217061001d2c4e743d4b81237deb194c.tar.gz
src-16837d2d217061001d2c4e743d4b81237deb194c.zip
Explicitly specifies sin6_family & sin6_len of sockaddr_in6 for raw socket
destination. (Currently lack of their specification does not lead to any problem, because kernel does not check the consistency between actual address and its address family / length on raw socket. However kernel should always check their consistency and stop sending packets if there is a contradiction. Considering backward compatibility of programs, I just fixed rtsol now; I'd like to fix the kernel behavior later.) Reviewed by: ume MFC after: 3 days
Notes
Notes: svn path=/head/; revision=95043
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rtsold/rtsol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c
index 62a73d00ae83..5086ea90bbb1 100644
--- a/usr.sbin/rtsold/rtsol.c
+++ b/usr.sbin/rtsold/rtsol.c
@@ -1,4 +1,4 @@
-/* $KAME: rtsol.c,v 1.11 2000/08/13 06:14:59 itojun Exp $ */
+/* $KAME: rtsol.c,v 1.12 2001/11/12 11:47:11 jinmei Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -92,6 +92,8 @@ sockopen()
return(-1);
}
memset(&sin6_allrouters, 0, sizeof(struct sockaddr_in6));
+ sin6_allrouters.sin6_family = AF_INET6;
+ sin6_allrouters.sin6_len = sizeof(sin6_allrouters);
if (inet_pton(AF_INET6, ALLROUTER,
&sin6_allrouters.sin6_addr.s6_addr) != 1) {
warnmsg(LOG_ERR, __FUNCTION__, "inet_pton failed for %s",