| Submitter | Mark McLoughlin |
|---|---|
| Date | Nov. 25, 2009, 6:49 p.m. |
| Message ID | <1259174977-26212-43-git-send-email-markmc@redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/39444/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/net/tap-linux.c b/net/tap-linux.c index e4f7e27..6af9e82 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -131,6 +131,11 @@ void tap_fd_set_offload(int fd, int csum, int tso4, { unsigned int offload = 0; + /* Check if our kernel supports TUNSETOFFLOAD */ + if (ioctl(fd, TUNSETOFFLOAD, 0) != 0 && errno == EINVAL) { + return; + } + if (csum) { offload |= TUN_F_CSUM; if (tso4)