Description of problem: Trying to list an IPv6 network in the Allow From causes a 'Bad netmask value' error message, and CUPS refuses to start up. Version-Release number of selected component (if applicable): cups-1.2.4-11.5.1.el5 How reproducible: From my cupds.conf: <Location /> Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 198.82.* Allow From 128.173.* Allow From [2001:468:c80::]/48 Encryption Required AuthClass Anonymous </Location> Steps to Reproduce: 1. 2. 3. Actual results: Seen in error_log: d [25/May/2007:14:12:56 -0400] get_addr_and_mask(value="127.0.0.1", ip=[00000000:00000000:00000000:7f000001], mask=[ffffffff:ffffffff:ffffffff:ffffffff] d [25/May/2007:14:12:56 -0400] cupsdAllowIP(loc=0x8fa5130(/), address=0:0:0:7f000001, netmask=ffffffff:ffffffff:ffffffff:ffffffff) d [25/May/2007:14:12:56 -0400] get_addr_and_mask(value="198.82.*", ip=[00000000:00000000:00000000:c6520000], mask=[ffffffff:ffffffff:ffffffff:ffff0000] d [25/May/2007:14:12:56 -0400] cupsdAllowIP(loc=0x8fa5130(/), address=0:0:0:c6520000, netmask=ffffffff:ffffffff:ffffffff:ffff0000) d [25/May/2007:14:12:56 -0400] get_addr_and_mask(value="128.173.*", ip=[00000000:00000000:00000000:80ad0000], mask=[ffffffff:ffffffff:ffffffff:ffff0000] d [25/May/2007:14:12:56 -0400] cupsdAllowIP(loc=0x8fa5130(/), address=0:0:0:80ad0000, netmask=ffffffff:ffffffff:ffffffff:ffff0000) d [25/May/2007:14:12:56 -0400] get_addr_and_mask(value="[2001:468:c80::]/48", ip=[20010468:0c800000:00000000:00000041], mask=[ffffffff:ffff0000:00000000:00000000] E [25/May/2007:14:12:56 -0400] Bad netmask value [2001:468:c80::]/48 on line 778. Note that get_addr_and_mask actually *did* parse out the correct bits, but the next line indicates a failure. Expected results: The exact same 'Allow From [2001:468:c80::]/48' is accepted without complaint by a Fedora Core 7/Rawhide box running cups-1.2.10-6.fc7 Additional info:
Created attachment 155590 [details] cups-ipv6-parse.patch get_addr_and_mask has '41' at the end of the IP address, which isn't right. I think this is the fix.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2007-1020.html