Implement NS filter in APFv6
The program does some basic NS packet validation mentioned in RFC 2461,
7.1.1.
- IP hop limit has a value 255
- ICMP code is 0
- ICMP length is larger than 24
Pass and increase the counters that NS filter doesn't handle
- ICMP length is larger then 32 (includes multiple ICMPv6 options)
- target address is not interface's ip (request for other host)
Bug: 337807604
Test: atest NetworkStackTests:android.net.apf.ApfNewTest
Change-Id: I139cbf5aa659f0632ca5b78309904ea304296008
4 files changed