Univention Bugzilla – Bug 29571
Traceback: Vergleich IPv4Address und IPv6Address im Network-Objekt
Last modified: 2022-03-10 14:08:08 CET
Versuch automatisch IPv6-Adressen zu vergeben: "Network"-Objekt "default" geöffnet und beim zu vergebenden IP-Adress-Bereich zusätzlich zu den bestehenden IPv4-Einstellungen zwei IPv6-Adressen eingetragen. Speichern: Internal module error: An error occurred during command processing ... File "/usr/lib/pymodules/python2.6/univention/admon/handlers/network/network.py", line 261 self.sort_ipranges() File "/usr/lib/pymodules/python2.6/univention/admon/handlers/network/network.py", line 304 if ipaddr.IPAddress(self['ipRange'][i][0]) < ipaddr.IPAddress(self['ipRange'][i-1][0]): File "/usr/lib/python2.6/dist-packages/ipaddr.py", line 441, in __lt__ str(self), str(other))) TypeError: 2001:4dd0:ff00:8c42:ff17::2 and 192.168.123.10 are not of the same version
# udm networks/network create --set name=network1 --set network=10.200.27.0 --set netmask=24 --append ipRange="10.200.27.2 10.200.27.200" --append ipRange="::1 ::2" Traceback (most recent call last): File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 218, in doit output = univention.admincli.admin.doit(arglist) File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 398, in doit out = _doit(arglist) File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 744, in _doit dn = object.create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 381, in create dn = self._create(response=response, serverctrls=serverctrls) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 996, in _create al.extend(self._ldap_modlist()) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/networks/network.py", line 265, in _ldap_modlist self.sort_ipranges() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/networks/network.py", line 305, in sort_ipranges if ipaddr.IPAddress(self['ipRange'][i][0]) < ipaddr.IPAddress(self['ipRange'][i - 1][0]): File "/usr/lib/python2.7/dist-packages/ipaddr.py", line 478, in __lt__ str(self), str(other))) TypeError: ::1 and 10.200.27.2 are not of the same version
Patch: fbest/29571-network-with-mixed-ipv4-and-ipv6
UCS 5.0: # udm networks/network create --set name=network1 --set network=10.200.27.0 --set netmask=24 --append ipRange="10.200.27.2 10.200.27.200" --append ipRange="::1 ::2" Traceback (most recent call last): File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 223, in doit output = univention.admincli.admin.doit(arglist) File "/usr/lib/python3/dist-packages/univention/admincli/admin.py", line 396, in doit out = _doit(arglist) File "/usr/lib/python3/dist-packages/univention/admincli/admin.py", line 664, in _doit out.extend(cli.create(input, append, ignore_exists, parsed_options, parsed_append_options, parsed_remove_options, policy_reference)) File "/usr/lib/python3/dist-packages/univention/admincli/admin.py", line 692, in create return self._create(self.module_name, self.module, self.dn, self.lo, self.position, self.superordinate, *args, **kwargs) File "/usr/lib/python3/dist-packages/univention/admincli/admin.py", line 745, in _create dn = object.create() File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 570, in create dn = self._create(response=response, serverctrls=serverctrls) File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 1250, in _create al.extend(self._ldap_modlist()) File "/usr/lib/python3/dist-packages/univention/admin/handlers/networks/network.py", line 246, in _ldap_modlist self.sort_ipranges() File "/usr/lib/python3/dist-packages/univention/admin/handlers/networks/network.py", line 287, in sort_ipranges if ipaddress.ip_address(u'%s' % self['ipRange'][i][0]) < ipaddress.ip_address(u'%s' % self['ipRange'][i - 1][0]): File "/usr/lib/python3.7/ipaddress.py", line 565, in __lt__ self, other)) TypeError: ::1 and 10.200.27.2 are not of the same version
Already part of UCS 5.0 via git:5434e7344ddde945b8ba7df140575a4e362dae8d.