OSDN Git Service

APF: filter unwanted ARP replies
authorHugo Benichi <hugobenichi@google.com>
Tue, 12 Jul 2016 06:08:50 +0000 (15:08 +0900)
committerHugo Benichi <hugobenichi@google.com>
Thu, 14 Jul 2016 14:36:53 +0000 (23:36 +0900)
commit38db976514ff2ad12d207a927219762eab179882
tree0174a9a4639a82b64935bc878c1f70a272f3fc95
parent4c7b339411bd68d5f2768e10078bd83c7a50a0fb
APF: filter unwanted ARP replies

This patch adds APF filtering of ARP replies for interfaces with APF.

- when the interface has no IPv4 address, broadcast ARP replies with a
  0.0.0.0 target ip are dropped (GARP), ARP requests with a 0.0.0.0
  target ip are dropped.

- when the interface has an IPv4 address, broadcast ARP replies to a
  different ip are dropped (including GARPs to 0.0.0.0), ARP requests to
  a different ip are dropped.

Bug: 29404209
Bug: 30080487
Change-Id: I82613eb865c7f38b6260997fe2caf2aff382ad78
services/net/java/android/net/apf/ApfFilter.java
services/tests/servicestests/src/android/net/apf/ApfTest.java