Bug 24674 - [UDM] Traceback: Rechner in IPv4 Netzwerk mit IPv6 Adresse anlegen
[UDM] Traceback: Rechner in IPv4 Netzwerk mit IPv6 Adresse anlegen
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-16 16:03 CET by Florian Best
Modified: 2019-01-03 07:17 CET (History)
1 user (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): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2011-11-16 16:03:35 CET
Beim Rechner (Managed Client) anlegen in UMC/UDM kommt bei einer ungültigen IPv4 IPv6 konstelation folgender Traceback.
Zum Reproduzieren im Bereich Networksettings bei Network ein IPv4 Netzwerk auswählen und eine IPv6 Adresse im Adressfeld eingeben.

File '/usr/lib/pymodules/python2.6/notifier/threads.py', line 81, in _run
tmp = self._function()
File '/usr/lib/pymodules/python2.6/notifier/__init__.py', line 104, in __call__
return self._function( *tmp, **self._kwargs )
File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py', line 300, in _thread
module.modify( properties )
File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 130, in wrapper_func
ret = func( *args, **kwargs )
File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 348, in modify
self._map_properties( obj, ldap_object )
File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 238, in _map_properties
obj[ property_name ] = property_obj.syntax.parse( value )
File '/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py', line 2367, in __setitem__
network_object['netmask'], self['ip'][ 0 ]): 
File '/usr/lib/pymodules/python2.6/univention/admin/ipaddress.py', line 51, in ip_is_in_network
lip=struct.unpack('!I', socket.inet_aton(ip))[0] >> 32-int(subnetmask)

error: illegal IP address string passed to inet_aton
Comment 1 Alexander Kläser univentionstaff 2011-11-16 16:05:49 CET
Dies sollte eigentlich bei der Validierung abgefangen werden, so dass eine benutzerfreundliche Fehlermeldung mit Verweis auf das entsprechende Feld angezeigt werden kann.
Comment 2 Florian Best univentionstaff 2015-04-09 10:19:35 CEST
4.0-1 errata142 (Walle)
We received also a very similar traceback which happens adding a invalid IP address like 255.255.255.256 into the range when modifying a DHCP subnet via UMC.

Die Ausführung des Kommandos udm/put dhcp/dhcp ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/modules/__init__.py", line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 408, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 163, in _decorated
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 146, in wrapper_func
    return _func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in _func
    ret = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 551, in modify
    obj.modify()
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 364, in modify
    return self._modify(modify_childs,ignore_license=ignore_license)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 839, in _modify
    ml=self._ldap_modlist()
  File "%PY2.7%/univention/admin/handlers/dhcp/subnet.py", line 171, in _ldap_modlist
    if not univention.admin.ipaddress.ip_is_in_network(self['subnet'], self['subnetmask'], j):
  File "%PY2.7%/univention/admin/ipaddress.py", line 51, in ip_is_in_network
    lip=struct.unpack('!I', socket.inet_aton(ip))[0] >> 32-int(subnetmask)
error: illegal IP address string passed to inet_aton
Comment 3 Florian Best univentionstaff 2015-04-09 10:20:52 CEST
Another one I found is this: entering a IPv6 address into the DHCP range:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/modules/__init__.py", line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 409, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 163, in _decorated
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 146, in wrapper_func
    return _func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in _func
    ret = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 551, in modify
    obj.modify()
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 364, in modify
    return self._modify(modify_childs,ignore_license=ignore_license)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 839, in _modify
    ml=self._ldap_modlist()
  File "%PY2.7%/univention/admin/handlers/dhcp/subnet.py", line 166, in _ldap_modlist
    if i != j and univention.admin.ipaddress.is_range_overlapping(i, j):
  File "%PY2.7%/univention/admin/ipaddress.py", line 102, in is_range_overlapping
    if is_ip_in_range(range2[0], range1) or is_ip_in_range(range2[1], range1):
  File "%PY2.7%/univention/admin/ipaddress.py", line 94, in is_ip_in_range
    if int(ip_compare(ip, range[0])) < 1 and int(ip_compare(ip,range[1])) > -1:
  File "%PY2.7%/univention/admin/ipaddress.py", line 86, in ip_compare
    if int(sip1[i]) > int(sip2[i]):
ValueError: invalid literal for int() with base 10: '::3'
Comment 4 Stefan Gohmann univentionstaff 2019-01-03 07:17:03 CET
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016.

Customers still on UCS 4.0 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.