diff options
author | 2013-06-16 20:45:51 +0000 | |
---|---|---|
committer | 2013-06-16 20:45:51 +0000 | |
commit | 24fc57373bd6f88ed2adf8f737063483464cd5be (patch) | |
tree | ffa9fbccf273c79da4d794d9229d85b0417988d5 | |
parent | Quote values in the variable assignments, to be bulletproof in the face (diff) | |
download | wireguard-openbsd-24fc57373bd6f88ed2adf8f737063483464cd5be.tar.xz wireguard-openbsd-24fc57373bd6f88ed2adf8f737063483464cd5be.zip |
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.c | 11 |
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: |