From 05ddbb8d93073fe6263bb3fff26e1c4c8651352e Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Sun, 11 Aug 2013 14:28:45 +0000 Subject: Import IP-Filter 5.1.2 into vendor branches using the existing license that the current version of IP-Filter in FreeBSD is under as per email received from Darren Reed on Mon, 08 Jul 2013 23:54:16 +1000. Approved by: glebius (Mentor), Darren Reed --- 4bsd/ip_output.c.diffs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 4bsd/ip_output.c.diffs (limited to '4bsd/ip_output.c.diffs') diff --git a/4bsd/ip_output.c.diffs b/4bsd/ip_output.c.diffs new file mode 100644 index 0000000000000..4b0350a6d6ac1 --- /dev/null +++ b/4bsd/ip_output.c.diffs @@ -0,0 +1,36 @@ +*** ip_output.c.orig Sun Apr 23 17:17:05 1995 +--- ip_output.c Sun Apr 23 17:32:11 1995 +*************** +*** 60,65 **** +--- 60,69 ---- + static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *)); + static void ip_mloopback + __P((struct ifnet *, struct mbuf *, struct sockaddr_in *)); ++ #if defined(IPFILTER_LKM) || defined(IPFILTER) ++ extern int fr_check __P((struct ip *, int, struct ifnet *, int, struct mbuf *)); ++ extern int (*fr_checkp) __P((struct ip *, int, struct ifnet *, int, struct mbuf *)); ++ #endif + + /* + * IP output. The packet in mbuf chain m contains a skeletal IP +*************** +*** 277,282 **** +--- 284,303 ---- + } else + m->m_flags &= ~M_BCAST; + + sendit: ++ #if defined(IPFILTER) || defined(IPFILTER_LKM) ++ /* ++ * looks like most checking has been done now...do a filter check ++ */ ++ if (fr_checkp) { ++ struct mbuf *m1 = m; ++ ++ if ((error = (*fr_checkp)(ip, hlen, ifp, 1, &m1)) || !m1) ++ goto done; ++ ip = mtod(m = m1, struct ip *); ++ } ++ #endif + /* + * If small enough for interface, can just send directly. -- cgit v1.2.3