Skip to content

Commit

Permalink
Fix IPv6 support in lb_is_destination() and lb_count_call().
Browse files Browse the repository at this point in the history
(cherry picked from commit c4505fa)
  • Loading branch information
bogdan-iancu committed Sep 12, 2018
1 parent 8730781 commit c71c07a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/load_balancer/lb_data.c
Expand Up @@ -1024,7 +1024,7 @@ int lb_is_dst(struct lb_data *data, struct sip_msg *_m,
LM_ERR("IP PV val is not string\n");
return -1;
}
if ( (ip=str2ip( &val.rs ))==NULL ) {
if ( (ip=str2ip( &val.rs ))==NULL && (ip=str2ip6( &val.rs ))==NULL) {
LM_ERR("IP val is not IP <%.*s>\n",val.rs.len,val.rs.s);
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/load_balancer/load_balancer.c
Expand Up @@ -784,7 +784,7 @@ static int w_lb_count_call(struct sip_msg *req, char *ip, char *port, char *grp,
LM_ERR("IP PV val is not string\n");
return -1;
}
if ( (ipa=str2ip( &val.rs ))==NULL ) {
if ( (ipa=str2ip( &val.rs ))==NULL && (ipa=str2ip6( &val.rs ))==NULL) {
LM_ERR("IP val is not IP <%.*s>\n",val.rs.len,val.rs.s);
return -1;
}
Expand Down

0 comments on commit c71c07a

Please sign in to comment.