@ -4831,7 +4831,7 @@ static inline int srtp_encrypt(struct re_crypto_context *c,
}
static inline int srtcp_encrypt ( struct re_crypto_context * c ,
struct rtpengine_srtp * s , struct rtp_parsed * r ,
uint64_t pkt_idx )
uint64_t * pkt_idx p )
{
int ret ;
uint32_t idx ;
@ -4840,13 +4840,14 @@ static inline int srtcp_encrypt(struct re_crypto_context *c,
return 0 ;
if ( ! c - > cipher - > encrypt_rtcp )
return 0 ;
ret = c - > cipher - > encrypt_rtcp ( c , s , r , & pkt_idx ) ;
ret = c - > cipher - > encrypt_rtcp ( c , s , r , pkt_idx p ) ;
if ( ret )
return ret ;
idx = htonl ( 0x80000000ULL | pkt_idx ) ;
idx = htonl ( 0x80000000ULL | * pkt_idx p ) ;
memcpy ( r - > payload + r - > payload_len , & idx , sizeof ( idx ) ) ;
r - > payload_len + = sizeof ( idx ) ;
( * pkt_idxp ) + + ;
return 0 ;
}
@ -5030,7 +5031,7 @@ static void proxy_packet_output_rtcp(struct sk_buff *skb, struct rtpengine_outpu
pkt_idx = o - > output . encrypt . last_rtcp_index [ ssrc_idx ] + + ;
spin_unlock_irqrestore ( & o - > encrypt_rtcp . lock , flags ) ;
pllen = rtp - > payload_len ;
srtcp_encrypt ( & o - > encrypt_rtcp , & o - > output . encrypt , rtp , pkt_idx ) ;
srtcp_encrypt ( & o - > encrypt_rtcp , & o - > output . encrypt , rtp , & o - > output . encrypt . last_rtcp_index [ ssrc_idx ] ) ;
srtcp_authenticate ( & o - > encrypt_rtcp , & o - > output . encrypt , rtp , pkt_idx ) ;
skb_put ( skb , rtp - > payload_len - pllen ) ;
}