stats->ext_seq has been the SRTP receive index since srtp_index moved into
shm (08c7f5853d). The transcode sequencer overwrote it after every
emitted packet with its own roc<<16|seq, which lags the received packets
and, whenever the sequencer emits a late or replayed packet with a lower
sequence number, carries a roc that was incremented without a real
wrap-around. packet_index() then estimated the wrong index, and once the
sender's real roc reached 1 none of the fallback guesses matched, so every
packet of the stream failed authentication until the call ended.
packet_index() already maintains the index for every received packet, so
drop the write. Also make the sequencer's own roc increment only on a
forward wrap-around, never on a backwards step.
Closes#2221
Change-Id: Ia38bf8cbc63dd3435717927f1adfd81ac94ea347
(cherry picked from commit 956d7add09)
(cherry picked from commit ff56b32f81)
Treat a packet exactly one ring size ahead across the 65535->0
wrap-around as a seq reset, like the non-wrapped case, instead of
accepting it into the head slot.
Fixes#2220
Change-Id: I94e2fdd3d50d5c8241cfed5da06829097566356e
(cherry picked from commit fc703ce91c)
(cherry picked from commit fa598a070c)
Ref #2211
cli_handle() takes a str, but most "set" handlers parsed their value
with strtol(), strtod() or atoi() on instr->s and printed it with "%s",
reading up to the next NUL. The ng "cli" command passes a slice of the
request: "set maxsessions 1000" set 10007, "set rediscmdtimeout 0" set
7 ms, and error messages quoted the rest of the request.
Parse with the str_to_X helpers, plus a new str_to_d for maxcpu and
maxload, and print with STR_FORMAT. As with the str_to_X family, a
value with trailing characters ("10x") is refused, and so is a
non-number in the seven handlers that read it as 0. "terminate" now
matches all, own and foreign exactly (str_cmp()), not as a prefix.
Tested by auto-daemon-tests-redis-errors.pl and the new t/test-str.c.
Change-Id: I92ed33a4229688aba513c3d0410b9d77a8bcd516
(cherry picked from commit f54da0bcec)
(cherry picked from commit 56c61e88d1)
Use epoll's u64 field
Change-Id: If56e980b2d65cc0e32736c58a12cad1000628f2a
(cherry picked from commit c6508f4fd9)
(cherry picked from commit 11ed687e35)
Currently unused and transparent
Change-Id: I35604c9d5f724ae6a3bce714d708bed0fbed563f
(cherry picked from commit b2cf472a20)
(cherry picked from commit ded8f0033f)
The fallback for `avcodec_get_supported_config()` reads
`dec->avc.codec->pix_fmts`, but the decoder struct has no `codec` member,
so the build fails on anything below libavcodec 61.19:
lib/avc.c:73:39: error: 'struct <anonymous>' has no member named 'codec'
The line above it uses the `codec` argument and so should this one. The
encoder path has a `codec` member of its own, which is where this looks to
have come from.
Closes#2169
Change-Id: Iebf130d19c5107a012c61b821460a5879a777d39
Define types of packetizers, with dedicated init and destroy functions,
and move maintenance of sample stream into encoder
Change-Id: I992f696c2b986485a89582909e299b2f6d462e5b