diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-09-06 15:17:08 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-09-06 12:53:33 +0200 |
commit | bd092ca421be8908aadbeb2ecdfb9fede0f67c07 (patch) | |
tree | 3824e5297f3463e192148afd12da96d6c31e8d66 /tcp.c | |
parent | 88bfa3801e187ac33ca9de552612bc30a1708c72 (diff) | |
download | passt-bd092ca421be8908aadbeb2ecdfb9fede0f67c07.tar passt-bd092ca421be8908aadbeb2ecdfb9fede0f67c07.tar.gz passt-bd092ca421be8908aadbeb2ecdfb9fede0f67c07.tar.bz2 passt-bd092ca421be8908aadbeb2ecdfb9fede0f67c07.tar.lz passt-bd092ca421be8908aadbeb2ecdfb9fede0f67c07.tar.xz passt-bd092ca421be8908aadbeb2ecdfb9fede0f67c07.tar.zst passt-bd092ca421be8908aadbeb2ecdfb9fede0f67c07.zip |
udp: Split socket error handling out from udp_sock_recv()
Currently udp_sock_recv() both attempts to clear socket errors and read
a batch of datagrams for forwarding. That made sense initially, since
both listening and reply sockets need to do this. However, we have certain
error cases which will add additional complexity to the error processing.
Furthermore, if we ever wanted to more thoroughly handle errors received
here - e.g. by synthesising ICMP messages on the tap device - it will
likely require different handling for the listening and reply socket cases.
So, split handling of error events into its own udp_sock_errs() function.
While we're there, allow it to report "unrecoverable errors". We don't
have any of these so far, but some cases we're working on might require it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.c')
0 files changed, 0 insertions, 0 deletions