From: gitosis@osmocom.org
Precedence: list
To: osmocom-commitlog@lists.osmocom.org
Date: Wed, 24 Sep 2014 11:23:46 GMT
Message-ID: <201409241123.s8OBNkoe004224@git.osmocom.org>
Subject: openbsc.git branch jerlbeck/wip/gprs-patching updated.
	0.13.0-685-g846408f
Message: 2

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 "The OpenBSC GSM Base Station Controller (+MSC/HLR/SGSN)".

The branch, jerlbeck/wip/gprs-patching has been updated
  discards  9a696cf1bcac6b8be2c10d1ab04420e1330ceda4 (commit)
  discards  cab45cf21e690647dc68e3a6f1a23fc722e29702 (commit)
  discards  b984242135ecdd51ef9e5de4c466617ac39d3571 (commit)
  discards  8c10c354136d7b73f7fa9b034a5aeddcc29a216d (commit)
  discards  36e8333166ea9311388a3f4836f5e03db3fedc05 (commit)
  discards  334ae094e8aace21f1a18a41aba3830f89f4e33e (commit)
  discards  805bff87f69e2a4175e5e45bdd1c8d756fb9a9bc (commit)
  discards  8b08d3e2cff38ac6adcd75c02eeb485a58d81a1b (commit)
  discards  2b45801fb5fb148f6d13a0b46dfe3d2d1de2221f (commit)
  discards  5bedbb85f9025d0ffb5fb75934a24744feb4d5f7 (commit)
  discards  8319e3edc3fb829964feba8a16dfc982cfba0dd3 (commit)
  discards  a7de1e34bd17a31c41b168097aea30494d26606e (commit)
  discards  3592991d14f087c278600c39f69fb75cd75f8cd9 (commit)
  discards  d5a75139088675031891fd865f31ff93b2e1d122 (commit)
  discards  ab8b04356375d298296c8f4cf679789eeb887340 (commit)
  discards  a48e19c80762240f5c0f4a977425479ae7eb6922 (commit)
  discards  ca007d21857635e60636f9bdb023bbafac0dc9ec (commit)
  discards  f77b8f040864810f4184728fb80f6d1831c5b3da (commit)
  discards  e91f67f64d706b53165cda19833d06ee47d97bf8 (commit)
       via  846408f66bfe3686a309b1dda6d06ce5377ea985 (commit)
       via  feaf51e067e4e4c3b6ec8e3e3391ddfa3c9a2a3b (commit)
       via  18fa2ad68177012569323524725d89391a14395e (commit)
       via  6fea3d604fe38c02c290614ce0104d992429248e (commit)
       via  80e6070f371b8d3b9cbee1879dc26abbd9889248 (commit)
       via  fbcb847876464fb3167c951113aa957b75349fde (commit)
       via  a814b3f04b0d763caeeb8df0c96d693256f5aa9e (commit)
       via  1894a9a32e51adff8ff6d5b2e7d916b7c8934ff4 (commit)
       via  e65f9a26ae811253389f9d8b8ca62ad6778a22ec (commit)
       via  3f0367e5e6b7eb82b0640cc32ba993ab41bb328a (commit)
       via  f708908abb0ee09f955a54675a5f081f85db5d97 (commit)
       via  6447c1b61f8079b25e7a27661bf930c8d380f36e (commit)
       via  4c0159070f228643f05d040feefe1b705369a1fd (commit)
       via  ba99221c279acda6fe1f779702e19846d85fd54c (commit)
       via  fbfb544cdf690b9b8bad8a61aecaba923f6f3678 (commit)
       via  faba30b1d6353bcf320a433623485a3446ad183b (commit)
       via  ed225b62e3787437803141e252b2cdd7892839dd (commit)
       via  ab66130c738c726eb6a66698ed3885493de9ef46 (commit)
       via  caa947c2a364d4b9d4c04c12c9119a6da64946f8 (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 (9a696cf1bcac6b8be2c10d1ab04420e1330ceda4)
            \
             N -- N -- N (846408f66bfe3686a309b1dda6d06ce5377ea985)

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/openbsc/commit/?id=846408f66bfe3686a309b1dda6d06ce5377ea985

commit 846408f66bfe3686a309b1dda6d06ce5377ea985
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 5 14:32:36 2014 +0200

    sgsn: Send detach(re-attach) instead of gmm status if TLLI unknown (TODO)
    
    The osmo-sgsn sends Status messages (or nothing in case of non
    GMM/GSM) when the TLLI is unknown. This prevents the MS from
    reconnecting.
    
    This experimental patch initiates a MT detach procedure to force a
    re-attach to set up a valid LLE context.
    
    TODO:
      - test cases
    
    Note that the MS can be put into REGISTERED state after initially
    wanting to detach itself, since it will receive a Detach Req
    (re-attach) after the SGSN or gbproxy (P-TMSI patching enabled) has
    been restarted. This same behaviour has been observed with another
    SGSN.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=feaf51e067e4e4c3b6ec8e3e3391ddfa3c9a2a3b

commit feaf51e067e4e4c3b6ec8e3e3391ddfa3c9a2a3b
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Mon Sep 22 19:16:06 2014 +0200

    gbproxy/test: Add expect_msg checks to test_gbproxy_keep_info (TODO)
    
    This patch adds assertions to check the LLC/GMM message received from
    the gbproxy by the test framework within the function
    test_gbproxy_keep_info.
    
    TODO:
     - more tests
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=18fa2ad68177012569323524725d89391a14395e

commit 18fa2ad68177012569323524725d89391a14395e
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Tue Sep 23 14:56:38 2014 +0200

    gbproxy/test: Add expect_msg checks to test_gbproxy_ra_patching
    
    This patch adds assertions to check the LLC/GMM message received from
    the gbproxy by the test framework within the function
    test_gbproxy_ra_patching.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=6fea3d604fe38c02c290614ce0104d992429248e

commit 6fea3d604fe38c02c290614ce0104d992429248e
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Mon Sep 22 18:54:34 2014 +0200

    gbproxy/test: Save and check received messages
    
    Currently the only way to check, whether the right message have been
    generated is to look into the generated text output. This is
    error-prone if there are many messages.
    
    This patch adds a way to optionally store all received messages into
    a FIFO. They can then be checked by calling expect_msg() which
    removes the first message from the FIFO and returns a pointer to it
    or NULL if there is none. The pointer is only valid until the next
    call to this function.
    
    A few convenience functions are added to check for common message
    types:
    
      - expect_gmm_msg checks for certain GSM 04.08 messages in LLC/GMM
      - expect_llc_msg checks for arbitrary LLC messages in BSSGP/UD
      - expect_bssgp_msg checks for arbitrary BSSG messages
    
    Each of their arguments can be set by MATCH_ANY to ignore it while
    matching. On success, they return a pointer to a statically
    allocated struct containing the pointer to the msg and the full parse
    context.
    
    Recording is enabled by setting the global variable received_messages
    to a pointer to a struct llist_head. It can be disabled again by
    setting it to NULL.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=80e6070f371b8d3b9cbee1879dc26abbd9889248

commit 80e6070f371b8d3b9cbee1879dc26abbd9889248
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Mon Sep 22 18:50:08 2014 +0200

    gprs: Fix gprs_msgb_copy pointer computation
    
    Currently the pointer are computed by adding an offset to the new
    message's _data pointer even when the original pointer is NULL.
    This leads to invalid pointers in the copied msgb.
    
    This patch adds a NULL check to each computation such that NULL
    pointers are not adjusted.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=fbcb847876464fb3167c951113aa957b75349fde

commit fbcb847876464fb3167c951113aa957b75349fde
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Mon Sep 22 15:41:21 2014 +0200

    gbproxy: Refactor local message generation
    
    This patch adds und uses the function gbproxy_gsm48_to_peer() which
    takes a GSM 04.08 message, encapsulates it in BSSGP and LLC, and
    sends it to the BSS peer. This function increments vu_gen_tx_bss
    which is now used instead of imsi_acq_retries to set the N(U) of the
    outgoing message.
    
    Since imsi_acq_retries isn't currently incremented before a Detach
    Accept is generated, this patch also fixes the N(U) of such messages.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=a814b3f04b0d763caeeb8df0c96d693256f5aa9e

commit a814b3f04b0d763caeeb8df0c96d693256f5aa9e
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Mon Sep 22 13:30:46 2014 +0200

    gbproxy: Reset IMSI acquisition within gbproxy_unregister_link_info
    
    Currently then link_info is not cleanup up completely, when
    gbproxy_unregister_link_info is called.
    
    This patch adds a function gbproxy_reset_link that must be defined
    externally. This is done in gb_proxy.c, where it resets the IMSI
    acquisition.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=1894a9a32e51adff8ff6d5b2e7d916b7c8934ff4

commit 1894a9a32e51adff8ff6d5b2e7d916b7c8934ff4
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Mon Sep 22 10:42:05 2014 +0200

    gbproxy: Parse Attach Reject messages
    
    That message is currently ignored but should invalidate the TLLI and
    de-register the logical link instead.
    
    This patch extends the parser to recognize such messages and to set
    the invalidate_tlli flag.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=e65f9a26ae811253389f9d8b8ca62ad6778a22ec

commit e65f9a26ae811253389f9d8b8ca62ad6778a22ec
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Mon Sep 22 11:26:58 2014 +0200

    gbproxy/test: Add invalidation tests to test_gbproxy_keep_info()
    
    The TLLI should also be invalidated:
     - when an Attach Reject info is received from the SGSN
     - when an Attach Req is immediately followed by a Detach Req
     - when an Attach Req is immediately followed by an MT detach
       procedure
    
    To verify that, this patch adds corresponding message sequences to
    the test.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=3f0367e5e6b7eb82b0640cc32ba993ab41bb328a

commit 3f0367e5e6b7eb82b0640cc32ba993ab41bb328a
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Mon Sep 22 09:28:27 2014 +0200

    gbproxy/test: Fix IMSI length check (Coverity)
    
    This fixes the IMSI length assertion, which currently uses a
    greater-or-equal than zero comparison which always yields true. It is
    replaced by a greater than zero check.
    
    Fixes: Coverity CID 1239442
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=f708908abb0ee09f955a54675a5f081f85db5d97

commit f708908abb0ee09f955a54675a5f081f85db5d97
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 16:40:21 2014 +0200

    gbproxy/test: Fix time calculation in test_gbproxy_tlli_expire()
    
    A single test case still uses time() to obtain the reference time.
    
    This commit fixes this by using the 'now' variable instead, that
    contains a fixed time value and does therefore not depend on when the
    test is executed.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=6447c1b61f8079b25e7a27661bf930c8d380f36e

commit 6447c1b61f8079b25e7a27661bf930c8d380f36e
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 16:34:01 2014 +0200

    gbproxy: Use monotonic system time instead of time-of-day
    
    Currently time() is used for age calculations. This time source
    may jump either forwards or backwards in time (NTP update, leap
    seconds).
    
    This patch replaces the use of time() by using
    clock_gettime(CLOCK_MONOTONIC) instead.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=4c0159070f228643f05d040feefe1b705369a1fd

commit 4c0159070f228643f05d040feefe1b705369a1fd
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 16:14:14 2014 +0200

    gbproxy: Only search by valid identifiers
    
    Don't return a link_info if TLLI is 0 resp. P-TMSI is 0xffff. These
    values are used for uninitialised or cleared fields and can possibly
    match several entries.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=ba99221c279acda6fe1f779702e19846d85fd54c

commit ba99221c279acda6fe1f779702e19846d85fd54c
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 15:36:44 2014 +0200

    gbproxy: Replace 'tlli' by 'link' in VTY commands
    
    Since the (former) TLLI list has developed into a logical link list,
    related commands are renamed accordingly.
    
     - tlli-list * -> link-list *
     - delete-gbproxy-tlli * -> delete-gbproxy-link *
     - show gbproxy tllis -> show gbproxy links
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=fbfb544cdf690b9b8bad8a61aecaba923f6f3678

commit fbfb544cdf690b9b8bad8a61aecaba923f6f3678
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 16:03:07 2014 +0200

    gbproxy: Rename the field 'enabled_tllis' to 'logical_links'
    
    This field in struct gbproxy_patch_state has involved and holds a
    list of all tracked logical links now. Thus the name is modified
    accordingly.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=faba30b1d6353bcf320a433623485a3446ad183b

commit faba30b1d6353bcf320a433623485a3446ad183b
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 15:07:27 2014 +0200

    gbproxy: Use the term 'link' instead of 'tlli'
    
    Currently in many places where 'tlli' (Temporary Logical Link
    Identifier) within identifiers is used, the logical link itself is
    meant instead. For instance, the tlli_info contain information about
    an LLC logical link including up to four individual TLLI.
    
    To avoid confusion between these concepts, this patch replaces all
    'tlli_info' by 'link_info' and a few 'tlli' by 'link'.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=ed225b62e3787437803141e252b2cdd7892839dd

commit ed225b62e3787437803141e252b2cdd7892839dd
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 13:30:14 2014 +0200

    gbproxy: Rename functions related to tlli_info
    
    This patch replaces 'tlli' by 'tlli_info' within the following
    function identifiers:
      - gbproxy_delete_tlli
      - gbproxy_delete_tllis
      - gbproxy_remove_stale_tllis
      - gbproxy_touch_tlli
      - gbproxy_unregister_tlli
      - gbproxy_remove_matching_tllis
      - gbproxy_find_tlli -> gbproxy_tlli_info_by_tlli
      - gbproxy_find_tlli_by_* -> gbproxy_tlli_info_by_*
    
    These functions refer to the whole logical link info rather than to a
    certain TLLI. So they are renamed to be named consistently with
    gbproxy_attach_tlli_info and others.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=ab66130c738c726eb6a66698ed3885493de9ef46

commit ab66130c738c726eb6a66698ed3885493de9ef46
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 13:23:21 2014 +0200

    gbproxy: Remove sgsn_nsei parameter
    
    The function gbproxy_imsi_acquisition() has a parameter sgsn_nsei
    that is alyways equal to tlli_info->sgsn_nsei (if tlli_info is not
    NULL).
    
    This patch removes this parameter from gbproxy_imsi_acquisition() and
    gbproxy_flush_stored_messages() and accesses tlli_info->sgsn_nsei
    instead within these functions.
    
    Sponsored-by: On-Waves ehf

http://cgit.osmocom.org/openbsc/commit/?id=caa947c2a364d4b9d4c04c12c9119a6da64946f8

commit caa947c2a364d4b9d4c04c12c9119a6da64946f8
Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
Date:   Fri Sep 19 13:17:55 2014 +0200

    gbproxy: Rename identifiers related to IMSI matching
    
    This patch renames gbproxy_check_tlli() to
    gbproxy_imsi_matches() and struct tlli_info's
    enable_patching to imsi_matches.
    
    It's meant to be more obvious and consistent this way.
    
    Sponsored-by: On-Waves ehf

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

Summary of changes:


hooks/post-receive
-- 
The OpenBSC GSM Base Station Controller (+MSC/HLR/SGSN)


