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 -----
  • 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

August 2026

  • 1 participants
  • 2269 discussions
[NoOp] Change in osmo-ttcn3-hacks[master]: smdpp: update SGP.26 DPtls certificate
by laforge 12 Aug '26

12 Aug '26
Attention is currently required from: Hoernchen, dexter, pespin. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43203?usp=email ) Change subject: smdpp: update SGP.26 DPtls certificate ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > The problem with this certificates is that those are test certificates which are generated by the GS […] Someone in the team needs a calendar reminder, or we need a jenkins job to send reminders about SGP.26 certificate expiration in advance so we can update it. I know GSMA is also very late in publishing updated certificates, so we probably can't updated it more than one week ahead of expiration. I'd also be fine with creating our own certificates with longer lifetime underneath the published SGP.26 root CI CA. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43203?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I09c70797e2ba897a41d46c378dfd0ca12b645a79 Gerrit-Change-Number: 43203 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 12 Aug 2026 08:32:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[NoOp] Change in osmo-ttcn3-hacks[master]: smdpp: update SGP.26 DPtls certificate
by osmith 12 Aug '26

12 Aug '26
Attention is currently required from: Hoernchen, dexter, pespin. osmith has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43203?usp=email ) Change subject: smdpp: update SGP.26 DPtls certificate ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43203?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I09c70797e2ba897a41d46c378dfd0ca12b645a79 Gerrit-Change-Number: 43203 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 12 Aug 2026 08:30:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[NoOp] Change in osmo-ttcn3-hacks[master]: smdpp: update SGP.26 DPtls certificate
by dexter 12 Aug '26

12 Aug '26
Attention is currently required from: Hoernchen, osmith, pespin. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43203?usp=email ) Change subject: smdpp: update SGP.26 DPtls certificate ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > I do wonder, can't we generate this certificate as part of the test run, in order to avoid submittin […] The problem with this certificates is that those are test certificates which are generated by the GSMA. The certificates are part of a specification (SGP.26). This spec ships with a set of pre-generated certificates which integrators shall use for testing. Technically it would be possible to use certificates we generate ourselves, but this wouldn't be an official SGP.26 test certificate then... -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43203?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I09c70797e2ba897a41d46c378dfd0ca12b645a79 Gerrit-Change-Number: 43203 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 12 Aug 2026 08:29:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.ReturnFromFallback
by jolly 12 Aug '26

12 Aug '26
Attention is currently required from: dexter, laforge. jolly has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43042?usp=email ) Change subject: V1.2: Add function ES10b.ReturnFromFallback ...................................................................... Patch Set 5: (1 comment) File src/ipa/main.c: https://gerrit.osmocom.org/c/onomondo-ipa/+/43042/comment/ba0e43d3_e4338ab2… : PS3, Line 42: tatic void print_help(void) : { : printf("options:\n"); : printf(" -h ......................... print this text.\n"); : printf(" -t TAC ..................... set TAC (default: %s)\n", DEFAULT_TAC); : printf(" -e eimId ................... set preferred eIM (in case the eUICC has multiple)\n"); : printf(" -r N ....................... set reader number (default: %d)\n", DEFAULT_READER_NUMBER); : printf(" -c N ....................... set logical channel number (default: %d)\n", DEFAULT_CHANNEL_NUMBER); : printf(" -f PATH .................... set initial eIM configuration\n"); : printf(" -m ......................... reset eUICC memory\n"); : printf(" --refresh-flag.............. Make eUICC send a CAT refresh after switching profile\n"); : printf(" --execute-fallback-mechanism Trigger enabling of fallback profile\n"); : printf(" --return-from-fallback...... Trigger return from fallback profile to previous profile\n"); : printf(" -n PATH .................... path to nvstate file (default: %s)\n", DEFAULT_NVSTATE_PATH); : printf(" -y NUM ..................... number of retries for ESipa requests (default: %u)\n", : DEFAULT_ESIPA_REQ_RETRIES); : printf(" -a ......................... ask end user for consent\n"); : printf(" -C ......................... CA (Certificate Authority) Bundle file\n"); : printf(" -S ......................... disable HTTPS\n"); : printf(" -I ......................... disable SSL certificate verification (insecure)\n"); : printf(" -E ......................... emulate IoT eUICC (compatibility mode to use consumer eUICCs)\n"); : printf(" -1 ......................... force the IPAd to process only one eUICC package (debug, use with caution)\n"); : } > Makes sense, the -m, -f are also operations, this should be re-aligned too. […] See previous patch I6b960f840820990de40fb07332669ddbfcdf1e7d. -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43042?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ib49a8ef3a5ea5639d881ca51eaeeea24f083fe0e Gerrit-Change-Number: 43042 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 12 Aug 2026 07:38:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.ExecuteFallbackMechanism
by jolly 12 Aug '26

12 Aug '26
Attention is currently required from: dexter, laforge. jolly has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43041?usp=email ) Change subject: V1.2: Add function ES10b.ExecuteFallbackMechanism ...................................................................... Patch Set 5: (1 comment) File src/ipa/libipa/es10b_exec_fallback_mech.h: https://gerrit.osmocom.org/c/onomondo-ipa/+/43041/comment/3fb09a71_f29b3088… : PS3, Line 14: struct ExecuteFallbackMechanismResponse *res; > The response is basically just an integer, you could return that integer from ipa_es10b_exec_fallbac […] I prefer to have it flexible, when it gets extended. -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43041?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ia751f0888c36f39ddfadf7f8bb923a8ee50178dc Gerrit-Change-Number: 43041 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 12 Aug 2026 07:35:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[XS] Change in simtrace2[master]: cosmetic: fix typo in comment
by pespin 12 Aug '26

12 Aug '26
Attention is currently required from: lynxis lazus. pespin has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/simtrace2/+/43204?usp=email ) Change subject: cosmetic: fix typo in comment ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/43204?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I7df27ebf9137ca60d6d7cd45dcf1be2d766c4f44 Gerrit-Change-Number: 43204 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Wed, 12 Aug 2026 07:33:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-sigtran[master]: TCAP: UDTS routing: stop overwriting ASP when routing UDTS
by pespin 12 Aug '26

12 Aug '26
Attention is currently required from: daniel, lynxis lazus. pespin has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43193?usp=email ) Change subject: TCAP: UDTS routing: stop overwriting ASP when routing UDTS ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43193?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I1c4eaaf352d505970e55e04c605c100d64aaaa34 Gerrit-Change-Number: 43193 Gerrit-PatchSet: 6 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Wed, 12 Aug 2026 07:32:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-sigtran[master]: TCAP: implement fallback routing when no TCAP ASP can be found.
by pespin 12 Aug '26

12 Aug '26
Attention is currently required from: daniel, laforge, lynxis lazus. pespin has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43008?usp=email ) Change subject: TCAP: implement fallback routing when no TCAP ASP can be found. ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43008?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I3e4e634b38a1845c2ce62a3805ff91a530520d88 Gerrit-Change-Number: 43008 Gerrit-PatchSet: 8 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Wed, 12 Aug 2026 07:32:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-sigtran[master]: Add VTY test for "listen" node of osmo-stp VTY config
by jolly 12 Aug '26

12 Aug '26
jolly has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42817?usp=email ) ( 4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Add VTY test for "listen" node of osmo-stp VTY config ...................................................................... Add VTY test for "listen" node of osmo-stp VTY config Change-Id: Ia1ceb5f0374f47ff269b557be30fc4d59550d1a6 --- M tests/vty/osmo_stp_test.vty 1 file changed, 29 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty index d52ae5f..01cad83 100644 --- a/tests/vty/osmo_stp_test.vty +++ b/tests/vty/osmo_stp_test.vty @@ -423,6 +423,35 @@ OsmoSTP(config-cs7-asp)# exit % NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered +OsmoSTP(config-cs7)# listen m3ua 2905 +OsmoSTP(config-cs7-listen)# list +... + local-ip (A.B.C.D|X:X::X:X) + no local-ip (A.B.C.D|X:X::X:X) + init-ip-dscp <0-63> + no init-ip-dscp + accept-asp-connections (pre-configured|dynamic-permitted) + sctp-param init (num-ostreams|max-instreams) <0-65535> + no sctp-param init (num-ostreams|max-instreams) +... + +OsmoSTP(config-cs7-listen)# ? +... + local-ip Configure the Local IP Address for xUA + no Negate a command or set its defaults + init-ip-dscp Specify IP DSCP of Listener + accept-asp-connections Define what kind of ASP connections to accept + sctp-param Configure SCTP parameters +... + +OsmoSTP(config-cs7-listen)# no ? +... + local-ip Configure the Local IP Address for xUA + init-ip-dscp Specify IP DSCP of Listener + sctp-param Configure SCTP parameters +... + +OsmoSTP(config-cs7-listen)# exit OsmoSTP(config-cs7)# as my-ass m3ua OsmoSTP(config-cs7-as)# list ... -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42817?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Ia1ceb5f0374f47ff269b557be30fc4d59550d1a6 Gerrit-Change-Number: 42817 Gerrit-PatchSet: 6 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: Add test case to verify proper DSCP settings
by jolly 12 Aug '26

12 Aug '26
jolly has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42809?usp=email ) Change subject: Add test case to verify proper DSCP settings ...................................................................... Add test case to verify proper DSCP settings Related: SYS#8071 Change-Id: I6ac965998433b4d8213cce30fc3fcf8fe485a092 --- M tests/vty/vty_test_runner.py 1 file changed, 144 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/tests/vty/vty_test_runner.py b/tests/vty/vty_test_runner.py index 253380a..a01f193 100755 --- a/tests/vty/vty_test_runner.py +++ b/tests/vty/vty_test_runner.py @@ -22,6 +22,7 @@ import socket import subprocess import time +import struct import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil @@ -225,6 +226,148 @@ self.assertTrue(self.vty.verify("no as " + as_name,[''])) self.assertTrue(self.vty.verify("no asp " + asp_name,[''])) +class TestDSCP(TestVTYBase): + + def vty_command(self): + return ["./stp/osmo-stp", "-c", + "../doc/examples/osmo-stp.cfg"] + + def vty_app(self): + return (4239, "./stp/osmo-stp", "OsmoSTP", "stp") + + def testDSCPSettings(self): + self.vty.enable() + self.assertTrue(self.vty.verify("configure terminal",[''])) + self.assertTrue(self.vty.verify("cs7 instance 0",[''])) + self.assertTrue(self.vty.verify("no listen m3ua 2905",[''])) + self.assertTrue(self.vty.verify("listen m3ua 2905",[''])) + self.assertTrue(self.vty.verify("accept-asp-connections dynamic-permitted",[''])) + self.assertTrue(self.vty.verify("local-ip 127.0.0.1",[''])) + self.assertTrue(self.vty.verify("init-ip-dscp 23",[''])) + self.assertTrue(self.vty.verify("exit",[''])) + self.assertTrue(self.vty.verify("asp asp-srv-m3ua 2906 2905 m3ua",[''])) + self.assertTrue(self.vty.verify("local-ip 127.0.0.1",[''])) + self.assertTrue(self.vty.verify("remote-ip 127.0.0.2",[''])) + self.assertTrue(self.vty.verify("ip-dscp 8",[''])) + self.assertTrue(self.vty.verify("role asp",[''])) + self.assertTrue(self.vty.verify("sctp-role server",[''])) + self.assertTrue(self.vty.verify("no shutdown",[''])) + self.assertTrue(self.vty.verify("exit",["% NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered"])) + self.assertTrue(self.vty.verify("asp asp-clnt-m3ua 2905 2906 m3ua",[''])) + self.assertTrue(self.vty.verify("local-ip 127.0.0.2",[''])) + self.assertTrue(self.vty.verify("remote-ip 127.0.0.1",[''])) + self.assertTrue(self.vty.verify("ip-dscp 42",[''])) + self.assertTrue(self.vty.verify("role asp",[''])) + self.assertTrue(self.vty.verify("sctp-role client",[''])) + self.assertTrue(self.vty.verify("no shutdown",[''])) + self.assertTrue(self.vty.verify("exit",["% NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered"])) + time.sleep(1.0) + + NETLINK_SOCK_DIAG = 4 + INET_DIAG_TOS = 5 + SOCK_DIAG_BY_FAMILY = 20 + NLM_F_REQUEST = 0x01 + NLM_F_ROOT = 0x100 + NLM_F_MATCH = 0x200 + NLM_F_DUMP = (NLM_F_ROOT | NLM_F_MATCH) + NLMSG_HDR_SIZE = 16 + TCP_ESTABLISHED = 1 + TCP_LISTEN = 10 + NLMSG_ERROR = 2 + NLMSG_DONE = 3 + + req_v2_data = struct.pack( + "BBBBI", + socket.AF_INET, + socket.IPPROTO_SCTP, + 1 << (INET_DIAG_TOS - 1), + 0, # pad, + 0xFFFFFFFF, + ) + inet_diag_sockid = struct.pack( + "2H11I", + 0, # sport + 0, # dport + 0, 0, 0, 0, # source ip + 0, 0, 0, 0, # dest ip + 0, # idiag_if (interface index) + 0xffffffff, 0xffffffff, # idiag_cookie[2] + ) + nl_msg_hdr = struct.pack( + "IHHII", + NLMSG_HDR_SIZE + len(req_v2_data) + len(inet_diag_sockid), + SOCK_DIAG_BY_FAMILY, + NLM_F_REQUEST | NLM_F_DUMP, + 1, # nlmsg_seq (sequence number - arbitrary) + os.getpid() + ) + nl_request = nl_msg_hdr + req_v2_data + inet_diag_sockid + + output = "" + expected_output = ( + "ESTAB 127.0.0.1:2905 127.0.0.2:2906 8\n" + "ESTAB 127.0.0.2:2906 127.0.0.1:2905 42\n" + "LISTEN 127.0.0.1:2905 0.0.0.0:0 23\n" + "OTHER 127.0.0.1:2905 127.0.0.2:2906 8\n" + "OTHER 127.0.0.2:2906 127.0.0.1:2905 42" + ) + + try: + sock = socket.socket(socket.AF_NETLINK, socket.SOCK_RAW, NETLINK_SOCK_DIAG) + except Exception as msg: + self.fail("Failed to open netlink socket: %s" % msg) + + try: + sock.sendto(nl_request, (0, 0)) + sock.settimeout(5.0) + + response = sock.recv(8192) + + while len(response) >= NLMSG_HDR_SIZE: + nl_header_len, msg_type, flags, seq, pid = struct.unpack( + "IHHII", response[:NLMSG_HDR_SIZE]) + if msg_type == NLMSG_ERROR: + error_code = struct.unpack( + "i", response[NLMSG_HDR_SIZE: NLMSG_HDR_SIZE+4]) + self.fail(f"Netlink error response received. %s" % error_code) + break + if msg_type == NLMSG_DONE: + break; + family, state, timer, retrans = struct.unpack("4B", response[NLMSG_HDR_SIZE:NLMSG_HDR_SIZE+4]) + sport, dport, src_ip, _, _, _, dst_ip, _, _, _, ifc, c1, c2 = struct.unpack( + "2H11I", response[NLMSG_HDR_SIZE+4:NLMSG_HDR_SIZE+52]) + state_str = ( + "ESTAB" + if state == TCP_ESTABLISHED + else "LISTEN" if state == TCP_LISTEN else "OTHER" + ) + sport = socket.ntohs(sport); + dport = socket.ntohs(dport); + src_ip = socket.inet_ntop(socket.AF_INET, struct.pack("I", src_ip)) + dst_ip = socket.inet_ntop(socket.AF_INET, struct.pack("I", dst_ip)) + tos = 0 + rtattr_data = response[NLMSG_HDR_SIZE+72:] + while len(rtattr_data) >= 4: + rta_len, rta_type = struct.unpack("HH", rtattr_data[:4]) + if rta_len < 4 or rta_len > len(rtattr_data): + break + if rta_type == INET_DIAG_TOS: + tos = rtattr_data[4] + break + rtattr_data = rtattr_data[(rta_len + 3) & ~3:] + + output = output + f"{state_str} {src_ip}:{sport} {dst_ip}:{dport} {tos >> 2}\n" + + response = response[(nl_header_len + 3) & ~3:] + + except Exception as msg: + self.fail("Failed to talk to netlink socket: %s" % msg) + finally: + sock.close() + + sorted_output = "\n".join(sorted(output.splitlines())) + self.assertEqual(sorted_output, expected_output) + if __name__ == '__main__': import argparse import sys @@ -256,6 +399,7 @@ print("Running tests for specific VTY commands") suite = unittest.TestSuite() suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVTYSTP)) + suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestDSCP)) if args.test_name: osmoutil.pick_tests(suite, *args.test_name) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42809?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I6ac965998433b4d8213cce30fc3fcf8fe485a092 Gerrit-Change-Number: 42809 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • ...
  • 227
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.