Skip to content

Commit

Permalink
nathelper: safety check for sipping_from when building SIP keepalive …
Browse files Browse the repository at this point in the history
…request

- reported by GH #1587
  • Loading branch information
miconda committed Jul 11, 2018
1 parent 20ebfcf commit ade1cad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/nathelper/sip_pinger.h
Expand Up @@ -127,6 +127,10 @@ static inline char *build_sipping(str *curi, struct socket_info *s, str *path,
str vaddr;
str vport;

if(sipping_from.s==NULL || sipping_from.len<=0) {
LM_WARN("SIP ping enabled but no SIP ping From address\n");
return NULL;
}
if(s->useinfo.name.len > 0)
vaddr = s->useinfo.name;
else
Expand Down Expand Up @@ -206,4 +210,4 @@ static inline char *build_sipping(str *curi, struct socket_info *s, str *path,
return buf;
}

#endif
#endif

0 comments on commit ade1cad

Please sign in to comment.