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
This commit is contained in:
parent
8f1e435871
commit
16837d2d21
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95043
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user