When checking traffic endpoint's adresses families in key_spdadd(),
compare them together instead of comparing each one with respective tunnel endpoint. PR: kern/138439 Submitted by: aurelien.ansel@netasq.com Obtained from: NETASQ MFC after: 1 m
This commit is contained in:
parent
102dfdb197
commit
22c125a1b6
@ -1925,18 +1925,8 @@ key_spdadd(so, m, mhp)
|
||||
return key_senderror(so, m, EINVAL);
|
||||
}
|
||||
#if 1
|
||||
if (newsp->req && newsp->req->saidx.src.sa.sa_family) {
|
||||
struct sockaddr *sa;
|
||||
sa = (struct sockaddr *)(src0 + 1);
|
||||
if (sa->sa_family != newsp->req->saidx.src.sa.sa_family) {
|
||||
_key_delsp(newsp);
|
||||
return key_senderror(so, m, EINVAL);
|
||||
}
|
||||
}
|
||||
if (newsp->req && newsp->req->saidx.dst.sa.sa_family) {
|
||||
struct sockaddr *sa;
|
||||
sa = (struct sockaddr *)(dst0 + 1);
|
||||
if (sa->sa_family != newsp->req->saidx.dst.sa.sa_family) {
|
||||
if (newsp->req && newsp->req->saidx.src.sa.sa_family && newsp->req->saidx.dst.sa.sa_family) {
|
||||
if (newsp->req->saidx.src.sa.sa_family != newsp->req->saidx.dst.sa.sa_family) {
|
||||
_key_delsp(newsp);
|
||||
return key_senderror(so, m, EINVAL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user