diff options
author | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-06-02 13:09:29 +0200 |
---|---|---|
committer | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-06-02 13:09:29 +0200 |
commit | c6da2cfeb05178a11c6d062a06f8078150ee492f (patch) | |
tree | f3b4021d252c52d6463a9b3c1bb7245e399b009c /net/phonet | |
parent | c6d7c4dbff353eac7919342ae6b3299a378160a6 (diff) | |
download | kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.zip kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.gz kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.bz2 |
samsung update 1
Diffstat (limited to 'net/phonet')
-rw-r--r-- | net/phonet/af_phonet.c | 2 | ||||
-rw-r--r-- | net/phonet/socket.c | 2 | ||||
-rw-r--r-- | net/phonet/sysctl.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index c6fffd9..91734cd 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c @@ -68,8 +68,10 @@ static int pn_socket_create(struct net *net, struct socket *sock, int protocol, struct phonet_protocol *pnp; int err; +#if !defined(CONFIG_SAMSUNG_PHONE_SVNET) if (!capable(CAP_SYS_ADMIN)) return -EPERM; +#endif if (protocol == 0) { /* Default protocol selection */ diff --git a/net/phonet/socket.c b/net/phonet/socket.c index ab07711..b24bf54 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c @@ -506,7 +506,7 @@ int pn_sock_get_port(struct sock *sk, unsigned short sport) phonet_get_local_port_range(&pmin, &pmax); for (port = pmin; port <= pmax; port++) { - port_cur++; + port_cur += PN_HASHSIZE; if (port_cur < pmin || port_cur > pmax) port_cur = pmin; diff --git a/net/phonet/sysctl.c b/net/phonet/sysctl.c index cea1c7d..2f9858c 100644 --- a/net/phonet/sysctl.c +++ b/net/phonet/sysctl.c @@ -28,7 +28,7 @@ #include <linux/init.h> #define DYNAMIC_PORT_MIN 0x40 -#define DYNAMIC_PORT_MAX 0x7f +#define DYNAMIC_PORT_MAX 0xff static DEFINE_SEQLOCK(local_port_range_lock); static int local_port_range_min[2] = {0, 0}; |