Backport an upstream fix for a DDoS vulnerability in the
network plugin: CVE-2017-7401
The patch has been adapted from the fix for 5.6 branch,
as 5.5 is already EoL in practice.
Run-tested with R7800/ipq806x.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>