summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1998-06-06 20:45:28 +0000
committerjulian <julian@FreeBSD.org>1998-06-06 20:45:28 +0000
commit30cc111a0f023e7efe54d7c4ec29f9673fbc4901 (patch)
treea91dca961834fb3a7e4b2813d23e9b2aece97c8a /sys/netinet
parent2cda12b561a47f469b0a05b3854a548c841356a9 (diff)
downloadFreeBSD-src-30cc111a0f023e7efe54d7c4ec29f9673fbc4901.zip
FreeBSD-src-30cc111a0f023e7efe54d7c4ec29f9673fbc4901.tar.gz
Fix wrong data type for a pointer.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in.h4
-rw-r--r--sys/netinet/ip_divert.c11
-rw-r--r--sys/netinet/ip_fw.c10
-rw-r--r--sys/netinet/ip_input.c4
-rw-r--r--sys/netinet/ip_output.c4
5 files changed, 17 insertions, 16 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index a5422cf..bb6562c 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.h 8.3 (Berkeley) 1/3/94
- * $Id: in.h,v 1.33 1998/05/19 14:04:18 dg Exp $
+ * $Id: in.h,v 1.34 1998/06/06 19:39:08 julian Exp $
*/
#ifndef _NETINET_IN_H_
@@ -431,7 +431,7 @@ char *inet_ntoa __P((struct in_addr)); /* in libkern */
/* Firewall hooks */
struct ip;
-typedef int ip_fw_chk_t __P((struct ip**, int, struct ifnet*, int*, struct mbuf**));
+typedef int ip_fw_chk_t __P((struct ip**, int, struct ifnet*, u_int16_t*, struct mbuf**));
typedef int ip_fw_ctl_t __P((int, struct mbuf**));
extern ip_fw_chk_t *ip_fw_chk_ptr;
extern ip_fw_ctl_t *ip_fw_ctl_ptr;
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 62be4df..f6b850b 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ip_divert.c,v 1.27 1998/06/05 22:39:52 julian Exp $
+ * $Id: ip_divert.c,v 1.28 1998/06/06 19:39:08 julian Exp $
*/
#include "opt_inet.h"
@@ -98,7 +98,7 @@ u_short ip_divert_port;
* 0 will restart processing at the beginning.
* #endif
*/
-u_short ip_divert_cookie;
+u_int16_t ip_divert_cookie;
/* Internal variables */
@@ -163,11 +163,11 @@ div_input(struct mbuf *m, int hlen)
/* Record divert port */
#ifdef IPFW_DIVERT_OLDRESTART
- divsrc.sin_port = htons(ip_divert_port);
+ divsrc.sin_port = htons(ip_divert_cookie);
#else
divsrc.sin_port = ip_divert_cookie;
- ip_divert_cookie = 0;
#endif /* IPFW_DIVERT_OLDRESTART */
+ ip_divert_cookie = 0;
/* Restore packet header fields */
ip->ip_len += hlen;
@@ -333,7 +333,8 @@ div_output(so, m, addr, control)
ip_input(m);
}
- /* Reset for next time (and other packets) */
+ /* paranoid: Reset for next time (and other packets) */
+ /* almost definitly already done in the ipfw filter but.. */
ip_divert_cookie = 0;
return error;
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c
index 0d978b4..c85b77c 100644
--- a/sys/netinet/ip_fw.c
+++ b/sys/netinet/ip_fw.c
@@ -12,7 +12,7 @@
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
- * $Id: ip_fw.c,v 1.86 1998/06/05 23:33:26 julian Exp $
+ * $Id: ip_fw.c,v 1.87 1998/06/06 19:39:08 julian Exp $
*/
/*
@@ -104,7 +104,7 @@ static ip_fw_ctl_t *old_ctl_ptr;
#endif
static int ip_fw_chk __P((struct ip **pip, int hlen,
- struct ifnet *oif, int *cookie, struct mbuf **m));
+ struct ifnet *oif, u_int16_t *cookie, struct mbuf **m));
static int ip_fw_ctl __P((int stage, struct mbuf **mm));
static char err_prefix[] = "ip_fw_ctl:";
@@ -398,7 +398,7 @@ ipfw_report(struct ip_fw *f, struct ip *ip,
static int
ip_fw_chk(struct ip **pip, int hlen,
- struct ifnet *oif, int *cookie, struct mbuf **m)
+ struct ifnet *oif, u_int16_t *cookie, struct mbuf **m)
{
struct ip_fw_chain *chain;
struct ip_fw *rule = NULL;
@@ -407,9 +407,9 @@ ip_fw_chk(struct ip **pip, int hlen,
u_short offset = (ip->ip_off & IP_OFFMASK);
u_short src_port, dst_port;
#ifdef IPFW_DIVERT_OLDRESTART
- int ignport = *cookie;
+ u_int16_t ignport = *cookie;
#else
- int skipto = *cookie;
+ u_int16_t skipto = *cookie;
#endif /* IPFW_DIVERT_OLDRESTART */
*cookie = 0;
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 5f43a95..74cc67b 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id: ip_input.c,v 1.86 1998/06/05 22:39:55 julian Exp $
+ * $Id: ip_input.c,v 1.87 1998/06/06 19:39:09 julian Exp $
* $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
*/
@@ -368,7 +368,7 @@ tooshort:
goto ours;
}
#else
- int dummy;
+ u_int16_t dummy;
/* If ipfw says divert, we have to just drop packet */
if ((*ip_fw_chk_ptr)(&ip, hlen, NULL, &dummy, &m)) {
m_freem(m);
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 9e28ffe..da281b4 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $Id: ip_output.c,v 1.68 1998/06/05 22:40:00 julian Exp $
+ * $Id: ip_output.c,v 1.69 1998/06/06 19:39:09 julian Exp $
*/
#define _IP_VHL
@@ -378,7 +378,7 @@ sendit:
goto done;
}
#else
- int dummy;
+ u_int16_t dummy;
/* If ipfw says divert, we have to just drop packet */
if ((*ip_fw_chk_ptr)(&ip, hlen, ifp, &dummy, &m)) {
m_freem(m);
OpenPOWER on IntegriCloud