Fix PR5508: ipfil cut-through forwarding causes panic
This commit is contained in:
parent
ff4a1ce958
commit
534520d815
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip_input.c,v 1.67 1998/06/01 00:39:37 thorpej Exp $ */
|
||||
/* $NetBSD: ip_input.c,v 1.68 1998/07/17 00:28:00 sommerfe Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -329,7 +329,10 @@ next:
|
||||
rv = pfh->pfil_func(ip, hlen, m->m_pkthdr.rcvif, 0, &m0);
|
||||
if (rv)
|
||||
goto next;
|
||||
ip = mtod(m = m0, struct ip *);
|
||||
m = m0;
|
||||
if (m == NULL)
|
||||
goto next;
|
||||
ip = mtod(m, struct ip *);
|
||||
}
|
||||
#endif /* PFIL_HOOKS */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip_output.c,v 1.48 1998/04/28 15:26:00 matt Exp $ */
|
||||
/* $NetBSD: ip_output.c,v 1.49 1998/07/17 00:28:01 sommerfe Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -356,7 +356,10 @@ ip_output(m0, va_alist)
|
||||
error = EHOSTUNREACH;
|
||||
goto done;
|
||||
}
|
||||
ip = mtod(m = m1, struct ip *);
|
||||
m = m1;
|
||||
if (m == NULL)
|
||||
goto done;
|
||||
ip = mtod(m, struct ip *);
|
||||
}
|
||||
#endif /* PFIL_HOOKS */
|
||||
sendit:
|
||||
|
Loading…
Reference in New Issue
Block a user