diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-02-10 15:34:23 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-02-10 15:34:23 +0000 |
commit | 42462f3a4b95f56870005e9f46c22a32a9278d5b (patch) | |
tree | 5e947939e99718fe660b77b5ac5fbafce19cf528 /sys/netinet6 | |
parent | 3e9033756c2f1ae422c059eb8554e36d5655287c (diff) |
Cleanup, kill dead code and unused arguments. Mostly stuff that is computed
and passed around but never used. OK mglocker@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_gif.c | 21 | ||||
-rw-r--r-- | sys/netinet6/in6_gif.h | 4 |
2 files changed, 5 insertions, 20 deletions
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 578bdd8a3b7..b64a6d34367 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_gif.c,v 1.22 2003/12/03 14:51:05 markus Exp $ */ +/* $OpenBSD: in6_gif.c,v 1.23 2007/02/10 15:34:22 claudio Exp $ */ /* $KAME: in6_gif.c,v 1.43 2001/01/22 07:27:17 itojun Exp $ */ /* @@ -69,11 +69,10 @@ #endif int -in6_gif_output(ifp, family, m, rt) +in6_gif_output(ifp, family, m) struct ifnet *ifp; int family; /* family of the packet to be encapsulate. */ struct mbuf *m; - struct rtentry *rt; { struct gif_softc *sc = (struct gif_softc*)ifp; struct sockaddr_in6 *dst = (struct sockaddr_in6 *)&sc->gif_ro6.ro_dst; @@ -82,7 +81,6 @@ in6_gif_output(ifp, family, m, rt) struct tdb tdb; struct xformsw xfs; int error; - int hlen, poff; struct mbuf *mp; if (sin6_src == NULL || sin6_dst == NULL || @@ -107,24 +105,11 @@ in6_gif_output(ifp, family, m, rt) switch (family) { #ifdef INET case AF_INET: - { - if (m->m_len < sizeof(struct ip)) { - m = m_pullup(m, sizeof(struct ip)); - if (m == NULL) - return ENOBUFS; - } - hlen = (mtod(m, struct ip *)->ip_hl) << 2; - poff = offsetof(struct ip, ip_p); break; - } #endif #ifdef INET6 case AF_INET6: - { - hlen = sizeof(struct ip6_hdr); - poff = offsetof(struct ip6_hdr, ip6_nxt); break; - } #endif #if NBRIDGE > 0 case AF_LINK: @@ -155,7 +140,7 @@ in6_gif_output(ifp, family, m, rt) /* encapsulate into IPv6 packet */ mp = NULL; - error = ipip_output(m, &tdb, &mp, hlen, poff); + error = ipip_output(m, &tdb, &mp, 0, 0); if (error) return error; else if (mp == NULL) diff --git a/sys/netinet6/in6_gif.h b/sys/netinet6/in6_gif.h index fab09831dc1..209db1471b7 100644 --- a/sys/netinet6/in6_gif.h +++ b/sys/netinet6/in6_gif.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_gif.h,v 1.4 2002/03/14 01:27:11 millert Exp $ */ +/* $OpenBSD: in6_gif.h,v 1.5 2007/02/10 15:34:22 claudio Exp $ */ /* $KAME: in6_gif.h,v 1.5 2000/04/14 08:36:03 itojun Exp $ */ /* @@ -34,6 +34,6 @@ #define _NETINET6_IN6_GIF_H_ int in6_gif_input(struct mbuf **, int *, int); -int in6_gif_output(struct ifnet *, int, struct mbuf *, struct rtentry *); +int in6_gif_output(struct ifnet *, int, struct mbuf *); #endif /*_NETINET6_IN6_GIF_H_*/ |