Univention Bugzilla – Bug 45600
adding IPv6 reverse lookup zone breaks navigation tree
Last modified: 2017-11-01 13:49:28 CET
UCS 4.2-2 errata 204 If you add an IPv6 reverse lookup zone for ULAs (Unique Local Addresses), the navigational tree on the left in the UMC breaks down and doesn't load its nodes anymore. I'll attach a screenshot of what I mean. As soon as you delete said zone the navigational tree starts working again. How to reproduce: * Log in to UMC * Navigate to "Domain" → "DNS" * Add a "DNS: Reverse lookup zone" object * Use a ULA as the subnet, e.g. "fd01:1640:0141:0000", enter a server name * Save * Observe broken behavior This is also mentioned in the forum: https://help.univention.com/t/ipv6-reverse-dns/4841/6
Created attachment 9264 [details] settings for new zone
Created attachment 9265 [details] problem
The browser's JavaScript console shows the following error message: (unknown) Error: format argument 'fd01:1640:0141:0000' not an integer; parseInt returned NaN at f.sprintf.Formatter.formatInt (dojo.js.uncompressed.js:38854) at f.sprintf.Formatter.format (dojo.js.uncompressed.js:38832) at f.sprintf (dojo.js.uncompressed.js:38609) at TreeModel.js:91 at Object.map (dojo.js.uncompressed.js:4216) at Object.<anonymous> (TreeModel.js:91) at dojo.js.uncompressed.js:2903 at Object.map (dojo.js.uncompressed.js:4216) at Object.<anonymous> (TreeModel.js:88) at dojo.js.uncompressed.js:2903 "Error: format argument 'fd01:1640:0141:0000' not an integer; parseInt returned NaN at f.sprintf.Formatter.formatInt (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:683:462) at f.sprintf.Formatter.format (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:683:205) at f.sprintf (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:677:237) at https://master.mbu-test.intranet/univention/management/modules/udm/TreeModel.js:91:76 at Object.map (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:57:238) at Object.<anonymous> (https://master.mbu-test.intranet/univention/management/modules/udm/TreeModel.js:91:29) at https://master.mbu-test.intranet/univention/js/dojo/dojo.js:42:380 at Object.map (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:57:238) at Object.<anonymous> (https://master.mbu-test.intranet/univention/management/modules/udm/TreeModel.js:88:21) at https://master.mbu-test.intranet/univention/js/dojo/dojo.js:42:380 ---------------------------------------- rejected at a (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:84:505) at d (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:84:257) at k (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:84:24) at b.resolve (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:86:97) at a (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:84:479) at d (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:84:238) at k (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:84:24) at b.resolve (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:86:97) at a (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:84:479) at d (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:84:238) ---------------------------------------- Error at Object.then.c.then (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:86:415) at Object.getChildren (https://master.mbu-test.intranet/univention/management/modules/udm/TreeModel.js:85:65) at Object.<anonymous> (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:1832:80) at a.getChildren (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:42:380) at B (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:1839:178) at https://master.mbu-test.intranet/univention/js/dojo/dojo.js:1262:108 at Object._trackError (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:1280:240) at Object.renderQuery (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:1262:79) at Object.expand (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:1840:6) at Object.insertRow (https://master.mbu-test.intranet/univention/js/dojo/dojo.js:1841:490)"
Thank you for the detailed bug report!
The problem was that the IPv6 address was treated as IPv4 address. The grid sorts the entries by the numeric value of the IP address. This failed because the hexadecimal value containing "a-f" could not be parsed as number. I added sorting function for IPv6 addresses which parses the string as hex number and formats it to a decimal string with five 0-leading characters, so that IPv6 addresses are also correctly sorted. univention-management-console-module-udm.yaml 214daf63348e | Bug #45600: fix tree sorting for reverse zones with IPv6 addresses univention-management-console-module-udm (7.0.10-21) 214daf63348e | Bug #45600: fix tree sorting for reverse zones with IPv6 addresses
Thanks, I was just about to attach a patch to TreeModel.js that does something similar. But as it's already been fixed… :)
Created attachment 9266 [details] patch (In reply to Moritz Bunkus from comment #6) > Thanks, I was just about to attach a patch to TreeModel.js that does > something similar. But as it's already been fixed… :) If you need a patch for the customer system, I attached one.
The tree is now visible when there are IPv6 reverse DNS entries. -> Verified
<http://errata.software-univention.de/ucs/4.2/208.html>