Fix order of arguments in fib[46]_lookup calls in SCTP.
r360292 introduced the wrong order, resulting in returned nhops not being referenced, despite the fact that references were requested. That lead to random GPF after using SCTP sockets. Special defined macro like IPV[46]_SCOPE_GLOBAL will be introduced soon to reduce the chance of putting arguments in wrong order. Reported-by: syzbot+5c813c01096363174684@syzkaller.appspotmail.com
This commit is contained in:
parent
32f32669c3
commit
17cb6ddba8
@ -403,9 +403,9 @@ typedef struct route sctp_route_t;
|
||||
{ \
|
||||
if ((ro)->ro_nh == NULL) { \
|
||||
if ((ro)->ro_dst.sa_family == AF_INET) \
|
||||
(ro)->ro_nh = fib4_lookup(fibnum, ((struct sockaddr_in *)&(ro)->ro_dst)->sin_addr, NHR_REF, 0, 0); \
|
||||
(ro)->ro_nh = fib4_lookup(fibnum, ((struct sockaddr_in *)&(ro)->ro_dst)->sin_addr, 0, NHR_REF, 0); \
|
||||
if ((ro)->ro_dst.sa_family == AF_INET6) \
|
||||
(ro)->ro_nh = fib6_lookup(fibnum, &((struct sockaddr_in6 *)&(ro)->ro_dst)->sin6_addr, NHR_REF, 0, 0); \
|
||||
(ro)->ro_nh = fib6_lookup(fibnum, &((struct sockaddr_in6 *)&(ro)->ro_dst)->sin6_addr, 0, NHR_REF, 0); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user