linuxvirtual.h:
+if ENSC_ENABLE_INTERNAL_HEADERS
+ ln -sf '$(top_srcdir)/lib/virtual.h' '$@'
+else
ln -sf '$(kernelincludedir)/linux/virtual.h' '$@' && test -e '$@' || \
ln -sf '$(top_srcdir)/lib/virtual.h' '$@'
+endif
pathsubst_RULES = s!@'PKGLIBDIR'@!$(pkglibdir)!g; \
s!@'SBINDIR'@!$(sbindir)!g; \
dnl
AC_PREREQ(2.57)
-AC_INIT(util-vserver, 0.25.190, enrico.scholz@informatik.tu-chemnitz.de)
+AC_INIT(util-vserver, 0.26.192, enrico.scholz@informatik.tu-chemnitz.de)
AC_CONFIG_SRCDIR([src/capchroot.c])
AC_CONFIG_HEADER([config.h])
ENSC_UV_VROOTDIR(vserverdir)
ENSC_CHANGELOG([HEAD])
+dnl Check whether to use external kernel headers
+AC_MSG_CHECKING([whether to use internal kernel headers])
+AC_ARG_ENABLE([internal-headers],
+ [AC_HELP_STRING([--disable-internal-headers],
+ [use vserver specific headers from the kernel instead of the shipped versions (default: no)])],
+ [case "$enableval" in
+ yes|no) ;;
+ *) AC_MSG_ERROR(['$i' is not a supported value for '--disable-internal-headers']);;
+ esac],
+ [enable_internal_headers=yes])
+
+AM_CONDITIONAL(ENSC_ENABLE_INTERNAL_HEADERS, [test x"$enable_internal_headers" = xyes])
+AC_MSG_RESULT([$enable_internal_headers])
+
+
+dnl Check for the APIs to be used
AC_MSG_CHECKING([for supported APIs])
AC_ARG_ENABLE([apis],
[AC_HELP_STRING([--enable-apis=APIS],
- [enable support for the given apis; possible values are: legacy,compat,ALL (default: ALL)])],
+ [enable support for the given apis; possible values are: legacy,compat,v11,ALL (default: ALL)])],
[],
[supported_apis=ALL])
struct {
unsigned long addr;
unsigned long mask;
- } solved;
+ } solved = {0,0};
if (addrstr != NULL && addrstr[0] != '\0'){
printf ("ADDR=%s\n",addrstr);
solved.addr = ip_cnv (addrstr);
solved.addr = addr;
ret = 0;
}
+ else {
+ perror("ioctl(SIOCGIFADDR)");
+ }
+
if (maskstr != NULL && maskstr[0] != '\0'){
printf ("NETMASK=%s\n",maskstr);
solved.mask = ip_cnv (maskstr);
solved.mask = addr;
ret = 0;
}
+ else {
+ perror("ioctl(SIOCGIFNETMASK)");
+ }
+
if (bcaststr != NULL && bcaststr[0] != '\0'){
printf ("BCAST=%s\n",bcaststr);
}else if (ifconfig_ioctl(skfd,ifname,SIOCGIFBRDADDR, &ifr) >= 0){
,(addr>>8)&0xff
,addr&0xff);
ret = 0;
- }else{
+ }else if (solved.addr!=0 && solved.mask!=0) {
// Can't get it from the kernel, compute it from the IP
// and the netmask
unsigned long addr = (solved.addr & solved.mask)