Permalink
Browse files

fix problems with the previous commit.

verified compilation on openbsd 4.1-current.
  • Loading branch information...
1 parent f349701 commit cc44d597edc0f08d41cbc9c82c3a83118a8112a9 itojun committed Jun 14, 2007
View
@@ -1,4 +1,4 @@
-/* $KAME: if_gif.h,v 1.40 2007/06/14 12:09:42 itojun Exp $ */
+/* $KAME: if_gif.h,v 1.41 2007/06/14 13:51:33 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -105,20 +105,20 @@ extern struct gif_softc *gif_softc;
extern LIST_HEAD(gif_softc_list, gif_softc) gif_softc_list;
/* Prototypes */
-void gifattach0(struct gif_softc *)
+void gifattach0(struct gif_softc *);
#ifndef __OpenBSD__
-void gif_input(struct mbuf *, int, struct ifnet *)
+void gif_input(struct mbuf *, int, struct ifnet *);
#endif
int gif_output(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *)
-int gif_ioctl(struct ifnet *, u_long, caddr_t)
-int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *)
-void gif_delete_tunnel(struct ifnet *)
+ struct rtentry *);
+int gif_ioctl(struct ifnet *, u_long, caddr_t);
+int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *);
+void gif_delete_tunnel(struct ifnet *);
#ifdef __OpenBSD__
-void gif_start(struct ifnet *)
+void gif_start(struct ifnet *);
#endif
#ifdef GIF_ENCAPCHECK
-int gif_encapcheck(const struct mbuf *, int, int, void *)
+int gif_encapcheck(const struct mbuf *, int, int, void *);
#endif
#endif /* _NET_IF_GIF_H_ */
@@ -1,4 +1,4 @@
-/* $KAME: in_gif.c,v 1.100 2007/06/14 12:09:42 itojun Exp $ */
+/* $KAME: in_gif.c,v 1.101 2007/06/14 13:51:33 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -85,7 +85,9 @@
#include "bridge.h"
#endif
+#ifndef __OpenBSD__ /* version??? */
#include <machine/stdarg.h>
+#endif
#include <net/net_osdep.h>
@@ -1,4 +1,4 @@
-/* $KAME: ip_encap.c,v 1.104 2007/06/14 12:09:42 itojun Exp $ */
+/* $KAME: ip_encap.c,v 1.105 2007/06/14 13:51:33 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -124,14 +124,16 @@
#include <netinet/icmp6.h>
#endif
-#include <machine/stdarg.h>
-
#ifdef __NetBSD__
# ifdef MROUTING
# include <netinet/ip_mroute.h>
# endif
#endif
+#ifndef __OpenBSD__ /* version??? */
+#include <machine/stdarg.h>
+#endif
+
#include <net/net_osdep.h>
#ifdef __FreeBSD__
@@ -610,7 +612,7 @@ encap_afcheck(int af, const struct sockaddr *sp, const struct sockaddr *dp)
const struct encaptab *
encap_attach(int af, int proto, const struct sockaddr *sp,
const struct sockaddr *sm, const struct sockaddr *dp,
- const struct sockaddr *dm, const struct sockaddr *psw, void *arg)
+ const struct sockaddr *dm, const struct protosw *psw, void *arg)
{
struct encaptab *ep;
int error;
@@ -1,4 +1,4 @@
-/* $KAME: ip_encap.h,v 1.16 2007/06/14 12:09:42 itojun Exp $ */
+/* $KAME: ip_encap.h,v 1.17 2007/06/14 13:51:33 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -66,7 +66,7 @@ const struct encaptab *encap_attach(int, int, const struct sockaddr *,
const struct sockaddr *, const struct sockaddr *,
const struct sockaddr *, const struct protosw *, void *);
const struct encaptab *encap_attach_func(int, int,
- int (*)(const struct mbuf *, int, int, void *)),
+ int (*)(const struct mbuf *, int, int, void *),
const struct protosw *, void *);
void encap6_ctlinput(int, struct sockaddr *, void *);
int encap_detach(const struct encaptab *);
@@ -1,4 +1,4 @@
-/* $KAME: icmp6.c,v 1.422 2007/06/14 12:09:43 itojun Exp $ */
+/* $KAME: icmp6.c,v 1.423 2007/06/14 13:51:33 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -3521,7 +3521,7 @@ icmp6_mtudisc_timeout(struct rtentry *rt, struct rttimer *r)
#ifdef __OpenBSD__
#include <sys/sysctl.h>
int
-icmp6_sysctl(int name, u_int namelen, void *oldp, size_t oldlenp, void *newp,
+icmp6_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen)
{
@@ -1,4 +1,4 @@
-/* $KAME: in6_ifattach.c,v 1.216 2007/06/14 12:09:43 itojun Exp $ */
+/* $KAME: in6_ifattach.c,v 1.217 2007/06/14 13:51:33 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -355,7 +355,7 @@ generate_tmp_ifid(u_int8_t *seed0, const u_int8_t *seed1, u_int8_t *ret)
* in6 - upper 64bits are preserved
*/
int
-in6_get_hw_ifid(struct ifnet *ifp, struct ifnet *in6)
+in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6)
{
struct ifaddr *ifa;
struct sockaddr_dl *sdl;
@@ -1,4 +1,4 @@
-/* $KAME: in6_src.c,v 1.162 2007/06/14 12:09:43 itojun Exp $ */
+/* $KAME: in6_src.c,v 1.163 2007/06/14 13:51:34 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -577,7 +577,6 @@ in6_selectsrc(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
static int
#ifdef NEW_STRUCT_ROUTE
-#else
selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
struct ip6_moptions *mopts, struct route *ro, struct ifnet **retifp,
struct rtentry **retrt, int clone, int norouteok)
@@ -1128,7 +1127,7 @@ struct walkarg {
#if defined(__OpenBSD__) || defined(__NetBSD__)
int
-in6_src_sysctl(void *oldp, size_t oldlenp, void *newp, size_t newlen)
+in6_src_sysctl(void *oldp, size_t *oldlenp, void *newp, size_t newlen)
{
int error = 0;
int s;
@@ -1193,7 +1192,7 @@ in6_src_sysctl(SYSCTL_HANDLER_ARGS)
#endif /* FreeBSD */
int
-in6_src_ioctl(u_long cmd, caddr_tdata)
+in6_src_ioctl(u_long cmd, caddr_t data)
{
int i;
struct in6_addrpolicy ent0;
@@ -1,4 +1,4 @@
-/* $KAME: ip6_mroute.c,v 1.147 2007/06/14 12:09:44 itojun Exp $ */
+/* $KAME: ip6_mroute.c,v 1.148 2007/06/14 13:51:34 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -1188,6 +1188,7 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m)
struct mbuf *mm;
int s;
mifi_t mifi;
+ struct sockaddr_in6 sin6;
#ifndef __FreeBSD__
long time_second = time.tv_sec;
#endif
@@ -1334,6 +1335,9 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m)
/*
* Send message to routing daemon
*/
+ bzero(&sin6, sizeof(sin6));
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_len = sizeof(sin6);
sin6.sin6_addr = ip6->ip6_src;
im = NULL;
@@ -1523,6 +1527,7 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt)
mifi_t mifi, iif;
struct mif6 *mifp;
int plen = m->m_pkthdr.len;
+ struct sockaddr_in6 sin6;
/*
* Macro to send packet on mif. Since RSVP packets don't get counted on
@@ -1567,8 +1572,6 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt)
* unnecessary PIM assert.
* XXX: M_LOOP is an ad-hoc hack...
*/
- static struct sockaddr_in6 sin6 =
- { sizeof(sin6), AF_INET6 };
struct mbuf *mm;
struct mrt6msg *im;
@@ -1588,6 +1591,9 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt)
oim = NULL;
#endif
im = NULL;
+ bzero(&sin6, sizeof(sin6));
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_len = sizeof(sin6);
switch (ip6_mrouter_ver) {
#ifdef MRT6_OINIT
case MRT6_OINIT:
@@ -1,4 +1,4 @@
-/* $KAME: nd6.c,v 1.402 2007/06/14 12:09:44 itojun Exp $ */
+/* $KAME: nd6.c,v 1.403 2007/06/14 13:51:34 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -2739,7 +2739,7 @@ clear_llinfo_pqueue(struct llinfo_nd6 *ln)
* inp - sysctl arg, need copyin
*/
int
-nd6_sysctl(int name, void *oldp, size_t oldlenp, void *newp, size_t newlen)
+nd6_sysctl(int name, void *oldp, size_t *oldlenp, void *newp, size_t newlen)
{
void *p;
size_t ol, l;
@@ -2825,7 +2825,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS)
static int
#ifndef __FreeBSD__
-fill_drlist(void *oldp, size_t oldlenp, size_t ol)
+fill_drlist(void *oldp, size_t *oldlenp, size_t ol)
#else
fill_drlist(struct sysctl_req *req)
#endif
@@ -1,4 +1,4 @@
-/* $KAME: raw_ip6.c,v 1.168 2007/06/14 12:09:44 itojun Exp $ */
+/* $KAME: raw_ip6.c,v 1.169 2007/06/14 13:51:34 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -119,7 +119,9 @@
#include <netinet6/ipsec.h>
#endif /* IPSEC */
+#ifndef __OpenBSD__ /* version??? */
#include <machine/stdarg.h>
+#endif
#include "faith.h"
#if defined(NFAITH) && 0 < NFAITH

0 comments on commit cc44d59

Please sign in to comment.