#if defined(NFAITH) && NFAITH > 0
#include "faith.h"
#include <net/if_types.h>
+#endif
+
+ /* XXX This one should go in sys/mbuf.h. It is used to avoid that
+ * a firewall-generated packet loops forever through the firewall.
+ */
+#ifndef M_SKIP_FIREWALL
+#define M_SKIP_FIREWALL 0x4000
#endif
/*
m = m_gethdr(M_DONTWAIT, MT_HEADER);
if (m == NULL)
goto freeit;
+
+ if (n->m_flags & M_SKIP_FIREWALL) {
+ /* set M_SKIP_FIREWALL to skip firewall check, since we're called from firewall */
+ m->m_flags |= M_SKIP_FIREWALL;
+ }
+
icmplen = min(oiplen + 8, oip->ip_len);
if (icmplen < sizeof(struct ip)) {
printf("icmp_error: bad length\n");
*/
if (ia == (struct in_ifaddr *)0) {
ia = in_ifaddrhead.tqh_first;
+ if (ia == (struct in_ifaddr *)0) {/* no address yet, bail out */
+ m_freem(m);
+ lck_mtx_unlock(rt_mtx);
+ goto done;
+ }
ifaref(&ia->ia_ifa);
}
lck_mtx_unlock(rt_mtx);