2018-01-17 19:06 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001877openmediavaultBugpublic2018-01-05 17:32
Reporterabiessmann 
Assigned Tovotdev 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product Version 
Target VersionFixed in VersionErasmus (3.x) 
Summary0001877: omv_is_ipv6_enabled is broken by design
DescriptionWhile learning my first OMV installation I wondered why nginx is configured for ipv4 only. Digging into it showed that omv_is_ipv6_is_enabled is broken by design.

omv_is_ipv6_is_enabled tests for existence and size greater than zero of /proc/net/if_inet6. Unfortunately all files in /proc (except of some special ones) will report as size of zero, so this function will always return as 'no ipv6 enabled'.
Steps To Reproduce1) Ensure OMV instance has ipv6 configured
2) $ . /usr/share/openmediavault/scripts/helper-functions
3) $ omv_is_ipv6_enabled
4) $ echo $?
     should return '0'
     but currently returns '1'
Additional InformationAttached patch fixed it for me.

To fix my problem with nginx it may be sufficient to check only for existence of /proc/net/if_inet6. As long as the kernel support ipv6 we could configure nginx to work with ipv6 but the 'ipv6only=off' switch allows ipv4 anyway.
TagsNo tags attached.
Product build
Attached Files
  • patch file icon fix-omv_is_ipv6_enabled.patch (433 bytes) 2018-01-05 15:42 -
    --- /usr/share/openmediavault/scripts/helper-functions.orig	2018-01-05 15:28:07.446695615 +0100
    +++ /usr/share/openmediavault/scripts/helper-functions	2018-01-05 15:33:25.831905701 +0100
    @@ -822,7 +822,7 @@ omv_is_gateway6() {
     # Check if IPv6 is enabled.
     # @return 0 if enabled, otherwise 1.
     omv_is_ipv6_enabled() {
    -	[ -s /proc/net/if_inet6 ] && return 0
    +	[ $(cat /proc/net/if_inet6 | wc -l) -gt 0 ] && return 0
     	return 1
     }
     
    
    patch file icon fix-omv_is_ipv6_enabled.patch (433 bytes) 2018-01-05 15:42 +

-Relationships
+Relationships

+Notes

-Issue History
Date Modified Username Field Change
2018-01-05 15:42 abiessmann New Issue
2018-01-05 15:42 abiessmann Status new => assigned
2018-01-05 15:42 abiessmann Assigned To => votdev
2018-01-05 15:42 abiessmann File Added: fix-omv_is_ipv6_enabled.patch
2018-01-05 17:15 votdev Note Added: 0005098
2018-01-05 17:15 votdev Product Version => Arrakis (4.x)
2018-01-05 17:15 votdev Target Version => Arrakis (4.x)
2018-01-05 17:15 votdev Product build 4.0.15-1 =>
2018-01-05 17:31 votdev Status assigned => closed
2018-01-05 17:31 votdev Resolution open => fixed
2018-01-05 17:31 votdev Fixed in Version => Erasmus (3.x)
2018-01-05 17:31 votdev Note Added: 0005099
2018-01-05 17:32 votdev Product Version Arrakis (4.x) =>
2018-01-05 17:32 votdev Target Version Arrakis (4.x) =>
+Issue History