Stop waiting the NeighborSolicitation if the expected count has been reached.

Some test cases about NUD probes are verifying how many NSes has been
received, e.g. device should send 5 NSes post an L2 roam or 10 NSes for
low WiFi RSSI check, plus extra 3 NSes if mcast_resolicit flag is
enabled. However, sometimes the number of received NSes are more than
expected, that's because the PacketReader doesn't stop and keep waiting
for the upcoming packets and it does receive some later then. This CL
stops receiving the NSes packets once it's up to the expected count,
otherwise, the following NSes will mess up the test case.

Bug: 382194967
Test: atest NetworkStackRootTests
Change-Id: Id827d3320de4307c551a1375c9a0ef8d9ef41670
1 file changed