// Update the ARP cache for the source address
updateARPCache(skbuf.getLinkLayerHeader().getSourceAddress(), hdr.getSourceAddress());
// Get my IP address
final IPv4ProtocolAddressInfo myAddrInfo =
(IPv4ProtocolAddressInfo) deviceAPI.getProtocolAddressInfo(getProtocolID());
if (myAddrInfo == null) {
stat.nodevaddr.inc();
}
// Should I process this packet, or is it for somebody else?
final IPv4Address dstAddr = hdr.getDestination();
final boolean shouldProcess;
if (myAddrInfo != null) {
shouldProcess = myAddrInfo.contains(dstAddr);
} else {
// I don't have an IP address yet, if the linklayer says
// it is for me, we'll process it, otherwise we'll drop it.
shouldProcess = !skbuf.getLinkLayerHeader().getDestinationAddress().isBroadcast();
}