Description of problem: When I tried to add a IPv6 IP as host for a JetDirect printer, system-config-printer did not accept the colons. Version-Release number of selected component (if applicable): system-config-printer-1.4.3-2.fc19 How reproducible: always Steps to Reproduce: 1. Add a printer 2. Select network printer/JetDirect 3. Enter fe80::1 Actual results: The colons cannot be entered Expected results: Should accept IPv6 address. Additional info:
(In reply to Till Maas from comment #0) > 3. Enter fe80::1 Actually a percent sign might be needed for IPv6 addresses as well, e.g. fe80::1%eth0
That's because there are limited allowed characters, only aplhanumeric, '_', '-' and '.' can be entered. However you can change this by editing /usr/share/system-config-printer/newprinter.py file. Find the function "on_entNPTJetDirectHostname_changed" (it should be approx. line 2600) and add ':', '[' and ']' into allowed characters, like: allowed_chars = string.ascii_letters+string.digits+'_-.:[]' Then save, run system-config-printer again and enter IPv6 address inside [ and ] like "[fe80::1]" and it should accept it. I do not have IPv6 printer here right now so I cannot test it, so I'd like you to report if the IPv6 printer works for you. If yes then s-c-p will be fixed this way.
(In reply to Jaromír Končický from comment #2) > That's because there are limited allowed characters, only aplhanumeric, '_', > '-' and '.' can be entered. > However you can change this by editing > /usr/share/system-config-printer/newprinter.py file. Find the function > "on_entNPTJetDirectHostname_changed" (it should be approx. line 2600) and > add ':', '[' and ']' into allowed characters, like: > > allowed_chars = string.ascii_letters+string.digits+'_-.:[]' > > Then save, run system-config-printer again and enter IPv6 address inside [ > and ] like "[fe80::1]" and it should accept it. > I do not have IPv6 printer here right now so I cannot test it, so I'd like > you to report if the IPv6 printer works for you. If yes then s-c-p will be > fixed this way. It also needs a percent sign. There are also other network protocols that seem to restrict the allowed characters, e.g. samba or ipp. However after adding missing characters to several allowed_chars lists it works. Note to self: it is possible to set the IPv6 address as follows: /usr/sbin/lpadmin -p example -v 'socket://[fe80::1%25eth0]:9100'
(In reply to Till Maas from comment #3) > > It also needs a percent sign. Yes, % will be added into allowed characters too. > There are also other network protocols that > seem to restrict the allowed characters, e.g. samba or ipp. Yes. As I can see, only [ and ] need to be added because : and % are already allowed. > However after > adding missing characters to several allowed_chars lists it works. It works - you mean that just entering the IPv6 address works or you tested printing with an IPv6-address printer and it worked?
(In reply to Jaromír Končický from comment #4) > (In reply to Till Maas from comment #3) > > However after > > adding missing characters to several allowed_chars lists it works. > It works - you mean that just entering the IPv6 address works or you tested > printing with an IPv6-address printer and it worked? I did not yet print but getting cartridge information worked, so it seems to work in general.
Created attachment 875497 [details] allow characters needed by IPv6 address in URI fields Here is the patch. Assuming that printing on IPv6 printers is working, this should fix the issue. It's upstream-based so I suggest commiting it into upstream.
Thanks. Applied upstream: https://git.fedorahosted.org/cgit/system-config-printer.git/commit/?id=11da7f647ec713d3f38929946a6285e64d635d23
system-config-printer-1.4.5-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/system-config-printer-1.4.5-1.fc20
Package system-config-printer-1.4.5-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing system-config-printer-1.4.5-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-8100/system-config-printer-1.4.5-1.fc20 then log in and leave karma (feedback).
system-config-printer-1.4.5-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.