diff options
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 886bda5e88db..106cd0dfac78 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -597,8 +597,7 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) | |||
597 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR)) | 597 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR)) |
598 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | 598 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); |
599 | 599 | ||
600 | domain = *(u32 *)TLV_DATA(req_tlv_area); | 600 | domain = ntohl(*(__be32 *)TLV_DATA(req_tlv_area)); |
601 | domain = ntohl(domain); | ||
602 | if (!tipc_addr_domain_valid(domain)) | 601 | if (!tipc_addr_domain_valid(domain)) |
603 | return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE | 602 | return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE |
604 | " (network address)"); | 603 | " (network address)"); |
@@ -642,8 +641,7 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) | |||
642 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR)) | 641 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR)) |
643 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | 642 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); |
644 | 643 | ||
645 | domain = *(u32 *)TLV_DATA(req_tlv_area); | 644 | domain = ntohl(*(__be32 *)TLV_DATA(req_tlv_area)); |
646 | domain = ntohl(domain); | ||
647 | if (!tipc_addr_domain_valid(domain)) | 645 | if (!tipc_addr_domain_valid(domain)) |
648 | return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE | 646 | return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE |
649 | " (network address)"); | 647 | " (network address)"); |
@@ -664,8 +662,7 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) | |||
664 | 662 | ||
665 | /* Add TLV for broadcast link */ | 663 | /* Add TLV for broadcast link */ |
666 | 664 | ||
667 | link_info.dest = tipc_own_addr & 0xfffff00; | 665 | link_info.dest = htonl(tipc_own_addr & 0xfffff00); |
668 | link_info.dest = htonl(link_info.dest); | ||
669 | link_info.up = htonl(1); | 666 | link_info.up = htonl(1); |
670 | sprintf(link_info.str, tipc_bclink_name); | 667 | sprintf(link_info.str, tipc_bclink_name); |
671 | tipc_cfg_append_tlv(buf, TIPC_TLV_LINK_INFO, &link_info, sizeof(link_info)); | 668 | tipc_cfg_append_tlv(buf, TIPC_TLV_LINK_INFO, &link_info, sizeof(link_info)); |