Bug 24828 - Anlegen eines Networks:Network Objekts mit IPv4-Adresse und Netzmaske die größer als 32 ist erzeugt Traceback
Anlegen eines Networks:Network Objekts mit IPv4-Adresse und Netzmaske die grö...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Florian Best
Johannes Keiser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-23 11:12 CET by Lukas Walter
Modified: 2017-08-14 18:22 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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?:
Ticket number:
Bug group (optional): IPv6
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.40 KB, patch)
2016-10-31 12:19 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Walter univentionstaff 2011-11-23 11:12:54 CET
=============================================================================
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 265, in _thread
dn = module.create( properties, container = options.get( 'container' ), superordinate = options.get( 'superordinate' ) )
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 302, in create
obj.create()
File '/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py', line 332, in create
return self._create()
File '/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py', line 627, in _create
al=self._ldap_addlist()
File '/usr/lib/pymodules/python2.6/univention/admin/handlers/networks/network.py', line 232, in _ldap_addlist
self.stepIp()
File '/usr/lib/pymodules/python2.6/univention/admin/handlers/networks/network.py', line 185, in stepIp
network = ipaddr.IPNetwork(self['network'] + '/' + self['netmask'])
File '/usr/lib/python2.6/dist-packages/ipaddr.py', line 119, in IPNetwork
address)

ValueError: '10.0.0.0/64' does not appear to be an IPv4 or IPv6 network
=============================================================================
Comment 1 Florian Best univentionstaff 2016-10-31 12:19:09 CET
Still with UCS 4.1:

# udm networks/network create --set name=foo --set network=1.2.3.4 --set netmask=64
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 222, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 394, in doit
    out=_doit(arglist)
  File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 736, in _doit
    dn=object.create()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 305, in create
    return self._create()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 721, in _create
    al = self._ldap_addlist()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/networks/network.py", line 246, in _ldap_addlist
    self.stepIp()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/networks/network.py", line 183, in stepIp
    network = ipaddr.IPNetwork(self['network'] + '/' + self['netmask'])
  File "/usr/lib/python2.7/dist-packages/ipaddr.py", line 119, in IPNetwork
    address)
ValueError: '1.2.3.4/64' does not appear to be an IPv4 or IPv6 network
Comment 2 Florian Best univentionstaff 2016-10-31 12:19:19 CET
Created attachment 8172 [details]
patch
Comment 3 Florian Best univentionstaff 2017-07-28 15:51:29 CEST
Patch applied.

univention-directory-manager-modules (12.0.18-6):
r81534 | Bug #24828: fix error when invalid netmask is given in network objects

univention-directory-manager-modules.yaml:
r81534 | Bug #24828: fix error when invalid netmask is given in network objects
Comment 4 Johannes Keiser univentionstaff 2017-07-31 11:50:50 CEST
OK No more traceback. The error message is shown as popup dialog.
YAML: OK
-> verified
Comment 5 Arvid Requate univentionstaff 2017-08-02 14:34:08 CEST
<http://errata.software-univention.de/ucs/4.2/121.html>