diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-06-22 10:59:34 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-06-22 10:59:34 +0000 |
commit | 3c02410d55d9cfe0cb4dcbfad5eef376463d8e08 (patch) | |
tree | 45a4f946feeb75c5ed5e8dcc028809c6966e1ba1 /sys/netipx/ipx_pcb.c | |
parent | 0b01d8c2101aa4512c45bd77f2c3fee5137b4595 (diff) | |
download | FreeBSD-src-3c02410d55d9cfe0cb4dcbfad5eef376463d8e08.zip FreeBSD-src-3c02410d55d9cfe0cb4dcbfad5eef376463d8e08.tar.gz |
Add a new function, ifa_ifwithaddr_check(), which rather than returning
a pointer to an ifaddr matching the passed socket address, returns a
boolean indicating whether one was present. In the (near) future,
ifa_ifwithaddr() will return a referenced ifaddr rather than a raw
ifaddr pointer, and the new wrapper will allow callers that care only
about the boolean condition to avoid having to free that reference.
MFC after: 3 weeks
Diffstat (limited to 'sys/netipx/ipx_pcb.c')
-rw-r--r-- | sys/netipx/ipx_pcb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c index bfe68c3..4c8eba0 100644 --- a/sys/netipx/ipx_pcb.c +++ b/sys/netipx/ipx_pcb.c @@ -121,7 +121,7 @@ ipx_pcbbind(struct ipxpcb *ipxp, struct sockaddr *nam, struct thread *td) int tport = sipx->sipx_port; sipx->sipx_port = 0; /* yech... */ - if (ifa_ifwithaddr((struct sockaddr *)sipx) == NULL) + if (ifa_ifwithaddr_check((struct sockaddr *)sipx) == 0) return (EADDRNOTAVAIL); sipx->sipx_port = tport; } |