Bug 35694 - IPv6 gateway "fe80::1" is not supported
IPv6 gateway "fe80::1" is not supported
Product: UCS
Classification: Unclassified
Component: Network
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Janek Walkenhorst
Philipp Hahn
Depends on:
Blocks: 44026
  Show dependency treegraph
Reported: 2014-08-23 21:36 CEST by Sönke Schwardt-Krummrich
Modified: 2017-03-22 12:58 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): IPv6
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2014-08-23 21:36:51 CEST
A large hosting provider uses the address "fe80::1" as gateway. At least in 
UCS 3.2-3 errata3 it is not possible to set this gateway via UCR (ipv6/gateway="fe80::1"). The template for /etc/network/interfaces checks, if the address in in range of already defined/configured IPv6 subnets but the subnet fe80::/10 is not checked. Therefore the "gateway" entry is not written to the "interfaces" file.

Please note that link-local addresses from fe80::/10 are link specific and require an interface name to be unique.

It should be possible to define a gateway from fe80::/10 like this:
ucr set ipv6/gateway="fe80::/10%eth0"
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2014-09-05 12:42:17 CEST
What I really meant was
ucr set ipv6/gateway="fe80::1%eth0"
Comment 2 Janek Walkenhorst univentionstaff 2014-09-05 12:44:54 CEST
(In reply to Sönke Schwardt-Krummrich from comment #1)
> What I really meant was
> ucr set ipv6/gateway="fe80::1%eth0"

My recommendation would be to skip the automatic interface detection for the gateway, if the interface is specified ("%" in ipv6/gateway), and instead simply using the specified interface.
Comment 3 Sven Anders 2015-05-04 20:33:11 CEST
This affects also UCS 4.0 patchlevel 1 erratalevel 163
Comment 4 Janek Walkenhorst univentionstaff 2015-05-13 18:53:51 CEST
Advisories: 2015-05-13-univention-base-files.yaml, 2015-05-13-univention-config-registry.yaml
Comment 5 Philipp Hahn univentionstaff 2015-05-22 10:24:05 CEST
OK: 2015-05-13-univention-base-files.yaml
OK: 2015-05-13-univention-config-registry.yaml
OK: r60680

FAIL: inter package dependency must be updated - otherwise all IPv6 addresses are temporary lost as no IPv6 config is generated in /etc/network/interfaces:

 # dpkg-query -W univention-base-files univention-config
 univention-base-files   4.0.8-2.184.201505131755
 univention-config       10.0.1-8.480.201502261454

 # dpkg -s univention-base-files
 Depends: univention-config (>= 8.0.2-1)

 # ucr filter </etc/univention/templates/files/etc/network/interfaces.d/10-default
Traceback (most recent call last):
  File "<stdin>", line 144, in <module>
  File "<stdin>", line 142, in main
  File "<stdin>", line 75, in ipv6
AttributeError: 'Interfaces' object has no attribute 'ipv6_gateway_zone_index'

OK: ipv6/gateway='fe80::1%eth0'
OK: ipv6/gateway='2001:4dd0:ff00:8c42:ff17::1%eth0'
OK: ipv6/gateway='2001:4dd0:ff00:8c42:ff17::1%eth42'
Comment 6 Stefan Gohmann univentionstaff 2015-05-28 14:32:32 CEST
Installed version of python-univention-config-registry: 10.0.2-2.487.201505131750

root@unassigned-hostname:~# PYTHONPATH=/usr/lib/pymodules/python2.7/univention/config_registry python2.7
Python 2.7.3 (default, Jul  2 2014, 15:00:03) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from interfaces import Interfaces
>>> print Interfaces().get_default_ip_address().ip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/univention/config_registry/interfaces.py", line 223, in __init__
    gateway, zone_index = (ucr['ipv6/gateway'].rsplit('%', 1) + [None])[:2]
AttributeError: 'NoneType' object has no attribute 'rsplit'
Comment 7 Janek Walkenhorst univentionstaff 2015-06-02 15:51:42 CEST
(In reply to Philipp Hahn from comment #5)
> FAIL: inter package dependency must be updated
Dependency updated, univention-base-files 4.0.8-4

(In reply to Stefan Gohmann from comment #6)
> AttributeError: 'NoneType' object has no attribute 'rsplit'
UCR access with KeyError is now always used, univention-config-registry 10.0.2-3

Advisories updated.
Comment 8 Philipp Hahn univentionstaff 2015-06-02 17:41:07 CEST
OK: r60997 r61000
OK: aptitude install '?source-package(univention-base-files)~i'
OK: aptitude install '?source-package(univention-config)~i'
OK: ucr set ipv6/gateway=...
OK: AttributeError: 'NoneType'
ADDED: r61002 unit test
OK: 2015-05-13-univention-config-registry.yaml 2015-05-13-univention-base-files.yaml
OK: errata-announce -V 2015-05-13-univention-base-files.yaml
OK: errata-announce -V 2015-05-13-univention-config-registry.yaml
Comment 9 Janek Walkenhorst univentionstaff 2015-06-17 18:13:53 CEST
Comment 10 Janek Walkenhorst univentionstaff 2015-06-17 18:15:51 CEST