mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 21:50:11 +01:00
ovsdb: limit maxiumum data size for receive buffer from ovsdb
This commit is contained in:
parent
f7d321c6d6
commit
25c97817d2
1 changed files with 6 additions and 0 deletions
|
|
@ -2431,6 +2431,12 @@ again:
|
|||
}
|
||||
|
||||
if (priv->input_buf.len > 0) {
|
||||
if (priv->input_buf.len > 50 * 1024 * 1024) {
|
||||
_LOGW("received too much data from ovsdb that is not valid JSON");
|
||||
priv->num_failures++;
|
||||
ovsdb_disconnect(self, priv->num_failures <= OVSDB_MAX_FAILURES, FALSE);
|
||||
return;
|
||||
}
|
||||
/* We have an incomplete message in the message buffer. Don't wait for another round
|
||||
* of "poll", instead try to read it again. */
|
||||
goto again;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue