summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-02-15 22:40:03 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-02-15 22:40:03 +0000
commit29429d311ea5bbc326b8dfa9132a3b4f68b5a551 (patch)
treee84233a62157b84b13188698be29e92f53dcdc11 /sys/netinet
parent3e2547e6586461c2a1a7c4c577d7b6beb2b6922c (diff)
Simplify even more by reducing shared code in #if NBRIDGE and default case.
OK mglocker@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_gif.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c
index b37c54719e9..ce6591d7156 100644
--- a/sys/netinet/in_gif.c
+++ b/sys/netinet/in_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_gif.c,v 1.32 2007/02/10 15:34:22 claudio Exp $ */
+/* $OpenBSD: in_gif.c,v 1.33 2007/02/15 22:40:02 claudio Exp $ */
/* $KAME: in_gif.c,v 1.50 2001/01/22 07:27:16 itojun Exp $ */
/*
@@ -106,23 +106,13 @@ in_gif_output(ifp, family, m)
return EAFNOSUPPORT;
}
+ /* encapsulate into IPv4 packet */
+ mp = NULL;
#if NBRIDGE > 0
- if (family == AF_LINK) {
- mp = NULL;
+ if (family == AF_LINK)
error = etherip_output(m, &tdb, &mp, 0, 0);
- if (error)
- return error;
- else if (mp == NULL)
- return EFAULT;
-
- m = mp;
- return ip_output(m, (void *)NULL, (void *)NULL, 0,
- (void *)NULL, (void *)NULL);
- }
+ else
#endif /* NBRIDGE */
-
- /* encapsulate into IPv4 packet */
- mp = NULL;
error = ipip_output(m, &tdb, &mp, 0, 0);
if (error)
return error;