Browse Source

MT#55283 honour `pt_filter` flag

Only skip forwarding unknown payload types in the kernel module if
there's reason to skip them, i.e. when we know that certain payload
types must be handled in userspace. Use an explicit flag to signal this
to the kernel module instead of implicitly doing it for anything that is
RTP.

Change-Id: I655317afe64a27252bf7b8be6c78418db2e1ccef
pull/1577/head
Richard Fuchs 3 years ago
parent
commit
435e5b62ff
2 changed files with 5 additions and 2 deletions
  1. +1
    -0
      daemon/media_socket.c
  2. +4
    -2
      kernel-module/xt_RTPENGINE.c

+ 1
- 0
daemon/media_socket.c View File

@ -1281,6 +1281,7 @@ static const char *kernelize_one(struct rtpengine_target_info *reti, GQueue *out
break;
}
if (!can_kernelize) {
reti->pt_filter = 1;
// ensure that the final list in *payload_types reflects the payload
// types populated in reti->payload_types
GList *next = l->next;


+ 4
- 2
kernel-module/xt_RTPENGINE.c View File

@ -1676,6 +1676,8 @@ static int proc_list_show(struct seq_file *f, void *v) {
proc_list_crypto_print(f, &g->decrypt, &g->target.decrypt, "decryption");
if (g->target.rtp)
seq_printf(f, " option: RTP\n");
if (g->target.pt_filter)
seq_printf(f, " option: PT filter\n");
if (g->target.rtp_only)
seq_printf(f, " option: RTP only\n");
if (g->target.rtcp_mux)
@ -4605,8 +4607,8 @@ found_ssrc:;
if (srtp_auth_validate(&g->decrypt, &g->target.decrypt, &rtp, &pkt_idx, ssrc_idx))
goto skip_error;
// if RTP, only forward packets of known/passthrough payload types
if (g->target.rtp && rtp_pt_idx < 0)
// only forward packets of known/passthrough payload types?
if (g->target.pt_filter && rtp_pt_idx < 0)
goto skip1;
errstr = "SRTP decryption failed";


Loading…
Cancel
Save