Wed Jan 20 22:11:23 2016 UTC ()
Pass the requisite number of arguments to ip_output from ipf.

Fortunately the last argument, struct socket *so, is used only when
flags includes IP_DF (0x4000), which is not the case here -- we pass
IP_FORWARDING (0x0001).


(riastradh)
diff -r1.11 -r1.12 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c

cvs diff -r1.11 -r1.12 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c (expand / switch to unified diff)

--- src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c 2014/07/25 08:10:39 1.11
+++ src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c 2016/01/20 22:11:23 1.12
@@ -1,24 +1,24 @@ @@ -1,24 +1,24 @@
1/* $NetBSD: ip_fil_netbsd.c,v 1.11 2014/07/25 08:10:39 dholland Exp $ */ 1/* $NetBSD: ip_fil_netbsd.c,v 1.12 2016/01/20 22:11:23 riastradh Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 2012 by Darren Reed. 4 * Copyright (C) 2012 by Darren Reed.
5 * 5 *
6 * See the IPFILTER.LICENCE file for details on licencing. 6 * See the IPFILTER.LICENCE file for details on licencing.
7 */ 7 */
8#if !defined(lint) 8#if !defined(lint)
9#if defined(__NetBSD__) 9#if defined(__NetBSD__)
10#include <sys/cdefs.h> 10#include <sys/cdefs.h>
11__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.11 2014/07/25 08:10:39 dholland Exp $"); 11__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.12 2016/01/20 22:11:23 riastradh Exp $");
12#else 12#else
13static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; 13static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
14static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp"; 14static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
15#endif 15#endif
16#endif 16#endif
17 17
18#if defined(KERNEL) || defined(_KERNEL) 18#if defined(KERNEL) || defined(_KERNEL)
19# undef KERNEL 19# undef KERNEL
20# undef _KERNEL 20# undef _KERNEL
21# define KERNEL 1 21# define KERNEL 1
22# define _KERNEL 1 22# define _KERNEL 1
23#endif 23#endif
24#include <sys/param.h> 24#include <sys/param.h>
@@ -1925,27 +1925,27 @@ ipf_pullup(mb_t *xmin, fr_info_t *fin, i @@ -1925,27 +1925,27 @@ ipf_pullup(mb_t *xmin, fr_info_t *fin, i
1925int 1925int
1926ipf_inject(fr_info_t *fin, mb_t *m) 1926ipf_inject(fr_info_t *fin, mb_t *m)
1927{ 1927{
1928 int error; 1928 int error;
1929 1929
1930 if (fin->fin_out == 0) { 1930 if (fin->fin_out == 0) {
1931 if (__predict_false(!pktq_enqueue(ip_pktq, m, 0))) { 1931 if (__predict_false(!pktq_enqueue(ip_pktq, m, 0))) {
1932 FREE_MB_T(m); 1932 FREE_MB_T(m);
1933 error = ENOBUFS; 1933 error = ENOBUFS;
1934 } else { 1934 } else {
1935 error = 0; 1935 error = 0;
1936 } 1936 }
1937 } else { 1937 } else {
1938 error = ip_output(m, NULL, NULL, IP_FORWARDING, NULL); 1938 error = ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL);
1939 } 1939 }
1940 return error; 1940 return error;
1941} 1941}
1942 1942
1943 1943
1944u_32_t 1944u_32_t
1945ipf_random(void) 1945ipf_random(void)
1946{ 1946{
1947 int number; 1947 int number;
1948 1948
1949#ifdef _CPRNG_H 1949#ifdef _CPRNG_H
1950 number = cprng_fast32(); 1950 number = cprng_fast32();
1951#else 1951#else