]> 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)
committerJoshua Colp <jcolp@sangoma.com>
Tue, 28 Apr 2020 18:05:25 +0000 (13:05 -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 9e5f04b2566cd32249a3de42b734e8fe36538ce1..e8b71c7016c34a50f665880ab4ff38797f639463 100644 (file)
@@ -6668,7 +6668,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));