Skip to content

Commit

Permalink
Fix build failure on systems missing IPV6_TCLASS
Browse files Browse the repository at this point in the history
Some operating systems such as GNU/Hurd support IPv6 but do not define
the IPV6_TCLASS socket option.

Signed-off-by: Mike Miller <mtmiller@debian.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
mtmiller authored and dwmw2 committed Jan 10, 2019
1 parent 263fa6c commit c04dd44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ssl.c
Expand Up @@ -913,8 +913,10 @@ int udp_sockaddr(struct openconnect_info *vpninfo, int port)
} else if (vpninfo->peer_addr->sa_family == AF_INET6) {
struct sockaddr_in6 *sin = (void *)vpninfo->dtls_addr;
sin->sin6_port = htons(port);
#if defined(IPV6_TCLASS)
vpninfo->dtls_tos_proto = IPPROTO_IPV6;
vpninfo->dtls_tos_optname = IPV6_TCLASS;
#endif
} else {
vpn_progress(vpninfo, PRG_ERR,
_("Unknown protocol family %d. Cannot create UDP server address\n"),
Expand Down

0 comments on commit c04dd44

Please sign in to comment.