libosmocore.git branch neels/ctrl_parsing updated. 0.10.2-69-g179f3a01

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-commitlog@lists.osmocom.org/.

gitosis at osmocom.org gitosis at osmocom.org
Sat Dec 16 05:24:32 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  cb192f629ff7e042a873dbbb9fcee68f8596a4c4 (commit)
  discards  fec5d8d593785095d403c6c205f5473c0bce930e (commit)
  discards  25fa09e49812a96dafe570d20e7ffb07ccfd55c1 (commit)
  discards  f5609e3a811273c6b38c907453779ed76993a845 (commit)
  discards  7f77a9039d2c5198d293b5ac0a076b7961dfe3ae (commit)
  discards  0a8b5206e6615b88b47f5c17282c91a7a5c7af39 (commit)
  discards  63a72a200c6e7809856920931661af43e4f14ddb (commit)
  discards  d1b021d979024ee42a51102ead6bf4e3a87a393e (commit)
  discards  30fc3e039a0f8a767c2807ffc4b7c56704ee203c (commit)
  discards  b945e4f67a3bbc931056cd09c02ed4a585cbfe93 (commit)
  discards  742447d68be6487e0c278096ab5df3b4136a4a40 (commit)
  discards  310e5d697873461abdbed74e58c88841d013db09 (commit)
  discards  004a7da23f9b1426a33b6793b994419d8ab766b7 (commit)
       via  179f3a01446556d0d8eeb816c0c2b68034495180 (commit)
       via  c16258365ea80c9d35558e38eaa7f482eb357f24 (commit)
       via  e56600fa42e0a229a1a5bcf95fc8d3b9a4c053ac (commit)
       via  b61510abaeec814dfdf6f33ff5534c6ac1d6020f (commit)
       via  4602cbff6231d7c106b880c5a4f45c2fca6e640f (commit)
       via  0e759be493086f13ad476e08e5ba4c70b5a2c689 (commit)
       via  4dbc6fca9a177941af2a3d3f8e3cabfb0825e80d (commit)
       via  62feb5389c06f9fec19d21ba623195c59a2864cd (commit)
       via  414901b2cd688783f56fced6311d5d7abfaaa98f (commit)
       via  976214df85b004310ab49708d9170a1f5d14a039 (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 (cb192f629ff7e042a873dbbb9fcee68f8596a4c4)
            \
             N -- N -- N (179f3a01446556d0d8eeb816c0c2b68034495180)

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=179f3a01446556d0d8eeb816c0c2b68034495180

commit 179f3a01446556d0d8eeb816c0c2b68034495180
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=c16258365ea80c9d35558e38eaa7f482eb357f24

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

    ctrl: tighten CTRL input parsing
    
    Validate that incoming CTRL commands...
    - have decimal IDs,
    - return error on trailing characters,
    - have invalid characters in variable identifiers,
    - send detailed error messages as reply to the requestor.
    
    Adjust ctrl_test.{c,ok}, which best show the change in behavior.
    
    Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1

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

commit e56600fa42e0a229a1a5bcf95fc8d3b9a4c053ac
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=b61510abaeec814dfdf6f33ff5534c6ac1d6020f

commit b61510abaeec814dfdf6f33ff5534c6ac1d6020f
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.
    
    No need really to deprecate ctrl_cmd_parse() yet; especially as long as
    compiler warnings might break jenkins builds.
    
    Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880

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

commit 4602cbff6231d7c106b880c5a4f45c2fca6e640f
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=0e759be493086f13ad476e08e5ba4c70b5a2c689

commit 0e759be493086f13ad476e08e5ba4c70b5a2c689
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=4dbc6fca9a177941af2a3d3f8e3cabfb0825e80d

commit 4dbc6fca9a177941af2a3d3f8e3cabfb0825e80d
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=62feb5389c06f9fec19d21ba623195c59a2864cd

commit 62feb5389c06f9fec19d21ba623195c59a2864cd
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=414901b2cd688783f56fced6311d5d7abfaaa98f

commit 414901b2cd688783f56fced6311d5d7abfaaa98f
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=976214df85b004310ab49708d9170a1f5d14a039

commit 976214df85b004310ab49708d9170a1f5d14a039
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

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

Summary of changes:
 include/osmocom/ctrl/control_cmd.h |   2 +-
 tests/ctrl/ctrl_test.c             |  44 +++++----
 tests/ctrl/ctrl_test.ok            | 191 +++++++++++++++++++++++--------------
 tests/testsuite.at                 |   2 +-
 4 files changed, 147 insertions(+), 92 deletions(-)


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



More information about the osmocom-commitlog mailing list