diff options
author | suz <suz@FreeBSD.org> | 2002-04-19 11:39:54 +0000 |
---|---|---|
committer | suz <suz@FreeBSD.org> | 2002-04-19 11:39:54 +0000 |
commit | 4c640a08b8558363003a530a69697146c3274834 (patch) | |
tree | 17264a786f07c1f7091aef40ae261e05c04dc53b /usr.sbin/rtsold/rtsol.c | |
parent | 863b592c069b240a8274385d31130736cee3ae99 (diff) | |
download | FreeBSD-src-4c640a08b8558363003a530a69697146c3274834.zip FreeBSD-src-4c640a08b8558363003a530a69697146c3274834.tar.gz |
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
Diffstat (limited to 'usr.sbin/rtsold/rtsol.c')
-rw-r--r-- | usr.sbin/rtsold/rtsol.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c index 62a73d0..5086ea9 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", |