Bug 54848 - Client field too short for IPv6 addresses
Summary: Client field too short for IPv6 addresses
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_status (show other bugs)
Version: 2.4.4
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: FixedInTrunk
Depends on:
Reported: 2013-04-15 20:57 UTC by Bernhard Schmidt
Modified: 2018-10-30 18:57 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Schmidt 2013-04-15 20:57:59 UTC
mod_status only displays the first 31 characters of a client address, which is too short for IPv6. IPv6 addresses can be at max 39 characters long (32 hex digits plus 7 colons), or even longer if you need to display the scope for link-local addresses.

I'm personally only running 2.2.16, but I can verify it on http://www.apache.org/server-status which is a 2.4.4.

berni@pest:~$ ip -6 addr show dev br0 scope global
    inet6 2001:a60:a000:1:219:66ff:fe8b:a6e/64 scope global dynamic 
       valid_lft 86326sec preferred_lft 14326sec
berni@pest:~$ curl -s http://www.apache.org/server-status | grep 2001:a60
</td><td>2001:a60:a000:1:219:66ff:fe8b:a</td><td nowrap>www.apache.org:80</td><td nowrap>GET /server-status HTTP/1.1</td></tr>

It is already missing two bytes of the address, and that's not even the maximum size.
Comment 1 Christophe JAILLET 2013-09-03 05:06:11 UTC
Thanks for the report.

I've fixed it on trunk (see r1519556)
I don't think it will be backported to 2.4 because it modifies the size of a  structure (worker_score) which can be used by modules.
So backward compatibility is broken.
Comment 2 Christophe JAILLET 2018-08-02 05:16:54 UTC
Follow-up in r1837225.
This one is 2.4 compliant and proposed for backport.
Comment 3 Christophe JAILLET 2018-10-30 18:57:23 UTC
Backported in 2.4.x in r1841259

This is part of 2.4.36