diff options
| -rw-r--r-- | include/linux/tipc_config.h | 4 | ||||
| -rw-r--r-- | net/tipc/config.c | 23 | ||||
| -rw-r--r-- | net/tipc/core.c | 2 | ||||
| -rw-r--r-- | net/tipc/core.h | 2 | ||||
| -rw-r--r-- | net/tipc/name_table.c | 4 |
5 files changed, 7 insertions, 28 deletions
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h index 8dd8305c26c5..0b1e3f218a36 100644 --- a/include/linux/tipc_config.h +++ b/include/linux/tipc_config.h | |||
| @@ -89,7 +89,7 @@ | |||
| 89 | 89 | ||
| 90 | #define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */ | 90 | #define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */ |
| 91 | #define TIPC_CMD_GET_MAX_PORTS 0x4004 /* tx none, rx unsigned */ | 91 | #define TIPC_CMD_GET_MAX_PORTS 0x4004 /* tx none, rx unsigned */ |
| 92 | #define TIPC_CMD_GET_MAX_PUBL 0x4005 /* tx none, rx unsigned */ | 92 | #define TIPC_CMD_GET_MAX_PUBL 0x4005 /* obsoleted */ |
| 93 | #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* obsoleted */ | 93 | #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* obsoleted */ |
| 94 | #define TIPC_CMD_GET_MAX_ZONES 0x4007 /* obsoleted */ | 94 | #define TIPC_CMD_GET_MAX_ZONES 0x4007 /* obsoleted */ |
| 95 | #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* obsoleted */ | 95 | #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* obsoleted */ |
| @@ -115,7 +115,7 @@ | |||
| 115 | #define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */ | 115 | #define TIPC_CMD_SET_NODE_ADDR 0x8001 /* tx net_addr, rx none */ |
| 116 | #define TIPC_CMD_SET_REMOTE_MNG 0x8003 /* tx unsigned, rx none */ | 116 | #define TIPC_CMD_SET_REMOTE_MNG 0x8003 /* tx unsigned, rx none */ |
| 117 | #define TIPC_CMD_SET_MAX_PORTS 0x8004 /* tx unsigned, rx none */ | 117 | #define TIPC_CMD_SET_MAX_PORTS 0x8004 /* tx unsigned, rx none */ |
| 118 | #define TIPC_CMD_SET_MAX_PUBL 0x8005 /* tx unsigned, rx none */ | 118 | #define TIPC_CMD_SET_MAX_PUBL 0x8005 /* obsoleted */ |
| 119 | #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* obsoleted */ | 119 | #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* obsoleted */ |
| 120 | #define TIPC_CMD_SET_MAX_ZONES 0x8007 /* obsoleted */ | 120 | #define TIPC_CMD_SET_MAX_ZONES 0x8007 /* obsoleted */ |
| 121 | #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* obsoleted */ | 121 | #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* obsoleted */ |
diff --git a/net/tipc/config.c b/net/tipc/config.c index 7a1275863c8a..f67866c765dd 100644 --- a/net/tipc/config.c +++ b/net/tipc/config.c | |||
| @@ -208,21 +208,6 @@ static struct sk_buff *cfg_set_remote_mng(void) | |||
| 208 | return tipc_cfg_reply_none(); | 208 | return tipc_cfg_reply_none(); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | static struct sk_buff *cfg_set_max_publications(void) | ||
| 212 | { | ||
| 213 | u32 value; | ||
| 214 | |||
| 215 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED)) | ||
| 216 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | ||
| 217 | |||
| 218 | value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area)); | ||
| 219 | if (value < 1 || value > 65535) | ||
| 220 | return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE | ||
| 221 | " (max publications must be 1-65535)"); | ||
| 222 | tipc_max_publications = value; | ||
| 223 | return tipc_cfg_reply_none(); | ||
| 224 | } | ||
| 225 | |||
| 226 | static struct sk_buff *cfg_set_max_ports(void) | 211 | static struct sk_buff *cfg_set_max_ports(void) |
| 227 | { | 212 | { |
| 228 | u32 value; | 213 | u32 value; |
| @@ -342,9 +327,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area | |||
| 342 | case TIPC_CMD_SET_MAX_PORTS: | 327 | case TIPC_CMD_SET_MAX_PORTS: |
| 343 | rep_tlv_buf = cfg_set_max_ports(); | 328 | rep_tlv_buf = cfg_set_max_ports(); |
| 344 | break; | 329 | break; |
| 345 | case TIPC_CMD_SET_MAX_PUBL: | ||
| 346 | rep_tlv_buf = cfg_set_max_publications(); | ||
| 347 | break; | ||
| 348 | case TIPC_CMD_SET_NETID: | 330 | case TIPC_CMD_SET_NETID: |
| 349 | rep_tlv_buf = cfg_set_netid(); | 331 | rep_tlv_buf = cfg_set_netid(); |
| 350 | break; | 332 | break; |
| @@ -354,9 +336,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area | |||
| 354 | case TIPC_CMD_GET_MAX_PORTS: | 336 | case TIPC_CMD_GET_MAX_PORTS: |
| 355 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports); | 337 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports); |
| 356 | break; | 338 | break; |
| 357 | case TIPC_CMD_GET_MAX_PUBL: | ||
| 358 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_publications); | ||
| 359 | break; | ||
| 360 | case TIPC_CMD_GET_NETID: | 339 | case TIPC_CMD_GET_NETID: |
| 361 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id); | 340 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id); |
| 362 | break; | 341 | break; |
| @@ -374,6 +353,8 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area | |||
| 374 | case TIPC_CMD_GET_MAX_NODES: | 353 | case TIPC_CMD_GET_MAX_NODES: |
| 375 | case TIPC_CMD_SET_MAX_SUBSCR: | 354 | case TIPC_CMD_SET_MAX_SUBSCR: |
| 376 | case TIPC_CMD_GET_MAX_SUBSCR: | 355 | case TIPC_CMD_GET_MAX_SUBSCR: |
| 356 | case TIPC_CMD_SET_MAX_PUBL: | ||
| 357 | case TIPC_CMD_GET_MAX_PUBL: | ||
| 377 | case TIPC_CMD_SET_LOG_SIZE: | 358 | case TIPC_CMD_SET_LOG_SIZE: |
| 378 | case TIPC_CMD_DUMP_LOG: | 359 | case TIPC_CMD_DUMP_LOG: |
| 379 | rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED | 360 | rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED |
diff --git a/net/tipc/core.c b/net/tipc/core.c index 73e5eac20735..bfe8af88469a 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
| @@ -53,7 +53,6 @@ int tipc_random __read_mostly; | |||
| 53 | /* configurable TIPC parameters */ | 53 | /* configurable TIPC parameters */ |
| 54 | u32 tipc_own_addr __read_mostly; | 54 | u32 tipc_own_addr __read_mostly; |
| 55 | int tipc_max_ports __read_mostly; | 55 | int tipc_max_ports __read_mostly; |
| 56 | int tipc_max_publications; | ||
| 57 | int tipc_net_id __read_mostly; | 56 | int tipc_net_id __read_mostly; |
| 58 | int tipc_remote_management __read_mostly; | 57 | int tipc_remote_management __read_mostly; |
| 59 | 58 | ||
| @@ -155,7 +154,6 @@ static int __init tipc_init(void) | |||
| 155 | 154 | ||
| 156 | tipc_own_addr = 0; | 155 | tipc_own_addr = 0; |
| 157 | tipc_remote_management = 1; | 156 | tipc_remote_management = 1; |
| 158 | tipc_max_publications = 10000; | ||
| 159 | tipc_max_ports = CONFIG_TIPC_PORTS; | 157 | tipc_max_ports = CONFIG_TIPC_PORTS; |
| 160 | tipc_net_id = 4711; | 158 | tipc_net_id = 4711; |
| 161 | 159 | ||
diff --git a/net/tipc/core.h b/net/tipc/core.h index ef01412b0989..0207db04179a 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | 62 | ||
| 63 | #define ULTRA_STRING_MAX_LEN 32768 | 63 | #define ULTRA_STRING_MAX_LEN 32768 |
| 64 | #define TIPC_MAX_SUBSCRIPTIONS 65535 | 64 | #define TIPC_MAX_SUBSCRIPTIONS 65535 |
| 65 | #define TIPC_MAX_PUBLICATIONS 65535 | ||
| 65 | 66 | ||
| 66 | struct tipc_msg; /* msg.h */ | 67 | struct tipc_msg; /* msg.h */ |
| 67 | 68 | ||
| @@ -77,7 +78,6 @@ int tipc_snprintf(char *buf, int len, const char *fmt, ...); | |||
| 77 | */ | 78 | */ |
| 78 | extern u32 tipc_own_addr __read_mostly; | 79 | extern u32 tipc_own_addr __read_mostly; |
| 79 | extern int tipc_max_ports __read_mostly; | 80 | extern int tipc_max_ports __read_mostly; |
| 80 | extern int tipc_max_publications; | ||
| 81 | extern int tipc_net_id __read_mostly; | 81 | extern int tipc_net_id __read_mostly; |
| 82 | extern int tipc_remote_management __read_mostly; | 82 | extern int tipc_remote_management __read_mostly; |
| 83 | 83 | ||
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 4ebdcc96cb04..98975e80bb51 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
| @@ -667,9 +667,9 @@ struct publication *tipc_nametbl_publish(u32 type, u32 lower, u32 upper, | |||
| 667 | { | 667 | { |
| 668 | struct publication *publ; | 668 | struct publication *publ; |
| 669 | 669 | ||
| 670 | if (table.local_publ_count >= tipc_max_publications) { | 670 | if (table.local_publ_count >= TIPC_MAX_PUBLICATIONS) { |
| 671 | pr_warn("Publication failed, local publication limit reached (%u)\n", | 671 | pr_warn("Publication failed, local publication limit reached (%u)\n", |
| 672 | tipc_max_publications); | 672 | TIPC_MAX_PUBLICATIONS); |
| 673 | return NULL; | 673 | return NULL; |
| 674 | } | 674 | } |
| 675 | 675 | ||
