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 created
at 8bf8e15a972395e34e4fc74d26717d9f7a6c3838 (commit)
- Log -----------------------------------------------------------------
http://cgit.osmocom.org/libosmocore/commit/?id=8bf8e15a972395e34e4fc74d2671…
commit 8bf8e15a972395e34e4fc74d26717d9f7a6c3838
Author: Neels Hofmeyr <neels(a)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
http://cgit.osmocom.org/libosmocore/commit/?id=c4806250b2ef32dd9a2f6282a406…
commit c4806250b2ef32dd9a2f6282a406e054c479a134
Author: Neels Hofmeyr <neels(a)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=6c8a8cd177d67e53ee89bea75d67…
commit 6c8a8cd177d67e53ee89bea75d67358b9ab20cb5
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Sat Dec 16 01:19:43 2017 +0100
ctrl_test
Change-Id: I487b4e1e103f46cf757953c7791f5b02809f03aa
http://cgit.osmocom.org/libosmocore/commit/?id=4cc07ab586063fd036c0f4f572b6…
commit 4cc07ab586063fd036c0f4f572b6d54bc47e89a7
Author: Neels Hofmeyr <neels(a)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=ff46f3773935ffa4109bd29fa2ea…
commit ff46f3773935ffa4109bd29fa2ea52982d40f6f1
Author: Neels Hofmeyr <neels(a)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=d47abac6085d5a1e46b4258da90e…
commit d47abac6085d5a1e46b4258da90e540c26f176c0
Author: Neels Hofmeyr <neels(a)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=90b6bf485efea05f16d85c03c944…
commit 90b6bf485efea05f16d85c03c944c3a97ec0b0f7
Author: Neels Hofmeyr <neels(a)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=8998cf382e41c739f4cfcbf927ec…
commit 8998cf382e41c739f4cfcbf927ec0944661d75d9
Author: Neels Hofmeyr <neels(a)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=3d48ef50978a6df98c276f8c2193…
commit 3d48ef50978a6df98c276f8c21931037c3b85156
Author: Neels Hofmeyr <neels(a)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=8f03bb0593be60702bcd23a812e2…
commit 8f03bb0593be60702bcd23a812e2dfbd38f7cb64
Author: Neels Hofmeyr <neels(a)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=251970eb69dd0d754dd7b9756038…
commit 251970eb69dd0d754dd7b97560381245f630d1b3
Author: Neels Hofmeyr <neels(a)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=f5d35b977eeee03b66219ed7b83f…
commit f5d35b977eeee03b66219ed7b83f94fa5f4fe111
Author: Neels Hofmeyr <neels(a)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=5bb1816f804aba4c731d6665239a…
commit 5bb1816f804aba4c731d6665239a2d35dfb355b0
Author: Neels Hofmeyr <neels(a)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=304e6b4cbf949e688c2fb12e8309…
commit 304e6b4cbf949e688c2fb12e83095afba2f32e2c
Author: Neels Hofmeyr <neels(a)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=17a4116a495842e4e5ebafb00c6a…
commit 17a4116a495842e4e5ebafb00c6af996267def4b
Author: Neels Hofmeyr <neels(a)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
-----------------------------------------------------------------------
hooks/post-receive
--
An utility library for Open Source Mobile Communications