diff options
author | Michele Marchetto <michele@cvs.openbsd.org> | 2007-05-16 20:27:59 +0000 |
---|---|---|
committer | Michele Marchetto <michele@cvs.openbsd.org> | 2007-05-16 20:27:59 +0000 |
commit | 51a424a6d69e5672d78951b50cd93adbf70d9d45 (patch) | |
tree | 7f6f271e9ef6c3f4f2e1a4e07685e462f8142fae /sys/net/if_bridge.c | |
parent | f75b7e3a2f01c56555fcd65d95ed12e412181008 (diff) |
fix return values in bridge_output.
OK claudio@ jason@
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r-- | sys/net/if_bridge.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index d507ec0bc34..4f8327bb1ba 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.159 2007/05/15 20:14:48 claudio Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.160 2007/05/16 20:27:58 michele Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -1013,13 +1013,13 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa, sc = (struct bridge_softc *)ifp->if_bridge; if (sc == NULL) { m_freem(m); - return (0); + return (EINVAL); } if (m->m_len < sizeof(*eh)) { m = m_pullup(m, sizeof(*eh)); if (m == NULL) - return (0); + return (ENOBUFS); } eh = mtod(m, struct ether_header *); dst = (struct ether_addr *)&eh->ether_dhost[0]; @@ -1148,7 +1148,7 @@ sendunicast: if ((dst_if->if_flags & IFF_RUNNING) == 0) { m_freem(m); splx(s); - return (0); + return (ENETDOWN); } bridge_ifenqueue(sc, dst_if, m); splx(s); |