Browse Source

fix IPv4 TOS if IPv6 is enabled

git.mgm/mediaproxy-ng/master
Richard Fuchs 12 years ago
parent
commit
bcc020eefb
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      daemon/call.c

+ 4
- 2
daemon/call.c View File

@ -1176,14 +1176,16 @@ static int get_port6(struct udp_fd *r, u_int16_t p, struct callmaster *m) {
nonblock(fd);
reuseaddr(fd);
tos = m->conf.tos;
ipv6only(fd, 0);
if (m->conf.tos)
setsockopt(fd, IPPROTO_IP, IP_TOS, &m->conf.tos, sizeof(m->conf.tos));
#ifdef IPV6_TCLASS
tos = m->conf.tos;
if (tos)
setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos));
#else
#warning "Will not set IPv6 traffic class"
#endif
ipv6only(fd, 0);
ZERO(sin);
sin.sin6_family = AF_INET6;


Loading…
Cancel
Save