diff options
| author | Navdeep Parhar <np@FreeBSD.org> | 2012-06-19 07:34:13 +0000 |
|---|---|---|
| committer | Navdeep Parhar <np@FreeBSD.org> | 2012-06-19 07:34:13 +0000 |
| commit | 09fe63205c597be4f762c7f3017e2854c121d6d1 (patch) | |
| tree | 9255a545bbd49a0458ed8850371b4fe6ed2cd01f /sys/ofed/include/linux | |
| parent | 41b8cbda7d45229258c6205b697b5fbf80888493 (diff) | |
Notes
Diffstat (limited to 'sys/ofed/include/linux')
| -rw-r--r-- | sys/ofed/include/linux/net.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/ofed/include/linux/net.h b/sys/ofed/include/linux/net.h index 6e2aff39524b..f47acf938fe7 100644 --- a/sys/ofed/include/linux/net.h +++ b/sys/ofed/include/linux/net.h @@ -48,12 +48,12 @@ sock_getname(struct socket *so, struct sockaddr *addr, int *sockaddr_len, int error; nam = NULL; - if ((so->so_state & (SS_ISCONNECTED|SS_ISCONFIRMING)) == 0) - return (-ENOTCONN); + if (peer) { + if ((so->so_state & (SS_ISCONNECTED|SS_ISCONFIRMING)) == 0) + return (-ENOTCONN); - if (peer) error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, nam); - else + } else error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, nam); if (error) return (-error); |
