V_loif is not an array but a pure pointer, so treat it as such.

Reviewed by:	bz
Approved by:	julian (mentor)
This commit is contained in:
Marko Zec 2009-06-01 21:29:54 +00:00
parent 75cf69394b
commit d825c7936c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193274
2 changed files with 2 additions and 2 deletions

View File

@ -3717,7 +3717,7 @@ pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir,
* order to support scoped addresses. In order to support stateful
* filtering we have change this to lo0 as it is the case in IPv4.
*/
chk = pf_test6(PF_IN, (*m)->m_flags & M_LOOP ? &V_loif[0] : ifp, m,
chk = pf_test6(PF_IN, (*m)->m_flags & M_LOOP ? V_loif : ifp, m,
NULL, inp);
if (chk && *m) {
m_freem(*m);

View File

@ -380,7 +380,7 @@ ip6_input(struct mbuf *m)
#define M2MMAX (sizeof(V_ip6stat.ip6s_m2m)/sizeof(V_ip6stat.ip6s_m2m[0]))
if (m->m_next) {
if (m->m_flags & M_LOOP) {
V_ip6stat.ip6s_m2m[V_loif[0].if_index]++; /* XXX */
V_ip6stat.ip6s_m2m[V_loif->if_index]++;
} else if (m->m_pkthdr.rcvif->if_index < M2MMAX)
V_ip6stat.ip6s_m2m[m->m_pkthdr.rcvif->if_index]++;
else