diff options
author | Richard Alpe <richard.alpe@ericsson.com> | 2015-02-09 09:50:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-09 13:20:49 -0800 |
commit | d7cc75d3cb6beac88a2bd041a7700154b73a989d (patch) | |
tree | bd74842f38504d8113d4bd42f537fefac4eee016 /net/tipc/config.c | |
parent | 4b28cb581dd0df8d8ff19151f39683f641e576ba (diff) | |
download | linux-d7cc75d3cb6beac88a2bd041a7700154b73a989d.tar.gz linux-d7cc75d3cb6beac88a2bd041a7700154b73a989d.tar.bz2 linux-d7cc75d3cb6beac88a2bd041a7700154b73a989d.zip |
tipc: convert legacy nl node addr set to nl compat
Convert TIPC_CMD_SET_NODE_ADDR 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.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c index 74babd75c07d..2a2d05be8a27 100644 --- a/net/tipc/config.c +++ b/net/tipc/config.c @@ -134,29 +134,6 @@ static struct sk_buff *tipc_show_stats(void) return buf; } -static struct sk_buff *cfg_set_own_addr(struct net *net) -{ - struct tipc_net *tn = net_generic(net, tipc_net_id); - u32 addr; - - if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR)) - return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); - - addr = ntohl(*(__be32 *)TLV_DATA(req_tlv_area)); - if (addr == tn->own_addr) - return tipc_cfg_reply_none(); - if (!tipc_addr_node_valid(addr)) - return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE - " (node address)"); - if (tn->own_addr) - return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED - " (cannot change node address once assigned)"); - if (!tipc_net_start(net, addr)) - return tipc_cfg_reply_none(); - - return tipc_cfg_reply_error_string("cannot change to network mode"); -} - static struct sk_buff *cfg_set_netid(struct net *net) { struct tipc_net *tn = net_generic(net, tipc_net_id); @@ -208,9 +185,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_NODE_ADDR: - rep_tlv_buf = cfg_set_own_addr(net); - break; case TIPC_CMD_SET_NETID: rep_tlv_buf = cfg_set_netid(net); break; |