提交 a4373a48 编写于 作者: D David Howells

rxrpc: Don't try to map ICMP to error as the lower layer already did that

In the ICMP message processing code, don't try to map ICMP codes to UNIX
error codes as the caller (IPv4/IPv6) already did that for us (ee_errno).
Signed-off-by: NDavid Howells <dhowells@redhat.com>
上级 ab802ee0
...@@ -151,28 +151,18 @@ void rxrpc_UDP_error_handler(struct work_struct *work) ...@@ -151,28 +151,18 @@ void rxrpc_UDP_error_handler(struct work_struct *work)
switch (ee->ee_code) { switch (ee->ee_code) {
case ICMP_NET_UNREACH: case ICMP_NET_UNREACH:
_net("Rx Received ICMP Network Unreachable"); _net("Rx Received ICMP Network Unreachable");
err = ENETUNREACH;
break; break;
case ICMP_HOST_UNREACH: case ICMP_HOST_UNREACH:
_net("Rx Received ICMP Host Unreachable"); _net("Rx Received ICMP Host Unreachable");
err = EHOSTUNREACH;
break; break;
case ICMP_PORT_UNREACH: case ICMP_PORT_UNREACH:
_net("Rx Received ICMP Port Unreachable"); _net("Rx Received ICMP Port Unreachable");
err = ECONNREFUSED;
break;
case ICMP_FRAG_NEEDED:
_net("Rx Received ICMP Fragmentation Needed (%d)",
ee->ee_info);
err = 0; /* dealt with elsewhere */
break; break;
case ICMP_NET_UNKNOWN: case ICMP_NET_UNKNOWN:
_net("Rx Received ICMP Unknown Network"); _net("Rx Received ICMP Unknown Network");
err = ENETUNREACH;
break; break;
case ICMP_HOST_UNKNOWN: case ICMP_HOST_UNKNOWN:
_net("Rx Received ICMP Unknown Host"); _net("Rx Received ICMP Unknown Host");
err = EHOSTUNREACH;
break; break;
default: default:
_net("Rx Received ICMP DestUnreach code=%u", _net("Rx Received ICMP DestUnreach code=%u",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册