-
Notifications
You must be signed in to change notification settings - Fork 221
Check handling of ICMP errors in UDP mode #405
Comments
Thanks for the detailed report! We should honour the Can you try the bugfix/udp-connect-delay branch with a |
Thank you for the quick answer, I tried something similar at first, it solved the log flooding and the excessive traffic problem, but I found I a remaining issue:
This approach should work if one of the two ends keeps the socket bound all time. |
Hi, do you have any update on this? Thanks |
We haven't had time to research it. It'll likely happen just before we need
to implement UDP support for another project.
…On Mon, Nov 23, 2020, 7:41 AM nicolatimeus ***@***.***> wrote:
Hi, do you have any update on this? Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#405 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACKVFKC5NKINBTAUBESWE3SRJ7C5ANCNFSM4S3MWIJQ>
.
|
* Honour ChannelRetry::reconnectDelay on UDP connections. * Initial UDP read errors up until a certain threshold. * Fix #405
* Honour ChannelRetry::reconnectDelay on UDP connections. * Initial UDP read errors up until a certain threshold. * Fix dnp3#405
I noticed a possible issue if the library is configured to create an UDP channel to a host/port so that the host is reachable but the port is not bound by any process.
In this case it seems that the library closes and reopens the channel continuously, without any delay between two consecutive attempts regardless of the configured
ChannelRetry
.I took a tcpdump capture on the machine running the library, the output is the following and repeats continuously:
The machine running the library is 192.168.1.4, it seems that the issue is caused by the ICMP error sent back by the peer.
This causes an error on the channel side, as can be seen in the following log generated by the application using the library:
This can cause log flooding and generates a lot of network traffic, which can be a serious issue on a metered connection.
The library is running on a Linux machine. I tried to use OSX, Linux and Windows machines as peer, the issue seems to occur in the first two cases but not in the latter.
Windows do not seem to send back ICMP errors.
I can think about the following strategies for fixing this:
I've created a commit that explores this approach at [1]. It seems to solve the issue at the cost of increased complexity and maybe worse performance.
std::error_code
is platform dependent.Do you know any other possible ways to prevent this issue?
I observed this on 3.0.4 and release branch
[1] eurotech@151a0a8
The text was updated successfully, but these errors were encountered: