Bug 198467
| Summary: | Package timidity++ lacks IPv6 support | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Peter Vrabec <pvrabec> | ||||
| Component: | timidity++ | Assignee: | Hans de Goede <hdegoede> | ||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | rawhide | CC: | mbacovsk, mzazrivec | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2008-02-20 21:46:44 UTC | Type: | --- | ||||
| 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
Peter Vrabec
2006-07-11 12:41:23 UTC
Hi all, Nigel is no longer the timidity maintainer, Jindrich Novy and I are now maintaing timidity, reassigning this to me. Are there any docs anywhere on how to fix this in general? Created attachment 293992 [details]
TiMidity++ IPv6 Patch (ver. 2.13.2)
Attached patch might help with the problem.
(In reply to comment #2) > Created an attachment (id=293992) [edit] > TiMidity++ IPv6 Patch (ver. 2.13.2) > > Attached patch might help with the problem. Thanks! Has anyone actually tested this patch? The patch was reviewed internally in Red Hat, I also made some local testing with couple of IPv6 http and ftp URIs. You may wanna try something like: timidity http://[your:ipv6:site:local:address]:port/midifile.mid or timidity ftp://[your:ipv6:site:local:address]:port/midifile.mid or you may want to put some HTTP / FTP IPv6 proxy into timidity config file to see if it works. (In reply to comment #4) > The patch was reviewed internally in Red Hat, I also made some > local testing with couple of IPv6 http and ftp URIs. > Ok, thats good enough for me applied and build in rawhide, thanks! Milan,
I've found (and just fixed) a bug in your ipv6 patch. This comment is not meant
to be complaining I'm very grateful for the patch. But I think / guess you've
written more ipv6 patches, and chances are you've made the same mistake elsewhere.
The timidity++ server code has a piece of code where it compares 2 addresses
(for security validation).
You replaced the ipv4 only code like this:
- if(control_client.sin_addr.s_addr != in.sin_addr.s_addr)
- return send_status(513, "Security violation: Address mismatch");
+ /* Not quite protocol independent */
+ switch (((struct sockaddr *) &control_client)->sa_family)
+ {
+ case AF_INET:
+ if (((struct sockaddr_in *) &control_client)->sin_addr.s_addr !=
+ ((struct sockaddr_in *) &in)->sin_addr.s_addr)
+ return send_status(513, "Security violation: Address mismatch"
+ break;
+ case AF_INET6:
+ if (((struct sockaddr_in6 *) &control_client)->sin6_addr.s6_addr !
+ ((struct sockaddr_in6 *) &in)->sin6_addr.s6_addr)
+ return send_status(513, "Security violation: Address mismatch"
+ break;
+ }
Notice how in the ipv6 case you compare (using != ) the 2 .s6_addr members of
the sin6_addr struct. However .s6_addr is an array so you are comparing
addresses making the comparison always say they are not equal.
I've replaced this with:
case AF_INET6:
if (memcmp(
((struct sockaddr_in6 *) &control_client)->sin6_addr.s6_addr,
((struct sockaddr_in6 *) &in)->sin6_addr.s6_addr, 16))
return send_status(513, "Security violation: Address mismatch"
break;
Which seems to work for me (now ipv6 clients can connect) Cheers!
I agree -- memcmp does the trick, my bad, thanks for letting me know :-) |