Skip to contentSkip to conversation

Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied

PATCH New Mark McLoughlin 1 participant 1 message Jul 1, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied

If no tap,sndbuf= arg is supplied, we use a default value. If TUNSETSNDBUF fails in this case, we should not abort.

---
 net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net.c +1 -1
index 21842d0..770162f 100644
@@ -1416,7 +1416,7 @@ static void tap_set_sndbuf(TAPState *s, const char *sndbuf_str, Monitor *mon)
         sndbuf = INT_MAX;
     }
 
-    if (ioctl(s->fd, TUNSETSNDBUF, &sndbuf) == -1) {
+    if (ioctl(s->fd, TUNSETSNDBUF, &sndbuf) == -1 && sndbuf_str) {
         config_error(mon, "TUNSETSNDBUF ioctl failed: %s\n",
                      strerror(errno));
     }
Signature · 1 line
1.6.2.2