[linux] Impose receive quota on tap driver
authorMichael Brown <mcb30@ipxe.org>
Mon, 4 Sep 2017 17:00:34 +0000 (18:00 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 4 Sep 2017 17:00:34 +0000 (18:00 +0100)
commit306465bef3fbbe14e6270fecf3e2d0c427f4bbc7
tree97e9e07ca885fe0d4bf7be206864792752fccbef
parent42eedb04c1ad71548043c33ef1996dfe8e524996
[linux] Impose receive quota on tap driver

The tap driver can retrieve a potentially unlimited number of packets
in a single poll.  This can lead to heap exhaustion under heavy load.

Fix by imposing an artificial receive quota (as already used in other
drivers without natural receive limits).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/linux/tap.c