aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libtrau/rtp_proxy.c15
-rw-r--r--openbsc/src/libtrau/trau_mux.c5
2 files changed, 18 insertions, 2 deletions
diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c
index 9c16a95ad..22d135c3e 100644
--- a/openbsc/src/libtrau/rtp_proxy.c
+++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -245,7 +245,7 @@ int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
int payload_type;
int payload_len;
int duration; /* in samples */
- int is_amr = 0;
+ int is_amr = 0, is_bfi = 0;
if (rs->tx_action != RTP_SEND_DOWNSTREAM) {
/* initialize sequences */
@@ -277,6 +277,12 @@ int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
duration = RTP_GSM_DURATION;
is_amr = 1;
break;
+ case GSM_BAD_FRAME:
+ payload_type = 0;
+ payload_len = 0;
+ duration = RTP_GSM_DURATION;
+ is_bfi = 1;
+ break;
default:
DEBUGPC(DLMUX, "unsupported message type %d\n",
frame->msg_type);
@@ -304,6 +310,13 @@ int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
}
}
+ if (is_bfi) {
+ /* In case of a bad frame, just count and drop packt. */
+ rs->transmit.timestamp += duration;
+ rs->transmit.sequence++;
+ return 0;
+ }
+
msg = msgb_alloc(sizeof(struct rtp_hdr) + payload_len, "RTP-GSM-FULL");
if (!msg)
return -ENOMEM;
diff --git a/openbsc/src/libtrau/trau_mux.c b/openbsc/src/libtrau/trau_mux.c
index fd1895f94..bb513cc85 100644
--- a/openbsc/src/libtrau/trau_mux.c
+++ b/openbsc/src/libtrau/trau_mux.c
@@ -242,7 +242,10 @@ struct msgb *trau_decode_fr(uint32_t callref,
i++;
j++;
}
- frame->msg_type = GSM_TCHF_FRAME;
+ if (tf->c_bits[11]) /* BFI */
+ frame->msg_type = GSM_BAD_FRAME;
+ else
+ frame->msg_type = GSM_TCHF_FRAME;
frame->callref = callref;
msgb_put(msg, sizeof(struct gsm_data_frame) + 33);