aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2021-07-28 15:46:59 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2021-07-28 16:35:09 +0000
commit7045b1603bdf054145dd958a4acc17b410fb62a0 (patch)
tree9802ca364b6612648e33425e92b0f53f40799308 /sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
parent33ff39796ffe469a764e485ac49c31700a51fd6f (diff)
socket: Implement SO_RERROR
SO_RERROR indicates that receive buffer overflows should be handled as errors. Historically receive buffer overflows have been ignored and programs could not tell if they missed messages or messages had been truncated because of overflows. Since programs historically do not expect to get receive overflow errors, this behavior is not the default. This is really really important for programs that use route(4) to keep in sync with the system. If we loose a message then we need to reload the full system state, otherwise the behaviour from that point is undefined and can lead to chasing bogus bug reports. Reviewed by: philip (network), kbowling (transport), gbe (manpages) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26652
Diffstat (limited to 'sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c')
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
index 5f6b98d03359..c82515f82631 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
@@ -539,6 +539,7 @@ ng_btsocket_hci_raw_data_input(struct mbuf *nam)
NG_FREE_M(m);
NG_FREE_M(ctl);
+ soroverflow(pcb->so);
}
}
next: