| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change should fix the following warnings:
logging.c:956: warning: unable to resolve reference to `talloc'
for \ref command
logging.c:203: warning: argument 'in' of command @param is not
found in the argument list of
log_level_str(unsigned int lvl)
logging.c:194: warning: argument 'in' of command @param is not
found in the argument list of
log_parse_level(const char *lvl)
logging.c:708: warning: argument 'print_catname' of command
@param is not found in the argument list of
log_set_print_category(struct log_target *target,
int print_category)
logging.c:687: warning: argument 'print_filename' of command
@param is not found in the argument list of
log_set_print_filename2(struct log_target *target,
enum log_filename_type lft)
logging.c:729: warning: argument 'print_catname' of command
@param is not found in the argument list of
log_set_print_level(struct log_target *target,
int print_level)
logging.c:893: warning: argument 'in' of command @param is not
found in the argument list of
log_target_destroy(struct log_target *target)
Change-Id: I85f6c70216b7574b49b90bb1469869a47f721713
|
|
|
|
|
|
|
|
| |
- fix trailing white-space;
- properly align parameters of functions;
- use tabs instead of 8 spaces where possible.
Change-Id: Iaf616592a6bd72a1e7e94d8c55475710868beef0
|
|
|
|
|
|
|
|
|
|
|
| |
- drop incorrect \ref and \a references;
- add missing documentation to LLIST_HEAD_INIT;
- document parameter 'member' of llist_entry();
- turn @argument naming into a valid \param format;
- fix 'type *' vs llist_head loop counter confusion;
- capitalize and dot-terminate all sentences.
Change-Id: Iac67bdb9d5fbf7c222d04858967337f2428d6a94
|
|
|
|
| |
Change-Id: Ied4cb2bd06147785540a53ef118e9268406da702
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 1261db15058cfa94615f26c1083bb8a38d09218b.
The patch broke openbsc's external tests, and currently it is unclear
whether it is just an error in the test or if openbsc makes wrong
assumptions about the length value. Let's revert the patch to unblock
the master-openbsc jenkins job.
Related: OS#3851
Change-Id: I9adea35ff6de36c1611c7f85dde1b15bc1c0e786
|
|
|
|
| |
Change-Id: Ibc63a5d4442a192efab8b5b30e0beb3545642ecc
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit cff2242e686be9ac19ba5757a710bc769a9201ec.
The patch broke openbsc:
../../src/libcommon/libcommon.a(talloc_ctx.o): In function `talloc_ctx_init':
/build/openbsc/src/libcommon/talloc_ctx.c:50: undefined reference to `tall_sigh_ctx'
See also:
https://lists.osmocom.org/pipermail/openbsc/2019-March/012843.html
Change-Id: Ib4cb31427a1cad063bc9f1a10b9c3182b314a9f2
|
|
|
|
|
|
|
|
|
| |
As indicated in the commitlog of
Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09,
the symbol was never exported in a header file, so it should be safe
to mark it as static.
Change-Id: I7132ffe9a7efcab226cc639d1b2357f7115bcadf
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is broken ever since it was added back in 2018 in commit
Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09
Rather than allocating from the user-supplied 'root_ctx', it is
allocating from the context that it's trying to create (which is
NULL at that time, rendering the entire operation more or less
a no-op. For sure you will not see osmo_signal structures never in
any talloc report.
Change-Id: I922d26815a3baa5be74bd3ee89d498555882d62f
|
|
|
|
|
|
|
|
|
|
|
|
| |
The naming of these constants dates back to when the code was private
within OpenBSC. Everything else was renamed (bsc_fd -> osmo_fd) at
the time, but somehow the BSC_FD_* defines have been missed at the
time.
Keep compatibility #defines around, but allow us to migrate the
applications to a less confusing naming meanwhile.
Change-Id: Ifae33ed61a7cf0ae54ad487399e7dd2489986436
|
|
|
|
| |
Change-Id: I55c6249b0c4c82d5a181001e945ff2eca6e9ca36
|
|
|
|
|
|
|
|
| |
When putting together a sockaddr_in, we must not only set the IP
address and port, but also set the address family to AF_INET. And
while at it, let's zero-initialize the entire 'struct sockdadr_in'.
Change-Id: I1c8d8fe7f79a2ec737baa7800247269c3271983e
|
|
|
|
| |
Change-Id: Ie6877277cddb0a9e049449c260afe3314ba65050
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The amount of arguments is already being checked a few lines before:
/* If any arguments are missing, redirect to 'show' */
if (argc < 3)
return show_timer(self, vty, argc, argv);
so we cannot reach the expression NULL inside this statement:
group_arg = argc > 0 ? argv[0] : NULL;
Change-Id: Ice59d1a46c2080cd02060e3410706c502db4ce0b
Fixes: CID#190873 Logically dead code (DEADCODE)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IPA CCM is using a somewhat weird TLV encoding scheme:
* 16bit length (of tag and value)
* 8bit tag
* value
Our existing code mapping the CCM to 'struct tlv_parse' used the plain
length value without accounting for the one-byte tag.
This patch ensures we only report the length of the "value" part,
excluding the tag.
Change-Id: I435aaa33605bd48635715a2c81aa2d231c1abf51
|
|
|
|
| |
Change-Id: I859a91ee4400b3685c05971f8c66bceca6758724
|
|
|
|
|
|
|
|
|
| |
This ensures that the rpath of the generated binaries is set to
use only the just-compiled libosmo{core,gsm,vty}.so and not any
system-wide installed libraries while avoiding the ugly shell script
wrapper.
Change-Id: I9b9ae0ed277ba71519661a66a70b7f86971e4511
|
|
|
|
|
|
|
|
|
|
|
| |
we cannot use "nsi->nsip.remote_ip", as this address is not set
when SNS is in use. We can only have a valid nsi->nsip.remote_ip
if there's only a single NS-VC inside the NS Instance, as this would
connect() the UDP socket to the remote IP/port, breaking any possibility
to have multiple NS-VCs to different SGNS-side IP addresses.
Closes: OS#3845
Change-Id: Ic094621eb01d7458063f531289d5eeadf52bf330
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Section 6.2.1 of 3GPP TS 48.016 states:
> A pre-configured endpoint shall not be used for NSE data or signalling
> traffic (with the exception of Size and Configuration procedures) unless
> it is configured by the SGSN using the auto-configuration procedures.
However, in the current SNS implementation, the initial IP/Port over
which we perform the SNS-SIZE + SNS-CONFIG are treated as one of the
normal NS-VCs. Specifically, we also perform the NS-ALIVE procedure on
it, which is clearly wrong.
Let's explicitly create the "initial" NS-VC with data and signalling
weight of 0, and ensure we never start the alive timer or send any
non-SNS PDUs on this connection as long as SNS was not used to change
either of the two weights to non-zero.
While at it, also safeguard against processing any incoming non-SNS
messages on such a all-zero-weight connection.
Change-Id: I16a91a07e5914d123b2ea2f8413b94e7cd518628
Closes: OS#3844
|
|
|
|
| |
Change-Id: I8b98621a582a23d0483a5340b4aca7e0bc096e6d
|
|
|
|
| |
Change-Id: Id84021858dfb2f7d6a7cf81ae73bd94cd47f6776
|
|
|
|
| |
Change-Id: Id5d577522a4889e152158f7e93ee1c99d3a21003
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function gsm0808_sc_cfg_from_gsm48_mr_cfg() is used to convert a
gsm48 multirate struct into a set of S-bits (S0 to S15). However, the
conversion function currently does not take into account that bit S1
actually stands for four rates at once (Config-NB-Code = 1). Lets make
sure that S1 is only set when the multirate configuration permits all
four required rates.
Change-Id: I6ad531d4e70c2252e32e2bbaca8e14a7ec6d9840
Related: SYS#4470
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function gsm0808_sc_cfg_from_gsm48_mr_cfg() takes an S15 to S0
bitmask and converts that bitmask into an AMR multirate configuration
struct.
Unfortunately the current implementation implements 3GPP TS 28.062,
Table 7.11.3.1.3-2 wrongly in some aspects. Lets fix this.
- Fix wrong interpretation of the bitpatterns
- 5,15K is invalid and must never be selected
- Make sure that no more than 4 rates are selected in the active set
- Extend unit-test
Change-Id: I6fd7f4073b84093742c322752f2fd878d1071e15
Related: SYS#4470
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CGI to Cell ID: for example, for Paging, osmo-msc has a CGI for a subscriber
and needs to send out a Cell Identifier IE. Makes sense to add this conversion
here.
Cell ID to CGI: for a Layer 3 Complete, a subscriber sends the current cell in
the form of a Cell Identifier, which we store as a CGI, if necessary enriched
with the local PLMN.
Add enum with bitmask values to identify parts of a CGI, for the return value
of gsm0808_cell_id_to_cgi(). Can't use enum CELL_IDENT for that, because it
doesn't have a value for just a PLMN (and is not a bitmask).
Change-Id: Ib9af67b100c4583342a2103669732dab2e577b04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During FSM design for osmo-msc, I noticed that the current behavior that
keep_timer=true doesn't guarantee a running timer can make FSM design a bit
complex, especially when using osmo_tdef for timeout definitions.
A desirable keep_timer=true behavior is one that keeps the previous timer
running, but starts a timer if no timer is running yet.
The simplest example is: a given state repeatedly transitions back to itself,
but wants to set a timeout only on first entering, avoiding to restart the
timeout on re-entering.
Another example is a repeated transition between two or more states, where the
first time we enter this group a timeout should start, but it should not
restart from scratch on every transition.
When using osmo_tdef timeout definitions for this, so far separate meaningless
states have to be introduced that merely set a fixed timeout.
To simplify, add osmo_fsm_inst_state_chg_keep_or_start_timer(), and use this in
osmo_tdef_fsm_inst_state_chg() when both keep_timer == true *and* T != 0.
In tdef_test.ok, the changes show that on first entering state L, the previous
T=1 is now kept with a large remaining timeout. When entering state L from O,
where no timer was running, this time L's T123 is started.
Change-Id: Id647511a4b18e0c4de0e66fb1f35dc9adb9177db
|
|
|
|
|
|
|
|
|
|
|
|
| |
Always call osmo_tdef_fsm_inst_state_chg(), also when no timeout is defined.
When there is no timeout defined for a state, tdef_test.c tries to be smart and
print different output. In that mess, I missed the fact that
osmo_tdef_fsm_inst_state_chg() isn't always called as it should. In the same
mess, the resulting state was never printed until the preceding patch, which
helped to hide this bug.
Change-Id: I1d953d99854422bff8eb32f051e9c6147bc836b6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Always print the state after a state transition.
This shows that actually state transitions are missing for states that have
no timer defined. This is a bug in tdef_test.c, to be fixed subsequently.
- Instead of total time passed since start, print the individual fake time
intervals. Omit initial useless zero fake time advance.
- Add two more state transitions, back out from and into a state that has no
timeout set.
Change-Id: Icb31af96d37741e256ff07868f3d4f5c48cdda74
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fi->T values are int, i.e. can be negative. Do not log them as unsigned, but
define a distinct timer class "Xnnnn" for negative T values: i.e. for T == -1,
print "Timeout of X1" instead of "Timeout of T4294967295".
The negative T timer number space is useful to distinguish freely invented
timers from proper 3GPP defined T numbers. So far I was using numbers like
T993210 or T9999 for invented T, but X1, X2 etc. is a better solution. This way
we can make sure to not accidentally define an invented timer number that
actually collides with a proper 3GPP specified timer number that the author was
not aware of at the time of writing.
Add OSMO_T_FMT and OSMO_T_FMT_ARGS() macros as standardized timer number print
format. Use that in fsm.c, tdef_vty.c, and adjust vty tests accordingly.
Mention the two timer classes in various API docs and VTY online-docs.
Change-Id: I3a59457623da9309fbbda235fe18fadd1636bff6
|
|
|
|
| |
Change-Id: Ide94558d1c31356483252b83e04b061b4ee4d3bf
|
|
|
|
|
|
|
|
| |
Check return value of RACH encode/decode functions and fail test on
unexpected results.
Change-Id: I41bfa808e3c064a11152e7ce8ee77a01d38a0744
Related: OS#1854
|
|
|
|
| |
Change-Id: Ic2652c7e4ffe1e707022168ac6c0da7c88ae7f45
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a flag that adds timeout info to osmo_fsm_inst state change logging.
To not affect unit testing, make this an opt-in feature that is disabled by
default -- mostly because osmo_fsm_inst_state_chg_keep_timer() will produce
non-deterministic logging depending on timing (logs remaining time).
Unit tests that don't verify log output and those that use fake time may also
enable this feature. Do so in fsm_test.c.
The idea is that in due course we will add osmo_fsm_log_timeouts(true) calls to
all of our production applications' main() initialization.
Change-Id: I089b81021a1a4ada1205261470da032b82d57872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The NS implementation part of the Gb implementation libosmogb
so far implemented a rather classic dialect of Gb, with lots of
heritage to FR (Frame Relay) transports. At least since Release 6
of the NS specification, there's an IP Sub-Network Service (SNS),
which
* permits for dynamic configuration of IP endpoints and their NS-VCs
* abandons the concept of a NSVCI on IP transport
* forbids the use of RESET/BLOCK/UNBLOCK procedures on IP transport
This commit introduces BSS-side IP-SNS support to libosmogb in a
minimally invasive way. It adds a corresponding SNS FSM to each NS
instance, and implements the new SIZE/CONFIG/ADD/DELETE/CHANGE_WEIGHT
procedures very closely aligned with the spec.
In order to use the SNS flavor (rather than the classic one),
a BSS implementation should use gprs_ns_nsip_connect_sns() instead
of the existing gprs_ns_nsip_connect().
This implementation comes with a set of TTCN-3 tests in
PCU_Tests_RAW_SNS.ttcn, see Change-ID
I0fe3d4579960bab0494c294ec7ab8032feed4fb2 of osmo-ttcn3-hacks.git
Closes: OS#3372
Closes: OS#3617
Change-Id: I84786c3b43a8ae34ef3b3ba84b33c90042d234ea
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function performs sending a NS-ALIVE PDU and starting Tns-Test,
let's use it in all places where we used to do that.
As part of this, also fix a bug where the sendto() return value (number
of bytes sent) would actually propagate up all the way to
gprs_ns_rx_reset() return value, which in turn affects the test results
on stdout.
Change-Id: I4d303117f77fabb74bbb91887b9914a81c2a084a
|
|
|
|
|
|
|
|
|
|
|
| |
Modern NS specifications contain a SNS (Sub Network Service) for
negotiating IP/port/weight parameters of NS-over-IP links dynamically.
This patch adds message encoding routines for SNS-CONFIG, SNS-SIZE
and their respective acknowledgements.
Related: OS#3372
Change-Id: I5c47e1c3c10deb89a7470ee2c03adfc174accc93
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should be large enough to prepend a struct osmo_scu_prim to pass down an
SCCP stack (see libosmo-sccp). 264 should suffice, but pick the next larger
power-of-two instead.
In osmo-msc, I would like to prepend an osmo_prim to the msgb created by
gsm0808 API, but turns out the headroom is too small:
msgb(0x61700001b660): Not enough headroom msgb_push (126 < 264)
Instead of always copying a msgb that has just that instant been created, it
makes more sense to allocate sufficient headroom in the first place.
Change-Id: I95729991eb49555f8bba60c5dc916131b03b6cf2
|
|
|
|
|
|
|
|
|
| |
Add functions to dump LCLS (without GCR) and GCR. Dumping entire struct
results in inconveniently long string hence the separate functions. Both
use talloc functions so they expect caller to take care of providing
proper allocation context and freeing memory.
Change-Id: Ic3609224c8f3282d667e75f68bc20327e36eb9e6
|
|
|
|
| |
Change-Id: I4144506feee74a8219bd3736087c30cc6323ec1d
|
|
|
|
|
|
|
|
| |
When I added the definitions for the IP-SNS in commit
f030b210e8c13314d361a6b721a0cbcc72935219 back in 2010, I forgot to update
the string definitions in ns_cause_str[]. Let's fix that
Change-Id: I419ccc482d99b01263a60aede83dacd2d9de56ab
|
|
|
|
| |
Change-Id: I9209ee4ba5ebfc4f96b4c1d42840e1906455bae7
|
|
|
|
|
|
|
|
|
|
| |
That's pretty straightforward and convenient extention: handle all
extra positional arguments as patch file names. This makes it similar to
'cp' and other coreutils basic tools. For example:
osmo-config-merge base.cfg patch1.cfg patch2.cfg patch3.cfg
will apply 3 patches to the base config file.
Change-Id: I212cbdc3bf6f251c1a3175737ac74242fb004c6d
|
|
|
|
|
|
|
|
|
|
| |
Make sure to clear any log context before processing the next incoming message
as part of some file descriptor callback. This effectively prevents "context
leaking" from processing of one message into processing of the next message as part
of one iteration through the list of file descriptors here.
Change-Id: I3644c7bc1a9cec5858eb0faf94efc8c3ba7f5d8d
Closes: OS#3813
|
|
|
|
|
|
|
|
| |
According to Section 9.2.4 of 3GPP TS 48.016, the NS-BLOCK-ACK PDU has a
mandatory NSVCI IE which we so far were missing.
Change-Id: Ie7205e99d57f1e42d941f1be2460d8c9f46aadfe
Closes: OS#3808
|
|
|
|
|
|
|
| |
The symbols for those functions were always exported, but we
somehow didn't declare them in gprs_ns.h
Change-Id: Ib073e9c93fcdf408b63000182e90aabce37f687e
|
|
|
|
| |
Change-Id: Ic19f65bdc5527ad5a69d0a92320ce5f672bf4d2b
|
|
|
|
|
|
| |
If we use gprs_ns_tx_alive() we will get logging for free.
Change-Id: I53d410d13540d389096c40425e1fa2eb7460b16b
|
|
|
|
|
|
|
| |
We're transmitting a BVC-UNBLOCK but the log states the opposite:
BVC-BLOCK. Let's fix that.
Change-Id: I70fa7336402d193513f89fcf3068b0b21925702d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During log review lack of support for PDCH was spotted:
scheduler.c:593 Configuring multiframe with PDCH trx=0 ts=4
rsl.c:1159 (bts=0,trx=0,ts=4,ss=0): chan_nr=UNKNOWN on TS4 type=0x00 mode=SIGNALLING
rsl.c:741 (bts=0,trx=0,ts=4,pchan=TCH/F_TCH/H_PDCH as PDCH) (ss=0) PDTCH Tx CHAN ACT ACK
Wireshark shows:
1100 0... = C-bits: PDCH (24)
.... .100 = Time slot number (TN): 4
Change-Id: If6ed96c9eb0431eb24e2135634def61e0ea506ea
|
|
|
|
|
| |
Change-Id: Ie3f34b78edc91a013152742bebbd839586a787fe
Related: OS#3805
|