Browse Source

don't give out ipv6 addresses if we're not ipv6 enabled

git.mgm/mediaproxy-ng/2.0
Richard Fuchs 14 years ago
parent
commit
7129c25e64
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      daemon/call.c

+ 3
- 1
daemon/call.c View File

@ -1115,7 +1115,9 @@ static char *streams_print(GQueue *s, unsigned int num, unsigned int off, const
t = s->head->data;
other_off = (off == 0) ? 1 : 0;
if (family == AF_INET || (family == 0 && IN6_IS_ADDR_V4MAPPED(&t->peers[other_off].rtps[0].peer.ip46))) {
if (family == AF_INET
|| (family == 0 && IN6_IS_ADDR_V4MAPPED(&t->peers[other_off].rtps[0].peer.ip46))
|| IN6_IS_ADDR_UNSPECIFIED(&t->call->callmaster->ipv6)) {
ip4 = t->peers[off].rtps[0].peer.ip46.s6_addr32[3];
if (!ip4)
strcpy(ips, "0.0.0.0");


Loading…
Cancel
Save