From cee698ac9ad97f43c36b7e0cf45bd2824cd218e4 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 1 Aug 2010 04:31:58 +0800 Subject: sccp: Remove SCCP address check, routing is a different topic.. We do not do any routing right now... we will accept everything right now and that appears to be fine. --- src/sccp/sccp.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/sccp/sccp.c b/src/sccp/sccp.c index cadedb0..fdc0027 100644 --- a/src/sccp/sccp.c +++ b/src/sccp/sccp.c @@ -154,21 +154,6 @@ static int copy_address(struct sccp_address *addr, uint8_t offset, struct msgb * return 0; } -static int check_address(struct sccp_address *addr) -{ - /* ignore point_code_indicator... it should be zero... but */ - if (addr->address.ssn_indicator != 1 - || addr->address.global_title_indicator == 1 - || addr->address.routing_indicator != 1) { - LOGP(DSCCP, LOGL_ERROR, - "Invalid called address according to 08.06: 0x%x 0x%x\n", - *(uint8_t *)&addr->address, addr->ssn); - return -1; - } - - return 0; -} - static int _sccp_parse_optional_data(const int offset, struct msgb *msgb, struct sccp_optional_data *data) { @@ -229,12 +214,6 @@ int _sccp_parse_connection_request(struct msgb *msgb, struct sccp_parse_result * if (copy_address(&result->called, called_offset + req->variable_called, msgb) != 0) return -1; - if (check_address(&result->called) != 0) { - LOGP(DSCCP, LOGL_ERROR, "Invalid called address according to 08.06: 0x%x 0x%x\n", - *(uint8_t *)&result->called.address, result->called.ssn); - return -1; - } - result->source_local_reference = &req->source_local_reference; /* @@ -443,20 +422,9 @@ int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) if (copy_address(&result->called, called_offset + udt->variable_called, msgb) != 0) return -1; - if (check_address(&result->called) != 0) { - LOGP(DSCCP, LOGL_ERROR, "Invalid called address according to 08.06: 0x%x 0x%x\n", - *(uint8_t *)&result->called.address, result->called.ssn); - return -1; - } - if (copy_address(&result->calling, calling_offset + udt->variable_calling, msgb) != 0) return -1; - if (check_address(&result->calling) != 0) { - LOGP(DSCCP, LOGL_ERROR, "Invalid called address according to 08.06: 0x%x 0x%x\n", - *(uint8_t *)&result->called.address, result->called.ssn); - } - /* we don't have enough size for the data */ if (msgb_l2len(msgb) < data_offset + udt->variable_data + 1) { LOGP(DSCCP, LOGL_ERROR, "msgb < header + offset %u %u %u\n", -- cgit v1.2.3