diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-05-12 16:04:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-14 15:31:45 -0400 |
commit | 122ff243f5f104194750ecbc76d5946dd1eec934 (patch) | |
tree | 189020a4d2404ef567785458fee38992e14ca97d /kernel | |
parent | 9cc5e36d1c4794939deafd9f43bce2eab9c1142d (diff) | |
download | linux-122ff243f5f104194750ecbc76d5946dd1eec934.tar.bz2 |
ipv4: make ip_local_reserved_ports per netns
ip_local_port_range is already per netns, so should ip_local_reserved_ports
be. And since it is none by default we don't actually need it when we don't
enable CONFIG_SYSCTL.
By the way, rename inet_is_reserved_local_port() to inet_is_local_reserved_port()
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 74f5b580fe34..e36ae4b15726 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2501,11 +2501,11 @@ int proc_do_large_bitmap(struct ctl_table *table, int write, bool first = 1; size_t left = *lenp; unsigned long bitmap_len = table->maxlen; - unsigned long *bitmap = (unsigned long *) table->data; + unsigned long *bitmap = *(unsigned long **) table->data; unsigned long *tmp_bitmap = NULL; char tr_a[] = { '-', ',', '\n' }, tr_b[] = { ',', '\n', 0 }, c; - if (!bitmap_len || !left || (*ppos && !write)) { + if (!bitmap || !bitmap_len || !left || (*ppos && !write)) { *lenp = 0; return 0; } |