Skip to contentSkip to conversation

net: arp: use assignment

PATCH Applied Changli Gao 2 participants 2 messages Dec 2, 2010 – Dec 6, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: arp: use assignment

Only when dont_send is 0, arp_filter() is consulted, so we can simply assign the return value of arp_filter() to dont_send instead.

---
 net/ipv4/arp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/arp.c +1 -1
index 7833f17..10af759 100644
@@ -883,7 +883,7 @@ static int arp_process(struct sk_buff *skb)
 
 			dont_send = arp_ignore(in_dev, sip, tip);
 			if (!dont_send && IN_DEV_ARPFILTER(in_dev))
-				dont_send |= arp_filter(sip, tip, dev);
+				dont_send = arp_filter(sip, tip, dev);
 			if (!dont_send) {
 				n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
 				if (n) {