]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_rtp_asterisk: Protect access to nochecksums with #ifdef
authorGuido Falsi <madpilot@FreeBSD.org>
Sun, 26 Apr 2020 10:56:47 +0000 (12:56 +0200)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 28 Apr 2020 18:56:05 +0000 (13:56 -0500)
Recently code accessing nochecksums variable has been added without including #ifdef SO_NO_CHECK protection, while the variable is created only when such constant is defined.

ASTERISK-28852 #close

Change-Id: I381718893b80599ab8635f2b594a10c1000d595e

res/res_rtp_asterisk.c

index 75be5610f0a3994121fbeba6708b08b1cbfafc37..3bcfadac480600cb3d1a4c5e1fdfebc58e434210 100644 (file)
@@ -8868,7 +8868,9 @@ static char *handle_cli_rtp_settings(struct ast_cli_entry *e, int cmd, struct as
        ast_cli(a->fd, "----------------\n");
        ast_cli(a->fd, "  Port start:      %d\n", rtpstart);
        ast_cli(a->fd, "  Port end:        %d\n", rtpend);
+#ifdef SO_NO_CHECK
        ast_cli(a->fd, "  Checksums:       %s\n", AST_CLI_YESNO(nochecksums == 0));
+#endif
        ast_cli(a->fd, "  DTMF Timeout:    %d\n", dtmftimeout);
        ast_cli(a->fd, "  Strict RTP:      %s\n", AST_CLI_YESNO(strictrtp));