Our packet filters use mbuf's rcvif pointer to determine incoming interface.
Change mbuf's rcvif to enc0 and restore it after pfil processing. PR: 110959 Sponsored by: Yandex LLC
This commit is contained in:
parent
15983afb04
commit
9ef268219a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272695
@ -230,6 +230,7 @@ ipsec_filter(struct mbuf **mp, int dir, int flags)
|
||||
{
|
||||
int error, i;
|
||||
struct ip *ip;
|
||||
struct ifnet *rcvif;
|
||||
|
||||
KASSERT(encif != NULL, ("%s: encif is null", __func__));
|
||||
KASSERT(flags & (ENC_IN|ENC_OUT),
|
||||
@ -268,6 +269,8 @@ ipsec_filter(struct mbuf **mp, int dir, int flags)
|
||||
}
|
||||
|
||||
error = 0;
|
||||
rcvif = (*mp)->m_pkthdr.rcvif;
|
||||
(*mp)->m_pkthdr.rcvif = encif;
|
||||
ip = mtod(*mp, struct ip *);
|
||||
switch (ip->ip_v) {
|
||||
#ifdef INET
|
||||
@ -298,6 +301,7 @@ ipsec_filter(struct mbuf **mp, int dir, int flags)
|
||||
if (error != 0)
|
||||
goto bad;
|
||||
|
||||
(*mp)->m_pkthdr.rcvif = rcvif;
|
||||
return (error);
|
||||
|
||||
bad:
|
||||
|
Loading…
Reference in New Issue
Block a user