Bug 16041 - Klasse netmask in syntax.py nicht IPv6-fähig
Klasse netmask in syntax.py nicht IPv6-fähig
Status: CLOSED DUPLICATE of bug 16577
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 2.3
All Linux
: P5 normal (vote)
: UCS 3.0 - RC
Assigned To: Janek Walkenhorst
Sönke Schwardt-Krummrich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-21 09:46 CEST by Kai Bolte
Modified: 2011-12-13 15:51 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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Bolte 2009-10-21 09:46:10 CEST
In der Klasse netmask in /usr/share/pyshared/univention/admin/syntax.py werden einige Operationen mit Netzmasken erledigt, die offensichtlich nicht IPv6-fähig sind.
Genutzt wird die Klasse auf jeden Fall hier:
>:/usr/share/pyshared/univention# grep -r "syntax.netmask" admin/
admin/handlers/dhcp/sharedsubnet.py:  syntax=univention.admin.syntax.netmask,
admin/handlers/dhcp/subnet.py:        syntax=univention.admin.syntax.netmask,
admin/handlers/networks/network.py:   syntax=univention.admin.syntax.netmask,

Dabei ist DHCP und IPv6 zur Zeit noch kein Thema (siehe Bug #15303).
Comment 1 Kai Bolte 2009-11-25 17:05:48 CET
Dafür kann sicher auch das ipaddr-Modul genutzt werden, siehe Bug #15907
Comment 2 Janek Walkenhorst univentionstaff 2011-10-28 13:53:16 CEST
Das wurde bereits mit Bug #16577 getan.

*** This bug has been marked as a duplicate of bug 16577 ***
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2011-11-30 16:15:20 CET
Die Klasse netmask wurde angepasst.

>>> import univention.admin
>>> import univention.admin.modules
>>> import univention.admin.syntax
>>> x = univention.admin.syntax.netmask()
>>> x.parse('255.255.0.0')
'16'
>>> x.parse('24')
'24'
>>> x.parse('255.255.255.0')
'24'
>>> x.parse('255.255.240.0')
'20'
>>> x.parse('80')
'80'
>>> x.parse('127')
'127'
>>> x.parse('128')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/univention/admin/syntax.py", line 889, in parse
    raise univention.admin.uexceptions.valueError, _("Not a valid netmask!")
univention.admin.uexceptions.valueError: Not a valid netmask!
>>> x.parse('deadbeef')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/univention/admin/syntax.py", line 889, in parse
    raise univention.admin.uexceptions.valueError, _("Not a valid netmask!")
univention.admin.uexceptions.valueError: Not a valid netmask!
>>>
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2011-12-13 15:51:00 CET
UCS 3.0-0 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer
neueren Version von UCS erneut auftreten, so sollte dieser Bug dupliziert
werden: "Clone This Bug"