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/netinet/in_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/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 252c7fb..4e30572 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -357,7 +357,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp, * to any endpoint address, local or not. */ if ((inp->inp_flags & INP_BINDANY) == 0 && - ifa_ifwithaddr((struct sockaddr *)sin) == NULL) + ifa_ifwithaddr_check((struct sockaddr *)sin) == 0) return (EADDRNOTAVAIL); } laddr = sin->sin_addr; |