Zero SSRC are technically invalid, but the code accepts them as valid
and therefore sets up things like crypto contexts for zero SSRCs.
Consequently it's possible to have a zero SSRC first in the list of
SSRCs and other valid SSRCs later in the list, which means we can't use
the presence of a non-zero SSRC first in the list as a flag to determine
whether SSRC tracking is in use or not. Use an explicit flag instead.
Change-Id: I88736e5d6b0f66c58f8d675137231760951e7610
(cherry picked from commit 85ec6e2870)
Despite this code being called from userspace, we must disable
interrupts while having ssrc_stats_lock acquired, as the same lock is
acquired elsewhere from within an interrupt context.
closes#1492
Change-Id: Ia6f31eb876ee98ad355d12f9361cbc068d008608
All crypto suites except AEAD have an explicit packet authentication
stage. If authentication fails for a packet, we take some guesses about
a ROC mismatch and see if authentication can succeed with a different
ROC. If a working ROC is found, our tracked ROC is updated and
decryption proceeds.
AEAD doesn't have an explicit authentication stage and authentication is
performed implicitly by the decryption engine, which simply returns a
decryption error if the authentication fails. We must therefore add the
same ROC guessing logic at this step for AEAD.
Change-Id: Ic1a70daa667e23976b74d2303c823b8d8c7bcb2b
The hexint modparam type became available in 5.10.
The stream_open() function became available at some point in 5.0.x.
Closes#1431
Change-Id: I4965d05a2c4c0f0bf526ea0bf3f76f5ca2f9dff6
The main kernel interface has no concept of file position, therefore it
makes no sense to keep the additional overhead of ensuring an atomic
file position. Calling stream_open disables the FMODE_ATOMIC_POS flag
which in turn disables the extra locking for the fpos.
Change-Id: I14c37c3894791126aaf9caa0695da654a2012261
The per-table /proc files may contain sensitive information. Add an
optional file mode mask to apply to the top directly to hide it from
unprivileged users.
Change-Id: I3ec02739e0d97e53c8628259922ccf64ddfa8415
AVPF extended (non-compound) RTCP packets don't satisy the same RTP-like
header rules as regular RTCP compound packets, therefore we move the
RTCP mux test ahead of the RTP header parsing test.
Change-Id: Iecb3895d16796095f572c2eda2efa0a7a0dc69e7
Dummy-define RHEL_RELEASE_VERSION() if not present so older compilers
don't stumble over it
closes#1309
Change-Id: I0815950bc92cc0d6e0c2979c32bf568f23b5cb55
If the seq_file buffer overflows, the printing of the last item is
re-tried following a stop/start event on the seq_file. Therefore we
cannot unconditionally increase the offset whenever our `next` method is
called.
closes#1244
Change-Id: I7026deeeb03423cc2da57b1e069019638cf734cf
Whether a bit-field is signed or unsigned is implementation specific, so
we should be explicit about this.
Change-Id: I744df3d24bc08e95fa816ba4135f19cd3a5dcb17
Warned-by: lgtm
This commit adds a header to the mix to prevent the following compile
error:
make[3]: Entering directory '/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtpengine-no-transcode/rtpengine-mr8.3.1.4/kernel-module'
make -C /home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.19.122 M=/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtpengine-no-transcode/rtpengine-mr8.3.1.4/kernel-module O=/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.19.122 modules
make[4]: Entering directory '/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.19.122'
make[5]: Entering directory '/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.19.122'
CC [M] /home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtpengine-no-transcode/rtpengine-mr8.3.1.4/kernel-module/xt_RTPENGINE.o
/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtpengine-no-transcode/rtpengine-mr8.3.1.4/kernel-module/xt_RTPENGINE.c: In function 'send_proxy_packet6':
/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtpengine-no-transcode/rtpengine-mr8.3.1.4/kernel-module/xt_RTPENGINE.c:3387:14: error: implicit declaration of function 'csum_ipv6_magic'; did you mean 'csum_tcpudp_magic'? [-Werror=implicit-function-declaration]
uh->check = csum_ipv6_magic(&ih->saddr, &ih->daddr, datalen, IPPROTO_UDP, csum_partial(uh, datalen, 0));
^~~~~~~~~~~~~~~
csum_tcpudp_magic
cc1: some warnings being treated as errors
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>