summaryrefslogtreecommitdiffstats
path: root/net/tipc/config.c
diff options
context:
space:
mode:
authorRichard Alpe <richard.alpe@ericsson.com>2015-02-09 09:50:15 +0100
committerDavid S. Miller <davem@davemloft.net>2015-02-09 22:20:49 +0100
commit964f9501c1910c0835eee3cf870ba5aa44db1241 (patch)
tree637f191be17fdd1852ca8b439c03904bb479081c /net/tipc/config.c
parenttipc: convert legacy nl node addr set to nl compat (diff)
downloadlinux-964f9501c1910c0835eee3cf870ba5aa44db1241.tar.xz
linux-964f9501c1910c0835eee3cf870ba5aa44db1241.zip
tipc: convert legacy nl net id set to nl compat
Convert TIPC_CMD_SET_NETID to compat doit. Signed-off-by: Richard Alpe <richard.alpe@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/config.c')
-rw-r--r--net/tipc/config.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c
index 2a2d05be8a27..080cc92eedca 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -134,26 +134,6 @@ static struct sk_buff *tipc_show_stats(void)
return buf;
}
-static struct sk_buff *cfg_set_netid(struct net *net)
-{
- struct tipc_net *tn = net_generic(net, tipc_net_id);
- u32 value;
-
- if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
- return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
- value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
- if (value == tn->net_id)
- return tipc_cfg_reply_none();
- if (value < 1 || value > 9999)
- return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
- " (network id must be 1-9999)");
- if (tn->own_addr)
- return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
- " (cannot change network id once TIPC has joined a network)");
- tn->net_id = value;
- return tipc_cfg_reply_none();
-}
-
struct sk_buff *tipc_cfg_do_cmd(struct net *net, u32 orig_node, u16 cmd,
const void *request_area, int request_space,
int reply_headroom)
@@ -185,9 +165,6 @@ struct sk_buff *tipc_cfg_do_cmd(struct net *net, u32 orig_node, u16 cmd,
case TIPC_CMD_SHOW_STATS:
rep_tlv_buf = tipc_show_stats();
break;
- case TIPC_CMD_SET_NETID:
- rep_tlv_buf = cfg_set_netid(net);
- break;
case TIPC_CMD_GET_NETID:
rep_tlv_buf = tipc_cfg_reply_unsigned(tn->net_id);
break;