libosmocore.git branch neels/ctrl_parsing updated. 0.10.2-72-gcb192f62

gitosis at osmocom.org gitosis at osmocom.org
Sat Dec 16 04:55:21 UTC 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "An utility library for Open Source Mobile Communications".

The branch, neels/ctrl_parsing has been updated
  discards  8bf8e15a972395e34e4fc74d26717d9f7a6c3838 (commit)
  discards  c4806250b2ef32dd9a2f6282a406e054c479a134 (commit)
  discards  6c8a8cd177d67e53ee89bea75d67358b9ab20cb5 (commit)
  discards  4cc07ab586063fd036c0f4f572b6d54bc47e89a7 (commit)
  discards  ff46f3773935ffa4109bd29fa2ea52982d40f6f1 (commit)
  discards  d47abac6085d5a1e46b4258da90e540c26f176c0 (commit)
  discards  90b6bf485efea05f16d85c03c944c3a97ec0b0f7 (commit)
  discards  8998cf382e41c739f4cfcbf927ec0944661d75d9 (commit)
  discards  3d48ef50978a6df98c276f8c21931037c3b85156 (commit)
  discards  8f03bb0593be60702bcd23a812e2dfbd38f7cb64 (commit)
  discards  251970eb69dd0d754dd7b97560381245f630d1b3 (commit)
  discards  f5d35b977eeee03b66219ed7b83f94fa5f4fe111 (commit)
  discards  5bb1816f804aba4c731d6665239a2d35dfb355b0 (commit)
  discards  304e6b4cbf949e688c2fb12e83095afba2f32e2c (commit)
  discards  17a4116a495842e4e5ebafb00c6af996267def4b (commit)
       via  cb192f629ff7e042a873dbbb9fcee68f8596a4c4 (commit)
       via  fec5d8d593785095d403c6c205f5473c0bce930e (commit)
       via  25fa09e49812a96dafe570d20e7ffb07ccfd55c1 (commit)
       via  f5609e3a811273c6b38c907453779ed76993a845 (commit)
       via  7f77a9039d2c5198d293b5ac0a076b7961dfe3ae (commit)
       via  0a8b5206e6615b88b47f5c17282c91a7a5c7af39 (commit)
       via  63a72a200c6e7809856920931661af43e4f14ddb (commit)
       via  d1b021d979024ee42a51102ead6bf4e3a87a393e (commit)
       via  30fc3e039a0f8a767c2807ffc4b7c56704ee203c (commit)
       via  b945e4f67a3bbc931056cd09c02ed4a585cbfe93 (commit)
       via  742447d68be6487e0c278096ab5df3b4136a4a40 (commit)
       via  310e5d697873461abdbed74e58c88841d013db09 (commit)
       via  004a7da23f9b1426a33b6793b994419d8ab766b7 (commit)
       via  7fe60fe3d0576adbbd82919f43cfbb431a8d0c6a (commit)
       via  65caf44d917c3bfa6c7fa2269aaa81d94981aad4 (commit)
       via  62cc9bfee0c1cf30647d7f97261cc02519c797e9 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (8bf8e15a972395e34e4fc74d26717d9f7a6c3838)
            \
             N -- N -- N (cb192f629ff7e042a873dbbb9fcee68f8596a4c4)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cgit.osmocom.org/libosmocore/commit/?id=cb192f629ff7e042a873dbbb9fcee68f8596a4c4

commit cb192f629ff7e042a873dbbb9fcee68f8596a4c4
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 04:53:51 2017 +0100

    tighten ctrl parsing fu
    
    Change-Id: Ide9578f659eba160aec3edcd435e1c67da41bdab

http://cgit.osmocom.org/libosmocore/commit/?id=fec5d8d593785095d403c6c205f5473c0bce930e

commit fec5d8d593785095d403c6c205f5473c0bce930e
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 01:19:43 2017 +0100

    ctrl_test
    
    Change-Id: I487b4e1e103f46cf757953c7791f5b02809f03aa

http://cgit.osmocom.org/libosmocore/commit/?id=25fa09e49812a96dafe570d20e7ffb07ccfd55c1

commit 25fa09e49812a96dafe570d20e7ffb07ccfd55c1
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 01:18:53 2017 +0100

    ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP
    
    So far, error reporting just says "Trap/Reply", more accurately report 'GET
    REPLY', 'SET REPLY' and 'TRAP' as appropriate.
    
    Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01

http://cgit.osmocom.org/libosmocore/commit/?id=f5609e3a811273c6b38c907453779ed76993a845

commit f5609e3a811273c6b38c907453779ed76993a845
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 01:18:11 2017 +0100

    ctrl: tighten CTRL input parsing
    
    Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1

http://cgit.osmocom.org/libosmocore/commit/?id=7f77a9039d2c5198d293b5ac0a076b7961dfe3ae

commit 7f77a9039d2c5198d293b5ac0a076b7961dfe3ae
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 01:12:35 2017 +0100

    ctrl: on parse errors, return a detailed message to sender
    
    The recently added ctrl_cmd_parse2() returns non-NULL cmd with error messages
    upon parsing errors. In handle_control_read(), use ctrl_cmd_parse2() and send
    those back to the CTRL command sender as reply.
    
    Retain the previous "Command parser error" reply only in case ctrl_cmd_parse2()
    should return NULL, which shouldn't actually happen at all.
    
    Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d

http://cgit.osmocom.org/libosmocore/commit/?id=0a8b5206e6615b88b47f5c17282c91a7a5c7af39

commit 0a8b5206e6615b88b47f5c17282c91a7a5c7af39
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 01:05:25 2017 +0100

    add ctrl_cmd_parse2() to return parsing errors
    
    If a control command fails to parse, we so far discard specific error messages
    and instead send just "Command parser error".
    
    In ctrl_cmd_parse() we actually compose detailed error replies, but in the end
    simply talloc_free() them and return NULL.
    
    A first step to report these errors to the ctrl command issuer is to not return
    NULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add
    ctrl_cmd_parse2() to return such instead of NULL.
    
    To stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors.
    ctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper
    around ctrl_cmd_parse2() which discards the cmd on error.
    
    Deprecate ctrl_cmd_parse().
    
    Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880

http://cgit.osmocom.org/libosmocore/commit/?id=63a72a200c6e7809856920931661af43e4f14ddb

commit 63a72a200c6e7809856920931661af43e4f14ddb
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Tue Sep 26 14:21:44 2017 +0200

    CTRL: GET parsing: add '\n' as token delimiter
    
    For GET commands, we expect the command to end after the GET variable name.
    However, the token parsing uses a single space as delimiter, potentially
    parsing along the line ending.
    
    Add line ending to token delimiters for GET parsing.
    
    Adjust test expectations accordingly.
    
    Change-Id: I33efb56f76cb7a41e94454666e218617e9b713ae

http://cgit.osmocom.org/libosmocore/commit/?id=d1b021d979024ee42a51102ead6bf4e3a87a393e

commit d1b021d979024ee42a51102ead6bf4e3a87a393e
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Fri Dec 15 20:41:28 2017 +0100

    ctrl_test: add two more current parsing bugs to prep for fix
    
    Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7

http://cgit.osmocom.org/libosmocore/commit/?id=30fc3e039a0f8a767c2807ffc4b7c56704ee203c

commit 30fc3e039a0f8a767c2807ffc4b7c56704ee203c
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 04:05:21 2017 +0100

    ctrl: fix mem leak when handling GET_REPLY and SET_REPLY
    
    In ctrl_handle_msg() (code recently propagated from handle_control_read()),
    talloc_free() the parsed ctrl_cmd in all code paths. In particular, a free was
    missing in case ctrl_cmd_handle() returns CTRL_CMD_HANDLED.
    
    CTRL_CMD_HANDLED is triggered by GET_REPLY / SET_REPLY parsing, as show by
    ctrl_test.c. With the memleak fixed, adjust expected test output and make a
    detected mem leak abort the test immediately.
    
    Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381

http://cgit.osmocom.org/libosmocore/commit/?id=b945e4f67a3bbc931056cd09c02ed4a585cbfe93

commit b945e4f67a3bbc931056cd09c02ed4a585cbfe93
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 04:01:54 2017 +0100

    ctrl_test: show memleak when receiving GET_REPLY and SET_REPLY commands
    
    The "memleak!" output shows messages that lack a talloc_free() of the parsed
    ctrl command buffer. The leak shall be fixed in a subsequent patch.
    
    Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042

http://cgit.osmocom.org/libosmocore/commit/?id=742447d68be6487e0c278096ab5df3b4136a4a40

commit 742447d68be6487e0c278096ab5df3b4136a4a40
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 05:38:37 2017 +0100

    ctrl_test: expand to test message handling and detect mem leaks
    
    Subsequent patches that tighten CTRL input validation will make the results
    more interesting.
    
    Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f

http://cgit.osmocom.org/libosmocore/commit/?id=310e5d697873461abdbed74e58c88841d013db09

commit 310e5d697873461abdbed74e58c88841d013db09
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 03:57:56 2017 +0100

    ctrl: prep test: separate new ctrl_handle_msg() from handle_control_read()
    
    In order to allow unit testing the ctrl iface msgb handling, have a separate
    msgb entry point function from the actual fd read function.
    
    An upcoming patch will prove a memory leak in CTRL msgb handling by a unit test
    that needs this separation.
    
    Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3

http://cgit.osmocom.org/libosmocore/commit/?id=004a7da23f9b1426a33b6793b994419d8ab766b7

commit 004a7da23f9b1426a33b6793b994419d8ab766b7
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 01:03:37 2017 +0100

    ctrl_test.c: replace print_escaped() with new osmo_escape_str()
    
    Change-Id: I12d3828dcc925f97fde11c360f1d60f3bd8cad8b

http://cgit.osmocom.org/libosmocore/commit/?id=7fe60fe3d0576adbbd82919f43cfbb431a8d0c6a

commit 7fe60fe3d0576adbbd82919f43cfbb431a8d0c6a
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 00:54:52 2017 +0100

    utils: add osmo_escape_str()
    
    To report invalid characters in identifiers, it is desirable to escape any
    weird characters. Otherwise we might print stray newlines or control characters
    in the log output.
    
    ctrl_test.c already uses a print_escaped() function, which will be replaced by
    osmo_escape_str() in a subsequent patch.
    
    control_cmd.c will use osmo_escape_str() to log invalid identifiers.
    
    Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a

http://cgit.osmocom.org/libosmocore/commit/?id=65caf44d917c3bfa6c7fa2269aaa81d94981aad4

commit 65caf44d917c3bfa6c7fa2269aaa81d94981aad4
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 00:46:50 2017 +0100

    utils: add osmo_separated_identifiers_valid()
    
    For validating CTRL input, we want to verify that an input variable is a series
    of valid osmo_identifier_valid() separated by dots. Allow validating any
    additional chars with identifiers, for CTRL vars will be just ".".
    
    Change-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de

http://cgit.osmocom.org/libosmocore/commit/?id=62cc9bfee0c1cf30647d7f97261cc02519c797e9

commit 62cc9bfee0c1cf30647d7f97261cc02519c797e9
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Sat Dec 16 04:54:37 2017 +0100

    fix osmo_identifier_valid(): only allow printable characters
    
    In particular disallow ASCII 0..31 (control characters) and 127 (DEL).
    
    Change-Id: I04469988495af03c881fe81d7786ca7f71636299

-----------------------------------------------------------------------

Summary of changes:
 tests/ctrl/ctrl_test.c | 186 ++++++++++++++++++++++++++-----------------------
 1 file changed, 97 insertions(+), 89 deletions(-)


hooks/post-receive
-- 
An utility library for Open Source Mobile Communications


More information about the osmocom-commitlog mailing list