OSDN Git Service

apf: Drop ARP reply if SPA is 0.0.0.0
authorAaron Huang <huangaaron@google.com>
Thu, 15 Nov 2018 12:30:46 +0000 (20:30 +0800)
committerAaron Huang <huangaaron@google.com>
Mon, 10 Dec 2018 14:18:14 +0000 (14:18 +0000)
commit04ed6a35921303aa194358f6c8b84b3f556ccc92
tree46eec2ff55ac38a3591cfba23feebaf0f814e2c9
parent785e5f1f962ec95cf59333c931280890f130b9c2
apf: Drop ARP reply if SPA is 0.0.0.0

Some network re-writing packet from broadcast MACs to unicast,
result in this kind of packets cannot be dropped by APF filter.
Thus, drop ARP reply if source IP is 0.0.0.0.

Note: Linux kernel always ignores such replies in the function arp_process().

Bug: 118044271
Test: runtest frameworks-net -c android.net.apf.ApfTest
Change-Id: Id293bf231913d9b483ce7d8dd909e05fa927ccd7
services/net/java/android/net/apf/ApfFilter.java
tests/net/java/android/net/apf/ApfTest.java