summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-06-16 20:45:52 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-06-16 20:45:52 +0000
commit6c351e1fc4165b660b00b9f9d85529c68bd6af43 (patch)
treedcb4ddaa00dc548c1452b42d75d7a9d584a1ec2d
parenta840089ba8759bf9a85173937a0bd05a853df7ed (diff)
Remove variable sa_family_t family in gif_start() and gif_output().
No functional change. From David Hill; OK claudio@
-rw-r--r--sys/net/if_gif.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 36f33a2c462..5955b458862 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.c,v 1.60 2013/03/26 13:19:25 mpi Exp $ */
+/* $OpenBSD: if_gif.c,v 1.61 2013/06/16 20:45:51 bluhm Exp $ */
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
/*
@@ -149,7 +149,6 @@ gif_start(struct ifnet *ifp)
struct gif_softc *sc = (struct gif_softc*)ifp;
struct mbuf *m;
int s;
- sa_family_t family;
while (1) {
s = splnet();
@@ -167,9 +166,6 @@ gif_start(struct ifnet *ifp)
continue;
}
- /* get tunnel address family */
- family = sc->gif_psrc->sa_family;
-
/*
* Check if the packet is coming via bridge and needs
* etherip encapsulation or not. bridge(4) directly calls
@@ -294,7 +290,6 @@ gif_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
struct gif_softc *sc = (struct gif_softc*)ifp;
int error = 0;
int s;
- sa_family_t family = dst->sa_family;
if (!(ifp->if_flags & IFF_UP) ||
sc->gif_psrc == NULL || sc->gif_pdst == NULL ||
@@ -316,12 +311,12 @@ gif_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
switch (sc->gif_psrc->sa_family) {
#ifdef INET
case AF_INET:
- error = in_gif_output(ifp, family, &m);
+ error = in_gif_output(ifp, dst->sa_family, &m);
break;
#endif
#ifdef INET6
case AF_INET6:
- error = in6_gif_output(ifp, family, &m);
+ error = in6_gif_output(ifp, dst->sa_family, &m);
break;
#endif
default: