projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbbf472
)
NFC: Forbid LLCP service name reusing
author
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 22 Jun 2012 13:32:20 +0000
(15:32 +0200)
committer
John W. Linville
<linville@tuxdriver.com>
Mon, 9 Jul 2012 20:42:18 +0000
(16:42 -0400)
This patch fixes a typo and return the correct error when trying to
bind 2 sockets to the same service name.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/llcp/sock.c
patch
|
blob
|
history
diff --git
a/net/nfc/llcp/sock.c
b/net/nfc/llcp/sock.c
index 211cb234f7a39288738211fec9779b7ceeccfdc9..e5d80142b825298d134cd6a08ec8d23406496e3c 100644
(file)
--- a/
net/nfc/llcp/sock.c
+++ b/
net/nfc/llcp/sock.c
@@
-121,8
+121,10
@@
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
GFP_KERNEL);
llcp_sock->ssap = nfc_llcp_get_sdp_ssap(local, llcp_sock);
- if (llcp_sock->ssap == LLCP_MAX_SAP)
+ if (llcp_sock->ssap == LLCP_SAP_MAX) {
+ ret = -EADDRINUSE;
goto put_dev;
+ }
llcp_sock->reserved_ssap = llcp_sock->ssap;