lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

December 2022

  • 1 participants
  • 1979 discussions
Change in osmo-ttcn3-hacks[master]: start-testsuite.sh: allow redefining TITAN_LIBRARY_PATH from env
by fixeria 25 Dec '22

25 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30788 ) Change subject: start-testsuite.sh: allow redefining TITAN_LIBRARY_PATH from env ...................................................................... start-testsuite.sh: allow redefining TITAN_LIBRARY_PATH from env I am not using Debian, so I always have to edit this file in order to be able to run the testsuites. Keep using default paths for Debian, but allow redefining the TITAN_LIBRARY_PATH variable. Change-Id: I3778a52697a182dbac39de6c18a053832ef78d93 --- M start-testsuite.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/30788/1 diff --git a/start-testsuite.sh b/start-testsuite.sh index b9324bb..a1e753d 100755 --- a/start-testsuite.sh +++ b/start-testsuite.sh @@ -47,7 +47,7 @@ # below is for the debian packages TTCN3_BIN_DIR="${TTCN3_BIN_DIR:-/usr/bin}" -TITAN_LIBRARY_PATH="/usr/lib/titan:/usr/ttcn3/lib" +TITAN_LIBRARY_PATH="${TITAN_LIBRARY_PATH:-/usr/lib/titan:/usr/ttcn3/lib}" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SUITE_DIR:$TITAN_LIBRARY_PATH" "$TTCN3_BIN_DIR/ttcn3_start" $SUITE $CFG $TEST expected="$SUITE_DIR/expected-results.xml" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30788 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3778a52697a182dbac39de6c18a053832ef78d93 Gerrit-Change-Number: 30788 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-sgsn[master]: Rename gprs_gb.[c,h] -> gprs_ns.[c,h]
by laforge 24 Dec '22

24 Dec '22
Attention is currently required from: osmith, pespin, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30786 ) Change subject: Rename gprs_gb.[c,h] -> gprs_ns.[c,h] ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30786 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I8312c8a70d60cab48764950c5b57ca02964e9db2 Gerrit-Change-Number: 30786 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 24 Dec 2022 09:41:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-sgsn[master]: Move some functions gprs_gb.[c,h] -> gprs_gmm.[c,h]
by laforge 24 Dec '22

24 Dec '22
Attention is currently required from: osmith, pespin, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30785 ) Change subject: Move some functions gprs_gb.[c,h] -> gprs_gmm.[c,h] ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30785 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3dcbe1d0f75cb91ec8b700e239e2ba16fff030a2 Gerrit-Change-Number: 30785 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 24 Dec 2022 09:41:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-sgsn[master]: Create new specific file for BSSGP code
by laforge 24 Dec '22

24 Dec '22
Attention is currently required from: osmith, pespin, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30784 ) Change subject: Create new specific file for BSSGP code ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30784 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I816396ab5ccb86032bbc21b41a959934a7768780 Gerrit-Change-Number: 30784 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 24 Dec 2022 09:40:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hlr[master]: osmo_mdns_rfc_record/question_encode: remove ctx
by laforge 24 Dec '22

24 Dec '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/30778 ) Change subject: osmo_mdns_rfc_record/question_encode: remove ctx ...................................................................... osmo_mdns_rfc_record/question_encode: remove ctx Remove the ctx argument to both functions, as it's not used anymore. Related: OS#5821 Change-Id: I5e3dd18bf08f7aa42f49c262e13250778ea0c6a2 --- M include/osmocom/mslookup/mdns_rfc.h M src/mslookup/mdns_msg.c M src/mslookup/mdns_rfc.c M tests/mslookup/mdns_test.c 4 files changed, 8 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/mslookup/mdns_rfc.h b/include/osmocom/mslookup/mdns_rfc.h index 4aaee96..364b4d3 100644 --- a/include/osmocom/mslookup/mdns_rfc.h +++ b/include/osmocom/mslookup/mdns_rfc.h @@ -102,9 +102,9 @@ void osmo_mdns_rfc_header_encode(struct msgb *msg, const struct osmo_mdns_rfc_header *hdr); int osmo_mdns_rfc_header_decode(const uint8_t *data, size_t data_len, struct osmo_mdns_rfc_header *hdr); -int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst); +int osmo_mdns_rfc_question_encode(struct msgb *msg, const struct osmo_mdns_rfc_question *qst); struct osmo_mdns_rfc_question *osmo_mdns_rfc_question_decode(void *ctx, const uint8_t *data, size_t data_len); -int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec); +int osmo_mdns_rfc_record_encode(struct msgb *msg, const struct osmo_mdns_rfc_record *rec); struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_t *data, size_t data_len, size_t *record_len); diff --git a/src/mslookup/mdns_msg.c b/src/mslookup/mdns_msg.c index 78ea67a..fb291e1 100644 --- a/src/mslookup/mdns_msg.c +++ b/src/mslookup/mdns_msg.c @@ -40,7 +40,7 @@ qst.domain = req->domain; qst.qtype = req->type; qst.qclass = OSMO_MDNS_RFC_CLASS_IN; - if (osmo_mdns_rfc_question_encode(ctx, msg, &qst) != 0) + if (osmo_mdns_rfc_question_encode(msg, &qst) != 0) return -EINVAL; return 0; @@ -106,7 +106,7 @@ rec.rdlength = ans_record->length; rec.rdata = ans_record->data; - if (osmo_mdns_rfc_record_encode(ctx, msg, &rec) != 0) + if (osmo_mdns_rfc_record_encode(msg, &rec) != 0) return -EINVAL; } diff --git a/src/mslookup/mdns_rfc.c b/src/mslookup/mdns_rfc.c index 7bfd328..8a8cdec 100644 --- a/src/mslookup/mdns_rfc.c +++ b/src/mslookup/mdns_rfc.c @@ -69,7 +69,7 @@ /*! Encode question section (RFC 1035 4.1.2). * \param[in] msgb mesage buffer to which the encoded data will be appended. */ -int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst) +int osmo_mdns_rfc_question_encode(struct msgb *msg, const struct osmo_mdns_rfc_question *qst) { uint8_t *buf; size_t buf_len; @@ -125,7 +125,7 @@ /*! Encode one resource record (RFC 1035 4.1.3). * \param[in] msgb mesage buffer to which the encoded data will be appended. */ -int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec) +int osmo_mdns_rfc_record_encode(struct msgb *msg, const struct osmo_mdns_rfc_record *rec) { uint8_t *buf; size_t buf_len; diff --git a/tests/mslookup/mdns_test.c b/tests/mslookup/mdns_test.c index 3e5a230..e9fc1fb 100644 --- a/tests/mslookup/mdns_test.c +++ b/tests/mslookup/mdns_test.c @@ -147,7 +147,7 @@ struct msgb *msg = msgb_alloc(4096, "dns_test"); PRINT_QST(&in, "in"); - assert(osmo_mdns_rfc_question_encode(ctx, msg, &in) == 0); + assert(osmo_mdns_rfc_question_encode(msg, &in) == 0); fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); out = osmo_mdns_rfc_question_decode(ctx, msgb_data(msg), msgb_length(msg)); assert(out); @@ -211,7 +211,7 @@ size_t record_len; PRINT_REC(&in, "in"); - assert(osmo_mdns_rfc_record_encode(ctx, msg, &in) == 0); + assert(osmo_mdns_rfc_record_encode(msg, &in) == 0); fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); out = osmo_mdns_rfc_record_decode(ctx, msgb_data(msg), msgb_length(msg), &record_len); fprintf(stderr, "record_len: %lu\n", record_len); -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/30778 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5e3dd18bf08f7aa42f49c262e13250778ea0c6a2 Gerrit-Change-Number: 30778 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-hlr[master]: mslookup: use apn functions from libosmocore
by laforge 24 Dec '22

24 Dec '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/30777 ) Change subject: mslookup: use apn functions from libosmocore ...................................................................... mslookup: use apn functions from libosmocore Use the apn functions from libosmocore to encode and decode qnames to avoid code duplication and to avoid unnecessary dynamic allocation. The unit tests for encoding and decoding rfc_question / rfc_record are still passing and have the same output. Fixes: OS#5821 Change-Id: I09d3c617fd6eb4075084ee106d3f3c5803861d2f --- M include/osmocom/mslookup/mdns_rfc.h M src/mslookup/mdns_rfc.c M tests/mslookup/mdns_test.c M tests/mslookup/mdns_test.err 4 files changed, 34 insertions(+), 339 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/mslookup/mdns_rfc.h b/include/osmocom/mslookup/mdns_rfc.h index 9d6be5a..4aaee96 100644 --- a/include/osmocom/mslookup/mdns_rfc.h +++ b/include/osmocom/mslookup/mdns_rfc.h @@ -99,9 +99,6 @@ uint8_t *rdata; }; -char *osmo_mdns_rfc_qname_encode(void *ctx, const char *domain); -char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_len); - void osmo_mdns_rfc_header_encode(struct msgb *msg, const struct osmo_mdns_rfc_header *hdr); int osmo_mdns_rfc_header_decode(const uint8_t *data, size_t data_len, struct osmo_mdns_rfc_header *hdr); diff --git a/src/mslookup/mdns_rfc.c b/src/mslookup/mdns_rfc.c index eddba30..7bfd328 100644 --- a/src/mslookup/mdns_rfc.c +++ b/src/mslookup/mdns_rfc.c @@ -27,92 +27,10 @@ #include <osmocom/core/msgb.h> #include <osmocom/core/bitvec.h> #include <osmocom/core/logging.h> +#include <osmocom/gsm/apn.h> #include <osmocom/mslookup/mdns_rfc.h> /* - * Encode/decode IEs - */ - -/*! Encode a domain string as qname (RFC 1035 4.1.2). - * \param[in] domain multiple labels separated by dots, e.g. "sip.voice.1234.msisdn". - * \returns allocated buffer with length-value pairs for each label (e.g. 0x03 "sip" 0x05 "voice" ...), NULL on error. - */ -char *osmo_mdns_rfc_qname_encode(void *ctx, const char *domain) -{ - char *domain_dup; - char *domain_iter; - char buf[OSMO_MDNS_RFC_MAX_NAME_LEN + 2] = ""; /* len(qname) is len(domain) +1 */ - struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) }; - char *label; - - if (strlen(domain) > OSMO_MDNS_RFC_MAX_NAME_LEN) - return NULL; - - domain_iter = domain_dup = talloc_strdup(ctx, domain); - while ((label = strsep(&domain_iter, "."))) { - size_t len = strlen(label); - - /* Empty domain, dot at start, two dots in a row, or ending with a dot */ - if (!len) - goto error; - - OSMO_STRBUF_PRINTF(sb, "%c%s", (char)len, label); - } - - talloc_free(domain_dup); - return talloc_strdup(ctx, buf); - -error: - talloc_free(domain_dup); - return NULL; -} - -/*! Decode a domain string from a qname (RFC 1035 4.1.2). - * \param[in] qname buffer with length-value pairs for each label (e.g. 0x03 "sip" 0x05 "voice" ...) - * \param[in] qname_max_len amount of bytes that can be read at most from the memory location that qname points to. - * \returns allocated buffer with domain string, multiple labels separated by dots (e.g. "sip.voice.1234.msisdn"), - * NULL on error. - */ -char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_max_len) -{ - const char *next_label, *qname_end = qname + qname_max_len; - char buf[OSMO_MDNS_RFC_MAX_NAME_LEN + 1]; - int i = 0; - - if (qname_max_len < 1) - return NULL; - - while (*qname) { - size_t len; - - if (i >= qname_max_len) - return NULL; - - len = *qname; - next_label = qname + len + 1; - - if (next_label >= qname_end || i + len > OSMO_MDNS_RFC_MAX_NAME_LEN) - return NULL; - - if (i) { - /* Two dots in a row is not allowed */ - if (buf[i - 1] == '.') - return NULL; - - buf[i] = '.'; - i++; - } - - memcpy(buf + i, qname + 1, len); - i += len; - qname = next_label; - } - buf[i] = '\0'; - - return talloc_strdup(ctx, buf); -} - -/* * Encode/decode message sections */ @@ -153,18 +71,15 @@ */ int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst) { - char *qname; - size_t qname_len; - uint8_t *qname_buf; + uint8_t *buf; + size_t buf_len; /* qname */ - qname = osmo_mdns_rfc_qname_encode(ctx, qst->domain); - if (!qname) + buf_len = strlen(qst->domain) + 1; + buf = msgb_put(msg, buf_len); + if (osmo_apn_from_str(buf, buf_len, qst->domain) < 0) return -EINVAL; - qname_len = strlen(qname) + 1; - qname_buf = msgb_put(msg, qname_len); - memcpy(qname_buf, qname, qname_len); - talloc_free(qname); + msgb_put_u8(msg, 0x00); /* qtype and qclass */ msgb_put_u16(msg, qst->qtype); @@ -182,21 +97,25 @@ if (data_len < 6) return NULL; - /* qname */ ret = talloc_zero(ctx, struct osmo_mdns_rfc_question); if (!ret) return NULL; - ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, qname_len); - if (!ret->domain) { - talloc_free(ret); - return NULL; - } + + /* qname */ + ret->domain = talloc_size(ret, qname_len - 1); + if (!ret->domain) + goto error; + if (!osmo_apn_to_str(ret->domain, data, qname_len - 1)) + goto error; /* qtype and qclass */ ret->qtype = osmo_load16be(data + qname_len); ret->qclass = osmo_load16be(data + qname_len + 2); return ret; +error: + talloc_free(ret); + return NULL; } /* @@ -208,18 +127,15 @@ */ int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec) { - char *name; - size_t name_len; uint8_t *buf; + size_t buf_len; /* name */ - name = osmo_mdns_rfc_qname_encode(ctx, rec->domain); - if (!name) + buf_len = strlen(rec->domain) + 1; + buf = msgb_put(msg, buf_len); + if (osmo_apn_from_str(buf, buf_len, rec->domain) < 0) return -EINVAL; - name_len = strlen(name) + 1; - buf = msgb_put(msg, name_len); - memcpy(buf, name, name_len); - talloc_free(name); + msgb_put_u8(msg, 0x00); /* type, class, ttl, rdlength */ msgb_put_u16(msg, rec->type); @@ -240,16 +156,23 @@ struct osmo_mdns_rfc_record *ret; size_t name_len; + /* name length: represented as a series of labels, and terminated by a + * label with zero length (RFC 1035 3.3). A label with zero length is a + * NUL byte. */ + name_len = strnlen((const char *)data, data_len - 10) + 1; + if (data[name_len]) + return NULL; + + /* allocate ret + ret->domain */ ret = talloc_zero(ctx, struct osmo_mdns_rfc_record); if (!ret) return NULL; - - /* name */ - ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, data_len - 10); + ret->domain = talloc_size(ctx, name_len - 1); if (!ret->domain) goto error; - name_len = strlen(ret->domain) + 2; - if (name_len + 10 > data_len) + + /* name */ + if (!osmo_apn_to_str(ret->domain, data, name_len - 1)) goto error; /* type, class, ttl, rdlength */ diff --git a/tests/mslookup/mdns_test.c b/tests/mslookup/mdns_test.c index 7b26f0f..3e5a230 100644 --- a/tests/mslookup/mdns_test.c +++ b/tests/mslookup/mdns_test.c @@ -32,148 +32,6 @@ size_t qname_max_len; /* default: strlen(qname) + 1 */ }; -static const struct qname_enc_dec_test qname_enc_dec_test_data[] = { - { - /* OK: typical mslookup domain */ - .domain = "hlr.1234567.imsi", - .qname = "\x03" "hlr" "\x07" "1234567" "\x04" "imsi", - }, - { - /* Wrong format: double dot */ - .domain = "hlr..imsi", - .qname = NULL, - }, - { - /* Wrong format: double dot */ - .domain = "hlr", - .qname = "\x03hlr\0\x03imsi", - }, - { - /* Wrong format: dot at end */ - .domain = "hlr.", - .qname = NULL, - }, - { - /* Wrong format: dot at start */ - .domain = ".hlr", - .qname = NULL, - }, - { - /* Wrong format: empty */ - .domain = "", - .qname = NULL, - }, - { - /* OK: maximum length */ - .domain = - "123456789." "123456789." "123456789." "123456789." "123456789." - "123456789." "123456789." "123456789." "123456789." "123456789." - "123456789." "123456789." "123456789." "123456789." "123456789." - "123456789." "123456789." "123456789." "123456789." "123456789." - "123456789." "123456789." "123456789." "123456789." "123456789." - "12345" - , - .qname = - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\x05" "12345" - }, - { - /* Error: too long domain */ - .domain = - "123456789." "123456789." "123456789." "123456789." "123456789." - "123456789." "123456789." "123456789." "123456789." "123456789." - "123456789." "123456789." "123456789." "123456789." "123456789." - "123456789." "123456789." "123456789." "123456789." "123456789." - "123456789." "123456789." "123456789." "123456789." "123456789." - "12345toolong" - , - .qname = NULL, - }, - { - /* Error: too long qname */ - .domain = NULL, - .qname = - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - "\t123456789\t123456789\t123456789\t123456789\t123456789" - }, - { - /* Error: wrong token length in qname */ - .domain = NULL, - .qname = "\x03" "hlr" "\x07" "1234567" "\x05" "imsi", - }, - { - /* Error: wrong token length in qname */ - .domain = NULL, - .qname = "\x02" "hlr" "\x07" "1234567" "\x04" "imsi", - }, - { - /* Wrong format: token length at end of qname */ - .domain = NULL, - .qname = "\x03hlr\x03", - }, - { - /* Error: overflow in label length */ - .domain = NULL, - .qname = "\x03" "hlr" "\x07" "1234567" "\x04" "imsi", - .qname_max_len = 17, - }, -}; - -void test_enc_dec_rfc_qname(void *ctx) -{ - char quote_buf[300]; - int i; - - fprintf(stderr, "-- %s --\n", __func__); - - for (i = 0; i < ARRAY_SIZE(qname_enc_dec_test_data); i++) { - const struct qname_enc_dec_test *t = &qname_enc_dec_test_data[i]; - char *res; - - if (t->domain) { - fprintf(stderr, "domain: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->domain, -1)); - fprintf(stderr, "exp: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->qname, -1)); - res = osmo_mdns_rfc_qname_encode(ctx, t->domain); - fprintf(stderr, "res: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), res, -1)); - if (t->qname == res || (t->qname && res && strcmp(t->qname, res) == 0)) - fprintf(stderr, "=> OK\n"); - else - fprintf(stderr, "=> ERROR\n"); - if (res) - talloc_free(res); - fprintf(stderr, "\n"); - } - - if (t->qname) { - size_t qname_max_len = t->qname_max_len; - if (qname_max_len) - fprintf(stderr, "qname_max_len: %lu\n", qname_max_len); - else - qname_max_len = strlen(t->qname) + 1; - - fprintf(stderr, "qname: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->qname, -1)); - fprintf(stderr, "exp: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->domain, -1)); - res = osmo_mdns_rfc_qname_decode(ctx, t->qname, qname_max_len); - fprintf(stderr, "res: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), res, -1)); - if (t->domain == res || (t->domain && res && strcmp(t->domain, res) == 0)) - fprintf(stderr, "=> OK\n"); - else - fprintf(stderr, "=> ERROR\n"); - if (res) - talloc_free(res); - fprintf(stderr, "\n"); - } - } -} - #define PRINT_HDR(hdr, name) \ fprintf(stderr, "header %s:\n" \ ".id = %i\n" \ @@ -589,7 +447,6 @@ log_set_print_category_hex(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); - test_enc_dec_rfc_qname(ctx); test_enc_dec_rfc_header(); test_enc_dec_rfc_header_einval(); test_enc_dec_rfc_question(ctx); diff --git a/tests/mslookup/mdns_test.err b/tests/mslookup/mdns_test.err index 51e5afe..0d650be 100644 --- a/tests/mslookup/mdns_test.err +++ b/tests/mslookup/mdns_test.err @@ -1,85 +1,3 @@ --- test_enc_dec_rfc_qname -- -domain: "hlr.1234567.imsi" -exp: "\3hlr\a1234567\4imsi" -res: "\3hlr\a1234567\4imsi" -=> OK - -qname: "\3hlr\a1234567\4imsi" -exp: "hlr.1234567.imsi" -res: "hlr.1234567.imsi" -=> OK - -domain: "hlr..imsi" -exp: NULL -res: NULL -=> OK - -domain: "hlr" -exp: "\3hlr" -res: "\3hlr" -=> OK - -qname: "\3hlr" -exp: "hlr" -res: "hlr" -=> OK - -domain: "hlr." -exp: NULL -res: NULL -=> OK - -domain: ".hlr" -exp: NULL -res: NULL -=> OK - -domain: "" -exp: NULL -res: NULL -=> OK - -domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" -exp: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" -res: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" -=> OK - -qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" -exp: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" -res: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" -=> OK - -domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345toolong" -exp: NULL -res: NULL -=> OK - -qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\ -exp: NULL -res: NULL -=> OK - -qname: "\3hlr\a1234567\5imsi" -exp: NULL -res: NULL -=> OK - -qname: "\2hlr\a1234567\4imsi" -exp: NULL -res: NULL -=> OK - -qname: "\3hlr\3" -exp: NULL -res: NULL -=> OK - -qname_max_len: 17 -qname: "\3hlr\a1234567\4imsi" -exp: NULL -res: NULL -=> OK - -- test_enc_dec_rfc_header -- header in: .id = 1337 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/30777 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I09d3c617fd6eb4075084ee106d3f3c5803861d2f Gerrit-Change-Number: 30777 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-hlr[master]: osmo_mdns_rfc_record/question_encode: remove ctx
by laforge 24 Dec '22

24 Dec '22
Attention is currently required from: osmith. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/30778 ) Change subject: osmo_mdns_rfc_record/question_encode: remove ctx ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/30778 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5e3dd18bf08f7aa42f49c262e13250778ea0c6a2 Gerrit-Change-Number: 30778 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Sat, 24 Dec 2022 09:39:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hlr[master]: mslookup: use apn functions from libosmocore
by laforge 24 Dec '22

24 Dec '22
Attention is currently required from: osmith. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/30777 ) Change subject: mslookup: use apn functions from libosmocore ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/30777 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I09d3c617fd6eb4075084ee106d3f3c5803861d2f Gerrit-Change-Number: 30777 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Sat, 24 Dec 2022 09:39:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-trx[master]: configure.ac: fix: properly check whether to enable ms-trx
by laforge 24 Dec '22

24 Dec '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/30783 ) Change subject: configure.ac: fix: properly check whether to enable ms-trx ...................................................................... configure.ac: fix: properly check whether to enable ms-trx Condition 'test ENABLE_MS_TRX' is always true because 'ENABLE_MS_TRX' is a string literal, not a variable... Because of this, automeke will unconditionally try to configure the submodule. Change-Id: Icbb9278c688bfe506d5ad726f16a6c200572de1b Fixes: b7253c6fdc88a3e2e0c8b441dc3c34dfb1c15d24 Related: OS#5599 --- M configure.ac 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 699fb32..ff1ae8b 100644 --- a/configure.ac +++ b/configure.ac @@ -334,7 +334,7 @@ AC_MSG_RESULT([CXXFLAGS="$CXXFLAGS"]) AC_MSG_RESULT([LDFLAGS="$LDFLAGS"]) -if test ENABLE_MS_TRX; then +if test "x$with_mstrx" = "xyes"; then AC_MSG_NOTICE(["Enabling ms-trx..."]) AC_CONFIG_SUBDIRS([osmocom-bb/src/host/trxcon]) fi -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/30783 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Icbb9278c688bfe506d5ad726f16a6c200572de1b Gerrit-Change-Number: 30783 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-trx[master]: configure.ac: fix: properly check whether to enable ms-trx
by laforge 24 Dec '22

24 Dec '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/30783 ) Change subject: configure.ac: fix: properly check whether to enable ms-trx ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/30783 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Icbb9278c688bfe506d5ad726f16a6c200572de1b Gerrit-Change-Number: 30783 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 24 Dec 2022 09:38:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.