[IPV4]: When possible test for IFF_LOOPBACK and not dev == loopback_dev
Now that multiple loopback devices are becoming possible it makes the code a little cleaner and more maintainable to test if a deivice is th a loopback device by testing dev->flags & IFF_LOOPBACK instead of dev == loopback_dev. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
5967789dbc
commit
0cc217e16c
@@ -961,7 +961,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff **pskb,
|
||||
* ... don't know why 1st test DOES NOT include 2nd (?)
|
||||
*/
|
||||
if (unlikely(skb->pkt_type != PACKET_HOST
|
||||
|| skb->dev == loopback_dev || skb->sk)) {
|
||||
|| skb->dev->flags & IFF_LOOPBACK || skb->sk)) {
|
||||
IP_VS_DBG(12, "packet type=%d proto=%d daddr=%d.%d.%d.%d ignored\n",
|
||||
skb->pkt_type,
|
||||
ip_hdr(skb)->protocol,
|
||||
|
Reference in New Issue
Block a user