vpn: general cleanup
authorPhilipp Tölke <toelke@in.tum.de>
Mon, 28 Jun 2010 12:37:42 +0000 (12:37 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Mon, 28 Jun 2010 12:37:42 +0000 (12:37 +0000)
src/vpn/packet.c
src/vpn/test.c

index 79841dc64d732857b17083f2c36b2919ec7a5fe4..37ce448635eb46737e1a6fff7ee6b9f727634d40 100644 (file)
@@ -9,9 +9,9 @@
 #include "debug.h"
 #include "packet.h"
 
-long payload(struct ip6_pkt* pkt) {
+long payload(struct ip6_pkt* pkt) {{{
        return (pkt->hdr.paylgth[0] << 8) + pkt->hdr.paylgth[1];
-}
+}}}
 
 void send_pkt(int fd, struct ip6_pkt* pkt) {{{
        int sz = payload(pkt);
index 6d63d4bb19e81fbbe338ed583f343678d0edd55b..acdf4249a42344be158726f4c2840e570ea11f2d 100644 (file)
@@ -10,8 +10,8 @@
 #include "pretty-print.h"
 
 int main(int c, char** v) {
-       //char* dev = (char*) malloc(IFNAMSIZ);
        char dev[IFNAMSIZ];
+       memset(dev, 0, IFNAMSIZ);
        int fd = init_tun(dev);
 
        debug(1, 0, "Initialized the interface %s.\n", dev);