diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-03-01 03:14:23 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-03-01 03:14:23 +0000 |
commit | b0b5f961bd295aee20ca2584b96ebf00e9cb92f3 (patch) | |
tree | 6b16845a701c80c2675bb9aed085227f806e915d /sys/net | |
parent | 9fe9a307306d35d1219be5eb3a88475032b080d0 (diff) | |
download | FreeBSD-src-b0b5f961bd295aee20ca2584b96ebf00e9cb92f3.zip FreeBSD-src-b0b5f961bd295aee20ca2584b96ebf00e9cb92f3.tar.gz |
Rename dup_sockaddr() to sodupsockaddr() for consistency with other
functions in kern_socket.c.
Rename the "canwait" field to "mflags" and pass M_WAITOK and M_NOWAIT
in from the caller context rather than "1" or "0".
Correct mflags pass into mac_init_socket() from previous commit to not
include M_ZERO.
Submitted by: sam
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/raw_usrreq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c index 1f49959..2fff75c 100644 --- a/sys/net/raw_usrreq.c +++ b/sys/net/raw_usrreq.c @@ -36,6 +36,7 @@ #include <sys/param.h> #include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/protosw.h> #include <sys/signalvar.h> @@ -216,7 +217,7 @@ raw_upeeraddr(struct socket *so, struct sockaddr **nam) if (rp->rcb_faddr == 0) { return ENOTCONN; } - *nam = dup_sockaddr(rp->rcb_faddr, 1); + *nam = sodupsockaddr(rp->rcb_faddr, M_WAITOK); return 0; } @@ -286,7 +287,7 @@ raw_usockaddr(struct socket *so, struct sockaddr **nam) return EINVAL; if (rp->rcb_laddr == 0) return EINVAL; - *nam = dup_sockaddr(rp->rcb_laddr, 1); + *nam = sodupsockaddr(rp->rcb_laddr, M_WAITOK); return 0; } |