Fix UDP length parsing

This patch ensures that the stated UDP payload length is within the received buffer size and within the size indicated by the IP header. This fixes #172. This is a re-pull as the original long-running test failed, but this ended up being operator error, and the patch is working as expected.