vpn: Revert "Only read as much as I can handle"
authorPhilipp Tölke <toelke@in.tum.de>
Mon, 28 Jun 2010 12:37:48 +0000 (12:37 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Mon, 28 Jun 2010 12:37:48 +0000 (12:37 +0000)
This reverts commit 8d60f2985aaed37694a9e1fb75051f339cdf7699.

src/vpn/packet.c

index 75d3b3f9c809fc708135b3b535a97763125f4ed3..0e528ffff8f253e1f6564b58608b73765defde03 100644 (file)
@@ -42,7 +42,6 @@ int recv_pkt(int fd, struct pkt_tun** pkt) {{{
 
        *pkt = (struct pkt_tun*)malloc(r);
 
-       int r = r > size ? size : r;
        memcpy(*pkt, data, r);
        struct pkt_tun *_pkt = *pkt;