command_util: Generate properly documented command header files.
[paraslash.git] / udp_recv.c
index 759caa3..ad8d51f 100644 (file)
@@ -6,6 +6,7 @@
 /** \file udp_recv.c Paraslash's udp receiver */
 
 #include <dirent.h>
+#include <sys/socket.h>
 #include <net/if.h>
 
 #include "para.h"
@@ -82,6 +83,9 @@ static void udp_recv_post_select(__a_unused struct sched *s, struct task *t)
        if (!ret)
                return;
        packet_size = ret;
+       if (packet_size >= FEC_EOF_PACKET_LEN)
+               if (!memcmp(tmpbuf, FEC_EOF_PACKET, FEC_EOF_PACKET_LEN))
+                       return;
        t->error = add_rn_output(rn, tmpbuf, packet_size);
        if (t->error < 0)
                return;