path: root/src
diff options
authorPablo Neira Ayuso <pablo@gnumonks.org>2013-12-15 22:20:13 +0100
committerPablo Neira Ayuso <pablo@gnumonks.org>2013-12-15 22:27:18 +0100
commit84fffecba5f172aa66fa363e0e37e0ad43c4f3b6 (patch)
treebdb0fe5432cd1d8b741d78e9ba3806d466dac87f /src
parent1b9949b8c6e4d6d73380bfd3c41b7485afc54202 (diff)
osmux: fix handling of too big RTP message in osmux_xfrm_input()
With this patch, osmux_xfrm_input() returns 0 (means "message has been processed") instead of 1 (means "retry") if the RTP message is too big to fit into one osmux batch. This fixes a likely infinite loop in the caller, which will retry forever for a message does not fit into the batch. Unlikely to happen in normal scenario, as RTP+AMR messages are way smaller than the interface MTU.
Diffstat (limited to 'src')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmux.c b/src/osmux.c
index 15c2739..0acffd7 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -472,7 +472,7 @@ int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid)
* to avoid a possible forever loop in the caller.
if (msg->len > OSMUX_BATCH_MAX - sizeof(struct osmux_hdr))
- return 1;
+ return 0;
rtph = osmo_rtp_get_hdr(msg);
if (rtph == NULL)