devif: upd backend bugfix in valid_length computation
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Thu, 24 Aug 2017 10:44:25 +0000 (12:44 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Thu, 24 Aug 2017 10:44:25 +0000 (12:44 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

lib/devif/backends/net/udp/devif_backend_udp.c

index e7c1a35..d4495ea 100644 (file)
@@ -189,7 +189,7 @@ static errval_t udp_dequeue(struct devq* q, regionid_t* rid, genoffset_t* offset
         print_buffer(que, que->regions[*rid % MAX_NUM_REGIONS].va + *offset, *valid_length);
 #endif
 
-        *valid_length = ntohs(header->len) - UDP_HLEN - IP_HLEN - ETH_HLEN;
+        *valid_length = ntohs(header->len) - UDP_HLEN;
         *valid_data += UDP_HLEN;
         //print_buffer(que, que->regions[*rid % MAX_NUM_REGIONS].va + *offset+ *valid_data, *valid_length);
         return SYS_ERR_OK;