Bug 117144 - sysutils/nut : ACL with IPv6 address rejected
Summary: sysutils/nut : ACL with IPv6 address rejected
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-12 22:20 UTC by regisr
Modified: 2008-01-02 14:00 UTC (History)
0 users

See Also:


Attachments
sysutils_nut.diff (1.93 KB, patch)
2007-10-15 12:33 UTC, Joerg Pulz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description regisr 2007-10-12 22:20:02 UTC
Since last upgrade to version 2.2.0 the ACL with IPv6 address is rejected.
All nut* ports was deleted before installaling the new version.

Network UPS Tools - UPS driver controller 2.2.0
Network UPS Tools - MGE UPS SYSTEMS/SHUT driver 0.66 (2.2.0)
Detected ellipse premium 800 [unknown] on /dev/cuad0
Starting nut.
Network UPS Tools upsd 2.2.0
/usr/local/etc/nut/upsd.conf is world readable
Can't parse ACL localhost6 ::1
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-10-12 22:44:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->infofarmer

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 sat freebsd_committer freebsd_triage 2007-10-12 23:03:12 UTC
Responsible Changed
From-To: infofarmer->freebsd-ports-bugs

This PR is for sysutils/nut, not misc/nut
Comment 3 Joerg Pulz 2007-10-15 12:33:50 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

i seems, that nut was compiled without IPv6 support.
After digging a little deeper, it turns out, that the configure check for 
IPv6 support always fails.
Please try the attached patch and report back if it solves your problem.
Note that there is a new OPTIONS knob to enable/disable IPv6 support 
(defaults to enable).
Please run 'make config' in the ${PORTSDIR}/sysutils/nut directory and 
make sure, that the IPv6 option is enabled before you build and reinstall 
nut.

Kind regards
Joerg

p.s. As i'm still not sure the best way to submit patches to GNATS is (as 
attachment or inline), i attached the patch and inlined it too.



Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/nut/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
- --- Makefile	7 Oct 2007 09:13:49 -0000	1.39
+++ Makefile	15 Oct 2007 10:26:14 -0000
@@ -7,6 +7,7 @@

  PORTNAME=	nut
  PORTVERSION=	2.2.0
+PORTREVISION=	1
  CATEGORIES=	sysutils
  MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
  DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.sig
@@ -15,6 +16,7 @@
  MAINTAINER=	Joerg.Pulz@frm2.tum.de
  COMMENT=	Network UPS Tools

+USE_AUTOTOOLS=	autoconf:261
  GNU_CONFIGURE=	yes
  USE_GMAKE=	yes

@@ -24,6 +26,7 @@

  OPTIONS=	USB		"USB support"	on \
  		SNMP		"SNMP support"	on \
+		IPV6		"IPV6 support"	on \
  		LIBUPSCLIENT	"Include the libupsclient library"	off \
  		CGI		"Web CGI interface"	off \

@@ -102,6 +105,12 @@
  PLIST_SUB+=	NUT_SNMP="@comment "
  .endif

+.if !defined(WITHOUT_IPV6)
+CONFIGURE_ARGS+=	--with-ipv6
+.else
+CONFIGURE_ARGS+=	--without-ipv6
+.endif
+
  .if defined(WITH_LIBUPSCLIENT)
  CONFIGURE_ARGS+=	--with-lib --enable-pkg-config \
  			--with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig
Index: files/patch-m4-nut_check_ipv6.m4
===================================================================
RCS file: files/patch-m4-nut_check_ipv6.m4
diff -N files/patch-m4-nut_check_ipv6.m4
- --- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-m4-nut_check_ipv6.m4	15 Oct 2007 10:26:14 -0000
@@ -0,0 +1,13 @@
+--- m4/nut_check_ipv6.m4.orig	2007-03-15 21:19:05.000000000 +0100
++++ m4/nut_check_ipv6.m4	2007-10-15 11:42:02.000000000 +0200
+@@ -22,7 +22,9 @@
+ 		   struct in6_addr],
+                   [:],
+                   [nut_have_ipv6=no],
+-		  [#include <netdb.h>])
++		  [#include <netdb.h>
++		   #include <sys/socket.h>
++		   #include <netinet/in.h>])
+ 
+ dnl AC_CHECK_MEMBERS([struct in6_addr.s6_addr32],
+ dnl               [:],

- -- 
The beginning is the most important part of the work.
 				-Plato
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHE1AhSPOsGF+KA+MRAr1LAJ0byStPwQyi+aqkC00q/+MMattIlwCfU1Fg
8wwsaxAyvWSrd1ZKZ/MBpkQ=
=tpIK
-----END PGP SIGNATURE-----
Comment 4 regisr 2007-10-15 19:39:22 UTC
Hi,

On Mon, 15 Oct 2007 13:33:50 +0200 (CEST)
Joerg Pulz <Joerg.Pulz@frm2.tum.de> a =E9crit:

> i seems, that nut was compiled without IPv6 support.
> After digging a little deeper, it turns out, that the configure check for=
=20
> IPv6 support always fails.
> Please try the attached patch and report back if it solves your problem.

Not yet solved. I checked if the patches are applied and the IPV6 option
selected: the files are updated (including the  nut_check_ipv6.m4 file
in my object
directory /usr/obj/home/ports/sysutils/nut/work/nut-2.2.0/m4)

Sincerely,
--=20
regis
Comment 5 Joerg Pulz 2007-10-16 07:17:15 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Mon, 15 Oct 2007, regisr wrote:

> Hi,
>
> On Mon, 15 Oct 2007 13:33:50 +0200 (CEST)
> Joerg Pulz <Joerg.Pulz@frm2.tum.de> a écrit:
>
>> i seems, that nut was compiled without IPv6 support.
>> After digging a little deeper, it turns out, that the configure check for
>> IPv6 support always fails.
>> Please try the attached patch and report back if it solves your problem.
>
> Not yet solved. I checked if the patches are applied and the IPV6 option
> selected: the files are updated (including the  nut_check_ipv6.m4 file
> in my object
> directory /usr/obj/home/ports/sysutils/nut/work/nut-2.2.0/m4)

Hi regisr,

i think i found a solution and it is so simple.
Try to add the prefixlen to your IPv6 address e.g.

ACL localhost6 ::1/128

Now it should no longer complain.
Please test this and tell me if this solves your problem.

In any case, the patch i submitted should hit the treee soon to make nut 
really IPv6 aware.

Kind regards
Joerg

- -- 
The beginning is the most important part of the work.
 				-Plato
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHFFduSPOsGF+KA+MRAocyAKDMxzDQjqgIC4VUhm0/BoeZJg6DhgCfQ3W2
99n1FkbOVly3z/e7K1Gx0NI=
=p6ff
-----END PGP SIGNATURE-----
Comment 6 regisr 2007-10-16 21:54:49 UTC
Hi,

On Tue, 16 Oct 2007 08:17:15 +0200 (CEST)
Joerg Pulz <Joerg.Pulz@frm2.tum.de> a =E9crit:

> i think i found a solution and it is so simple.
> Try to add the prefixlen to your IPv6 address e.g.
>=20
> ACL localhost6 ::1/128
>
> Now it should no longer complain.
> Please test this and tell me if this solves your problem.

Now it is running fine. The previous version accepted the address
without the network part length.=20

Thanks
Sincerely,
--=20
regis
Comment 7 dfilter service freebsd_committer freebsd_triage 2008-01-02 13:55:42 UTC
arved       2008-01-02 13:55:34 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/nut         Makefile 
  Added files:
    sysutils/nut/files   patch-m4-nut_check_ipv6.m4 
  Log:
  Fix configure check for IPv6 detection, and add an IPV6 OPTION
  
  PR:             117144
  Submitted by:   Joerg Pulz <Joerg.Pulz@frm2.tum.de>
  
  Revision  Changes    Path
  1.40      +9 -0      ports/sysutils/nut/Makefile
  1.1       +13 -0     ports/sysutils/nut/files/patch-m4-nut_check_ipv6.m4 (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 8 Tilman Keskinoz freebsd_committer freebsd_triage 2008-01-02 13:55:43 UTC
State Changed
From-To: open->closed

I have committed the patch from Joerg.