Age | Commit message (Collapse) | Author | Files | Lines |
|
By default, SCTP sockets are using a graceful shutdown using the
SCTP SHUTDOWN chunk. The socket API allows us to explicitly request
a SCTP ABORT.
Introduce new osmo_stream_{cli,srv,srv_link}_set_sctp_abort() API
calls by which the application can request that any termination
of the related socket should request the kernel to do ABORT rather
than shutdown. This obviously only works for explicit termination,
and not for implicit termination via segfault and/or process exit().
Change-Id: I6a41ec4cdca2d789025839c84ff5650e0613c838
Related: SYS#6018
|
|
... if --enable-werror is used
Change-Id: Icee84b6727f0242e7b2004214183c2389a0bb604
|
|
Change-Id: Ife20b9d18e6ca86a06991d68165694e31052c58a
|
|
Change-Id: I8a9d27856ebdd5405b1977d12e91f8dcbdcd1d6b
|
|
Change-Id: I12d74e9b407f1ea7af83fb3ec4d03ad7228a27cf
|
|
This fixes a potential heap-use-after-free error.
When there is still data to be written the osmo_stream_srv_cb() will
call osmo_stream_srv_write() which will try to dereference conn even
though it has already been freed.
Change-Id: I5ac1920b8d4ce3b0205f00d253e7ed878fb745e3
|
|
to cli
Change-Id: I742db401165477f85e66bb428f156ecbbd5d6665
|
|
This will become useful once osmo_io can be used as a backend.
Change-Id: I7e964dea0adee8edbb9b75d2d17e7d0c5d8917d5
|
|
Related: OS#5958
Change-Id: Icfdbea7cbe4681cd3b286471032fd6dd7226888f
|
|
Change-Id: I7b656c167cceb0657c0362b1237f846b7f3e9770
|
|
* -I is a preprocessor flag, so it should be in AM_CPPFLAGS
* $(LIBOSMOCORE_LDFLAGS) is not defined here, remove it
Change-Id: Ice892f848e06b601e67b06a4e1e25c11fb7c4128
|
|
Otherwise the linker may pick system-installed libs instead.
Change-Id: Ia639b1c5460ad9391d2c311b4978ca9374789f7a
|
|
Related: OS#4393
Change-Id: I2ea378ba4d17e977da25ef9e6e86b3de2ccd0ad7
|
|
In osmo_stream_srv_send(), call msgb_free() if the msgb is not enqueued.
Before this, osmo_stream_srv_send() enqueues a msgb, assuming the queue
will free it. But if OSMO_STREAM_SRV_F_FLUSH_DESTROY is set, it just
returns and drops the msgb. There is no rc, so the caller cannot know.
Change-Id: I994c5e06a9030cfbf4fca8ab42588c61f7121cee
|
|
Ensure there is no diff to prepare to run this in CI.
Related: OS#5884
Change-Id: Ib3459ebb2414dd1798dfda6d3c585232ceff741b
|
|
We use file descriptor of -1 as an indicator for unopened link internally.
However, since all the structs of libosmo-netif are opaque, using it from external
applications looks like a leaky abstraction.
Let's remedy this by adding function which properly check this for the library user.
Related: OS#5568
Change-Id: I91aa7da5f09ec4e8e2d21c827b45ed92e6b0e3d9
|
|
Related: OS#5568
Change-Id: Ie15bb3dc99bfe18065e03fde68d517b0d389b7ad
|
|
Change-Id: Id67541378193f22f924409f02301f0063aab639e
|
|
Fixes printing hexbuf which might not have been null-terminated.
Related: SYS#6161
Fixes: Coverity CID#302068
Change-Id: I460f1deb7455b3b6a85a090bdcad8e21a883db68
|
|
This program allows inspecting a list of AMR PDUs in hexstring format
present in a text file.
This allows easily finding out the properties of the PDU as well as
finding potential errors on the data.
It also allows forcing decode in different formats (octet-aligned,
bandwidth-efficient) in order to detect which may be the correct one.
Related: SYS#6161
Change-Id: Iffa6cc2e5391b77e3097d4c3b8d3f5211427dbe2
|
|
Change-Id: I2d11ce71c29ae046c2feab1e59045d97dc3e5099
|
|
Change-Id: Ib92856ede3f493615c24d883954989e952c51157
|
|
Change-Id: I34c76b18ee45e12dba92864715e8ef91e6de3b01
|
|
The header conversion is now much clearer. Take the chance to delay the
memset(buf) after the checks.
Change-Id: I5042dc628ac70eca62b4980f4acae991dd976528
|
|
Change-Id: I72ef6fc700f628ea158ea888a5f1e9dc8776ab7e
|
|
Change-Id: I84e447960c4912147d2f3a6170393370d354625b
|
|
Fixes: 678c7fc8fe4fd11e09ccd642ad60c10c365bd19a
Change-Id: I63c8082bec12bf81760330d1fc0b13de23ac6a24
|
|
On some stream socket types like TCP it is expected that the send()
syscall may return a short write, ie not all bytes being copied to the
socket. In that case we need to keep the bytes not copied and attempt to
submit them later.
Related: OS#5836
Change-Id: I3755aada02ceb186fb990604e3496126fe47e1fb
|
|
Before this patch, the WRITE poll flag was being left ON and waited to
be polled again by the kernel in order to disable it.
Let's spate that extra polling cycle which only creates more polling
triggers, context switches, etc.
Change-Id: I1dd2145249a7322ad95e49be588fd472f00734e1
|
|
This is clearly a problem on TCP streams which needs to be addressed in
the future.
Related: OS#5836
Change-Id: I9bd257b80a378b779df84e204673f8e394eca5b6
|
|
Change-Id: I5b5d6f7a5a1722bd01c13d32557c21d8a0889966
|
|
Change-Id: I57b064fa0498be76579ae9597ab9217d659aae41
|
|
Related: SYS#6161
Change-Id: If8baebc532090ba9808af7f3dd0afec86f40a7d6
|
|
Related: SYS#6161
Change-Id: I0e766b3231f03ea87d89fad6ecdce3bd14769054
|
|
FT=15 will be accepted in follow-up patch, so keep a tests checking the
invalid FT code path.
Change-Id: I5872921f5d4a909261e770ddecf048329200724b
|
|
Change-Id: I4b44257605bc5967d862ee29076ea6260d9a6bd8
|
|
There's no need to have the variable as signed anymore since the loop
was modified in the previous patch. osmo_amr_bytes() returns a size_t
(unsigned).
Change-Id: I8aa6b5f6d3334e152a62b7c28aac3f881f027894
|
|
oa_payload_len can be 2 if osmo_amr_bytes() returns 0 (it will return 0
when FT NO_DATA is supported). In tha case, the loop condition
(oa_payload_len - 3) (signed) is compared against unsigned i which ends
up accessing i=256.
Change-Id: I1e513f493d7883a03acbfa3d9744ec63657810b3
|
|
Needed for size_t uint8_t, etc.
Change-Id: Ia808c2b6c426de79db5c88784dd7bce6096179aa
|
|
Current internal use of APIs marked as deprecated seems to be causing
issues when building on debian unstable.
Simply rearrange the init code to an internal helper function to avoid
code duplication while still keeping the old deprecated APIs working as
they used to, without getting deprecation warnings at buildtime.
Related: OS#5677
Change-Id: Ie8e168740c0421edd96013620256aab0306dc6c5
|
|
We implicitly rely on conn->srv availability in several functions.
Let's ensure it's available in function creating conn.
Change-Id: If494eac5dcce6c5ae30e928b92e57067d5681a42
|
|
Change-Id: I0da1d7875bd32f6c1022676b64f9f0d14bad3144
|
|
Fixes: Coverity CID#283432
Change-Id: Iab525c5b7eb1e455a8229fb39e96897aac53298c
|
|
Fixes: Coverity CID#283433
Change-Id: Ib11d4b64c6df19a85c4374fde89e1b56f410e438
|
|
Change-Id: Ie2ccc22c53c33025c477236166ea97972c21ec3e
|
|
This allows easily identifying and following state and lifecycle of
CIDs when looking at logs.
Related: SYS#6161
Change-Id: I6a3113dfaef0adbb20162985e3b7d57c46dbc016
|
|
This will be used internally by osmux code to print more meaningful
lines.
Related: SYS#6161
Change-Id: Ibbcfdb23a6015ce45840bb64b2b560c2806f7ff6
|
|
Previously, if RTP jumps were detected in the incoming RTP stream and
osmux state for that circuit was to start the next batch, the hole would
not been filled during queueing time and instead the encoder would have
set the M bit in the osmuxhdr to announce a sync point.
For small holes (eg less than the batch factor) it makes sense to start
filling the batch with crafted RTP packets in order to avoid the encoder
later on setting the M bit and hence avoid the peer receiving the Osmux
frame having to start a new syncrhonization point.
Related: SYS#6161
Change-Id: I9596501adf5b7b91983618c92c7b1792ee9461a3
|
|
So far only small intra-batch seqnum jumps are filled in with forged RTP
packets when storing the incoming RTP packets.
Under some conditions, holes may still exist in the queue of RTP packets
for a stream:
* Seqnum detected when first incoming RTP in batch is queued (this can
be improved in the future).
* Big seqnum jumps > batch_factor or simply filling out of bounds for currently
enqueued batch.
Specially the second case can come from long network dropouts, or simply
due to a bug in the RTP being feed to osmux layer (be it from local code
or peer). In that case (long jumps) we don't want to generate tons of
packets filling in several entire batches (potentially incredibly big
amount of batches).
Instead, in these scenarios, simply let the osmux peer know there was a
jump by setting the M bit on the next osmux header for that circuit
after the seq jump has been detected.
Related: SYS#6161
Change-Id: I05b1eae400cb60d1f4e927f853619d5ff470163f
|
|
Change-Id: I561fb836989d31f43a15b193ed9bec4103ea0f2b
|