summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2008-07-21 22:15:21 +0000
committerJulian Elischer <julian@FreeBSD.org>2008-07-21 22:15:21 +0000
commitc3878c23826911338b69543ad6dd9ae2ebc75112 (patch)
treeee3116853c8021a53ac692cff8d69e60fc1bea28
parent6fef9b090cfb300de8e0557c34f6428e9aca674f (diff)
Notes
-rw-r--r--sys/net/if_gre.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index bd208f1a97cd..b4b42b99cd3b 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -742,7 +742,6 @@ static int
gre_compute_route(struct gre_softc *sc)
{
struct route *ro;
- u_int32_t a, b, c;
ro = &sc->route;
@@ -755,16 +754,10 @@ gre_compute_route(struct gre_softc *sc)
* toggle last bit, so our interface is not found, but a less
* specific route. I'd rather like to specify a shorter mask,
* but this is not possible. Should work though. XXX
- * there is a simpler way ...
*/
if ((GRE2IFP(sc)->if_flags & IFF_LINK1) == 0) {
- a = ntohl(sc->g_dst.s_addr);
- b = a & 0x01;
- c = a & 0xfffffffe;
- b = b ^ 0x01;
- a = b | c;
- ((struct sockaddr_in *)&ro->ro_dst)->sin_addr.s_addr
- = htonl(a);
+ ((struct sockaddr_in *)&ro->ro_dst)->sin_addr.s_addr ^=
+ htonl(0x01);
}
#ifdef DIAGNOSTIC