Open Bug 910773 Opened 12 years ago Updated 3 years ago

IPv6 retry socket connection on protocol error

Categories

(Core :: Networking, defect, P3)

22 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jiri, Unassigned)

Details

(Whiteboard: [necko-backlog])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release) Build ID: 2013062200 Steps to reproduce: On Linux, when an IPv6 connection attempt results in an ICMPv6 destination unreachable packet with an unknown code, connect() returns -EPROTO. If this happens a blank page is displayed, instead of trying other addresses (and e.g. falling back to IPv4). Unfortunately, Linux does not recognize error codes 5 and 6 defined in RFC4443: 5 - Source address failed ingress/egress policy 6 - Reject route to destination So -EPROTO is returned even for those. nss_MD_unix_map_default_error() maps -EPROTO to PR_IO_ERROR; ErrorAccordingToNSPR() then maps PR_IO_ERROR to NS_ERROR_FAILURE. I think it should be mapped to NS_ERROR_CONNECTION_REFUSED(); Try this by connecting to http://[2620:113:80c0:8000:10:121:0:100]/ Actual results: Blank page is displayed. Expected results: Fall back to other addresses.
I have proposed a patch to fix the linux kernel to recognize codes 5 and 6: http://thread.gmane.org/gmane.linux.network/281863 I still think Firefox should treat most errors returned from connect() in a way that causes fallback to other addresses. Other programs do (e.g. ssh) and do not have problems with the host above, despite the confusing -EPROTO returned by the kernel. If for no other reason, Firefox users of all past and current linux kernels will suffer from this bug, until their kernel is updated.
Component: Untriaged → Networking
Product: Firefox → Core
Whiteboard: [necko-backlog]
Priority: -- → P1
Priority: P1 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.