diff options
Diffstat (limited to 'net/tipc/config.c')
-rw-r--r-- | net/tipc/config.c | 23 |
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) | |||
134 | return buf; | 134 | return buf; |
135 | } | 135 | } |
136 | 136 | ||
137 | static struct sk_buff *cfg_set_netid(struct net *net) | ||
138 | { | ||
139 | struct tipc_net *tn = net_generic(net, tipc_net_id); | ||
140 | u32 value; | ||
141 | |||
142 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED)) | ||
143 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | ||
144 | value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area)); | ||
145 | if (value == tn->net_id) | ||
146 | return tipc_cfg_reply_none(); | ||
147 | if (value < 1 || value > 9999) | ||
148 | return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE | ||
149 | " (network id must be 1-9999)"); | ||
150 | if (tn->own_addr) | ||
151 | return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED | ||
152 | " (cannot change network id once TIPC has joined a network)"); | ||
153 | tn->net_id = value; | ||
154 | return tipc_cfg_reply_none(); | ||
155 | } | ||
156 | |||
157 | struct sk_buff *tipc_cfg_do_cmd(struct net *net, u32 orig_node, u16 cmd, | 137 | struct sk_buff *tipc_cfg_do_cmd(struct net *net, u32 orig_node, u16 cmd, |
158 | const void *request_area, int request_space, | 138 | const void *request_area, int request_space, |
159 | int reply_headroom) | 139 | int reply_headroom) |
@@ -185,9 +165,6 @@ struct sk_buff *tipc_cfg_do_cmd(struct net *net, u32 orig_node, u16 cmd, | |||
185 | case TIPC_CMD_SHOW_STATS: | 165 | case TIPC_CMD_SHOW_STATS: |
186 | rep_tlv_buf = tipc_show_stats(); | 166 | rep_tlv_buf = tipc_show_stats(); |
187 | break; | 167 | break; |
188 | case TIPC_CMD_SET_NETID: | ||
189 | rep_tlv_buf = cfg_set_netid(net); | ||
190 | break; | ||
191 | case TIPC_CMD_GET_NETID: | 168 | case TIPC_CMD_GET_NETID: |
192 | rep_tlv_buf = tipc_cfg_reply_unsigned(tn->net_id); | 169 | rep_tlv_buf = tipc_cfg_reply_unsigned(tn->net_id); |
193 | break; | 170 | break; |