diff options
author | jlemon <jlemon@FreeBSD.org> | 2000-09-28 04:41:22 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2000-09-28 04:41:22 +0000 |
commit | 295f1fc1dc896873286d6a38a5612712befd4b02 (patch) | |
tree | 48289ad7afed634809880040a321e6efed8a7fce | |
parent | af5f84470891b036bc81d844cd55d6f5801fc00b (diff) | |
download | FreeBSD-src-295f1fc1dc896873286d6a38a5612712befd4b02.zip FreeBSD-src-295f1fc1dc896873286d6a38a5612712befd4b02.tar.gz |
Check so_error in filt_so{read|write} in order to detect UDP errors.
PR: 21601
-rw-r--r-- | sys/kern/uipc_socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 5d84d7e..210dce4 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1563,6 +1563,8 @@ filt_soread(struct knote *kn, long hint) kn->kn_flags |= EV_EOF; return (1); } + if (so->so_error) /* temporary udp error */ + return (1); return (kn->kn_data >= so->so_rcv.sb_lowat); } @@ -1601,6 +1603,8 @@ filt_sowrite(struct knote *kn, long hint) kn->kn_flags |= EV_EOF; return (1); } + if (so->so_error) /* temporary udp error */ + return (1); if (((so->so_state & SS_ISCONNECTED) == 0) && (so->so_proto->pr_flags & PR_CONNREQUIRED)) return (0); |