summaryrefslogtreecommitdiff
path: root/sys/net/bridgectl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/bridgectl.c')
-rw-r--r--sys/net/bridgectl.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/net/bridgectl.c b/sys/net/bridgectl.c
index 4f27669fd92..ca2d1986659 100644
--- a/sys/net/bridgectl.c
+++ b/sys/net/bridgectl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bridgectl.c,v 1.14 2019/02/14 18:19:13 mpi Exp $ */
+/* $OpenBSD: bridgectl.c,v 1.15 2019/02/17 15:21:31 mpi Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -90,9 +90,8 @@ bridgectl_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
}
- ifs = bridge_rtupdate(sc, &bareq->ifba_dst, ifs, 1,
- bareq->ifba_flags, NULL);
- if (ifs == NULL)
+ if (bridge_rtupdate(sc, &bareq->ifba_dst, ifs, 1,
+ bareq->ifba_flags, NULL))
error = ENOMEM;
break;
case SIOCBRDGDADDR:
@@ -180,14 +179,14 @@ bridgectl_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
return (error);
}
-struct ifnet *
+int
bridge_rtupdate(struct bridge_softc *sc, struct ether_addr *ea,
struct ifnet *ifp, int setflags, u_int8_t flags, struct mbuf *m)
{
struct bridge_rtnode *p, *q;
struct bridge_tunneltag *brtag = NULL;
u_int32_t h;
- int dir;
+ int dir, error = 0;
if (m != NULL) {
/* Check if the mbuf was tagged with a tunnel endpoint addr */
@@ -283,9 +282,9 @@ bridge_rtupdate(struct bridge_softc *sc, struct ether_addr *ea,
} while (p != NULL);
done:
- ifp = NULL;
+ error = 1;
want:
- return (ifp);
+ return (error);
}
struct bridge_rtnode *