Issue compiling ocserv 0.11.0

Björn Ketelaars bjorn.ketelaars at
Sat Feb 20 05:12:02 PST 2016

I'm trying to get ocserv 0.11.0 to compile on OpenBSD. Unfortunately there is
an error:

cc -DHAVE_CONFIG_H -I. -I..  -I./../gl/ -I./../gl/ -I./ -I./../ -I./../ -I../libopts -I/usr/local/include -I/usr/local/include/p11-kit-1 -I/usr/include -I./common -I./common -I/usr/local/include -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/liboath     -I./http-parser/ -I./pcl/ -I/usr/local/include  -O2 -pipe -Wall -Wno-strict-aliasing -MT tun.o -MD -MP -MF $depbase.Tpo -c -o tun.o tun.c &&\
mv -f $depbase.Tpo $depbase.Po
tun.c: In function 'set_ipv6_addr':
tun.c:246: error: request for member 'ipv6_prefix' in something not a structure or union
tun.c:223: warning: unused variable 'p'
tun.c:222: warning: unused variable 'c_netmask_buf'
tun.c: In function 'open_tun':
tun.c:480: warning: unused variable 't'
tun.c:479: warning: unused variable 'ifr'
Makefile:1366: recipe for target 'tun.o' failed
gmake[4]: *** [tun.o] Error 1
gmake[4]: Leaving directory '/home/code/ports/pobj/ocserv-0.11.0/ocserv-0.11.0/src'

Simple fix:

--- src/tun.c.orig	Sat Feb 20 13:08:48 2016
+++ src/tun.c	Sat Feb 20 13:01:21 2016
@@ -243,7 +243,7 @@ int set_ipv6_addr(main_server_st * s, struct proc_st *
 	ifr6.ifra_dstaddr.sin6_len = sizeof(struct sockaddr_in6);
 	ifr6.ifra_dstaddr.sin6_family = AF_INET6;
-	ret = ipv6_prefix_to_mask(&ifr6.ifra_prefixmask.sin6_addr, proc->config.ipv6_prefix);
+	ret = ipv6_prefix_to_mask(&ifr6.ifra_prefixmask.sin6_addr, proc->config->ipv6_prefix);
 	if (ret == 0) {
 		memset(&ifr6.ifra_prefixmask.sin6_addr, 0xff, sizeof(struct in6_addr));

Björn Ketelaars
GPG key: 0x4F0E5F21

More information about the openconnect-devel mailing list