mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Fix IP(v6) over IP tunneling most likely broken with ifnet changes.
Reviewed by: gnn Approved by: re (dwhite), rwatson (mentor)
This commit is contained in:
parent
c2165a9398
commit
67df9f3896
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147503
@ -225,6 +225,7 @@ in_gif_input(m, off)
|
|||||||
int off;
|
int off;
|
||||||
{
|
{
|
||||||
struct ifnet *gifp = NULL;
|
struct ifnet *gifp = NULL;
|
||||||
|
struct gif_softc *sc;
|
||||||
struct ip *ip;
|
struct ip *ip;
|
||||||
int af;
|
int af;
|
||||||
u_int8_t otos;
|
u_int8_t otos;
|
||||||
@ -233,8 +234,14 @@ in_gif_input(m, off)
|
|||||||
ip = mtod(m, struct ip *);
|
ip = mtod(m, struct ip *);
|
||||||
proto = ip->ip_p;
|
proto = ip->ip_p;
|
||||||
|
|
||||||
gifp = (struct ifnet *)encap_getarg(m);
|
sc = (struct gif_softc *)encap_getarg(m);
|
||||||
|
if (sc == NULL) {
|
||||||
|
m_freem(m);
|
||||||
|
ipstat.ips_nogif++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
gifp = GIF2IFP(sc);
|
||||||
if (gifp == NULL || (gifp->if_flags & IFF_UP) == 0) {
|
if (gifp == NULL || (gifp->if_flags & IFF_UP) == 0) {
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
ipstat.ips_nogif++;
|
ipstat.ips_nogif++;
|
||||||
|
Loading…
Reference in New Issue
Block a user