chiark / gitweb /
netlink: Remove a newline from p-t-p startup message
[secnet.git] / udp.c
diff --git a/udp.c b/udp.c
index 42fbb1f697dbcfc6491a5c6b56886a9ed670098c..97b92a6017b81677b9c50f2be3db6ee282d1fde2 100644 (file)
--- a/udp.c
+++ b/udp.c
@@ -19,6 +19,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include "util.h"
+#include "magic.h"
 #include "unaligned.h"
 #include "ipaddr.h"
 #include "magic.h"
@@ -102,6 +103,7 @@ static void udp_afterpoll(void *state, struct pollfd *fds, int nfds)
            fromlen=sizeof(from);
            BUF_ASSERT_FREE(st->rbuf);
            BUF_ALLOC(st->rbuf,"udp_afterpoll");
+           buffer_init(st->rbuf,calculate_max_start_pad());
            rv=recvfrom(st->fd, st->rbuf->start, st->rbuf->len, 0,
                        (struct sockaddr *)&from, &fromlen);
            if (rv>0) {