Bug 1074245
| Summary: | Cannot enter IPv6 IPs as host for JetDirect printers | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Till Maas <opensource> | ||||
| Component: | system-config-printer | Assignee: | Tim Waugh <twaugh> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 19 | CC: | collura, jpopelka, opensource, ovasik, twaugh | ||||
| Target Milestone: | --- | Keywords: | Patch | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | system-config-printer-1.4.5-1.fc20 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-07-10 00:23:59 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 195271 | ||||||
| Attachments: |
|
||||||
|
Description
Till Maas
2014-03-09 08:05:10 UTC
(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. |