···107107struct sk_buff *tipc_cfg_reply_unsigned_type(u16 tlv_type, u32 value)108108{109109 struct sk_buff *buf;110110- u32 value_net;110110+ __be32 value_net;111111112112 buf = tipc_cfg_reply_alloc(TLV_SPACE(sizeof(value)));113113 if (buf) {···284284 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR))285285 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);286286287287- addr = *(u32 *)TLV_DATA(req_tlv_area);288288- addr = ntohl(addr);287287+ addr = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));289288 if (addr == tipc_own_addr)290289 return tipc_cfg_reply_none();291290 if (!tipc_addr_node_valid(addr))···318319 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))319320 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);320321321321- value = *(u32 *)TLV_DATA(req_tlv_area);322322- value = ntohl(value);322322+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));323323 tipc_remote_management = (value != 0);324324 return tipc_cfg_reply_none();325325}···330332 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))331333 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);332334333333- value = *(u32 *)TLV_DATA(req_tlv_area);334334- value = ntohl(value);335335+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));335336 if (value != delimit(value, 1, 65535))336337 return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE337338 " (max publications must be 1-65535)");···345348 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))346349 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);347350348348- value = *(u32 *)TLV_DATA(req_tlv_area);349349- value = ntohl(value);351351+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));350352 if (value != delimit(value, 1, 65535))351353 return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE352354 " (max subscriptions must be 1-65535");···359363360364 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))361365 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);362362- value = *(u32 *)TLV_DATA(req_tlv_area);363363- value = ntohl(value);366366+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));364367 if (value == tipc_max_ports)365368 return tipc_cfg_reply_none();366369 if (value != delimit(value, 127, 65535))···378383379384 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))380385 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);381381- value = *(u32 *)TLV_DATA(req_tlv_area);382382- value = ntohl(value);386386+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));383387 if (value == tipc_max_zones)384388 return tipc_cfg_reply_none();385389 if (value != delimit(value, 1, 255))···397403398404 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))399405 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);400400- value = *(u32 *)TLV_DATA(req_tlv_area);401401- value = ntohl(value);406406+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));402407 if (value != delimit(value, 1, 1))403408 return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE404409 " (max clusters fixed at 1)");···410417411418 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))412419 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);413413- value = *(u32 *)TLV_DATA(req_tlv_area);414414- value = ntohl(value);420420+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));415421 if (value == tipc_max_nodes)416422 return tipc_cfg_reply_none();417423 if (value != delimit(value, 8, 2047))···429437430438 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))431439 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);432432- value = *(u32 *)TLV_DATA(req_tlv_area);433433- value = ntohl(value);440440+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));434441 if (value != 0)435442 return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED436443 " (max secondary nodes fixed at 0)");···442451443452 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))444453 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);445445- value = *(u32 *)TLV_DATA(req_tlv_area);446446- value = ntohl(value);454454+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));447455 if (value == tipc_net_id)448456 return tipc_cfg_reply_none();449457 if (value != delimit(value, 1, 9999))
+1-2
net/tipc/dbg.c
···393393 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))394394 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);395395396396- value = *(u32 *)TLV_DATA(req_tlv_area);397397- value = ntohl(value);396396+ value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));398397 if (value != delimit(value, 0, 32768))399398 return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE400399 " (log size must be 0-32768)");