MFC 1.85: don't embed scope id before running packet filters.
This commit is contained in:
parent
c35747e82b
commit
4b7ff8cc00
@ -404,26 +404,6 @@ ip6_input(m)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Disambiguate address scope zones (if there is ambiguity).
|
||||
* We first make sure that the original source or destination address
|
||||
* is not in our internal form for scoped addresses. Such addresses
|
||||
* are not necessarily invalid spec-wise, but we cannot accept them due
|
||||
* to the usage conflict.
|
||||
* in6_setscope() then also checks and rejects the cases where src or
|
||||
* dst are the loopback address and the receiving interface
|
||||
* is not loopback.
|
||||
*/
|
||||
if (in6_clearscope(&ip6->ip6_src) || in6_clearscope(&ip6->ip6_dst)) {
|
||||
ip6stat.ip6s_badscope++; /* XXX */
|
||||
goto bad;
|
||||
}
|
||||
if (in6_setscope(&ip6->ip6_src, m->m_pkthdr.rcvif, NULL) ||
|
||||
in6_setscope(&ip6->ip6_dst, m->m_pkthdr.rcvif, NULL)) {
|
||||
ip6stat.ip6s_badscope++;
|
||||
goto bad;
|
||||
}
|
||||
|
||||
/*
|
||||
* Run through list of hooks for input packets.
|
||||
*
|
||||
@ -460,6 +440,26 @@ passin:
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Disambiguate address scope zones (if there is ambiguity).
|
||||
* We first make sure that the original source or destination address
|
||||
* is not in our internal form for scoped addresses. Such addresses
|
||||
* are not necessarily invalid spec-wise, but we cannot accept them due
|
||||
* to the usage conflict.
|
||||
* in6_setscope() then also checks and rejects the cases where src or
|
||||
* dst are the loopback address and the receiving interface
|
||||
* is not loopback.
|
||||
*/
|
||||
if (in6_clearscope(&ip6->ip6_src) || in6_clearscope(&ip6->ip6_dst)) {
|
||||
ip6stat.ip6s_badscope++; /* XXX */
|
||||
goto bad;
|
||||
}
|
||||
if (in6_setscope(&ip6->ip6_src, m->m_pkthdr.rcvif, NULL) ||
|
||||
in6_setscope(&ip6->ip6_dst, m->m_pkthdr.rcvif, NULL)) {
|
||||
ip6stat.ip6s_badscope++;
|
||||
goto bad;
|
||||
}
|
||||
|
||||
/*
|
||||
* Multicast check
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user