Fix TAP packet output length.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 9 Aug 2008 15:35:31 +0000 (17:35 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 9 Aug 2008 15:35:31 +0000 (17:35 +0200)
src/mctap.c

index 472af01..2bec00f 100644 (file)
@@ -146,7 +146,7 @@ static void bridge(int sock, int tap, struct sockaddr *dst, socklen_t dstlen)
                    pi.flags = 0;
                    pi.proto = 0;
                    memcpy(buf, &pi, sizeof(pi));
-                   write(tap, buf, ret);
+                   write(tap, buf, sizeof(pi) + ret);
                }
            }
        }