From: Veaceslav Falico Date: Mon, 24 Jun 2013 09:49:29 +0000 (+0200) Subject: bonding: add helper function bond_get_targets_ip(targets, ip) X-Git-Tag: v3.11-rc1~64^2~120 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87a7b84b588c2ddbde890890855aef18ec34174e;p=pandora-kernel.git bonding: add helper function bond_get_targets_ip(targets, ip) Add function bond_get_targets_ip(targets, ip) which searches through targets array of ips (arp_targets) and returns the position of first match. If ip == 0, returns the first free slot. On failure to find the ip or free slot, return -1. Use it to verify if the arp we've received is valid and in sysfs. v1->v2: Fix "[2/6] bonding: add helper function bond_get_targets_ip(targets, ip)", per Nikolay's advice, to verify if source ip != 0.0.0.0, otherwise we might update 'null' arp_ip_targets' last_rx. Also, address style. Signed-off-by: Veaceslav Falico Signed-off-by: David S. Miller --- Reading git-diff-tree failed