aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipvs/ip_vs_core.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-09-26 22:10:06 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:52:48 -0700
commit0cc217e16cb8ca8ef2544363571fce94259900e0 (patch)
tree05d7ef10fd9971fffa3f3870a4c3e66077bb1dc2 /net/ipv4/ipvs/ip_vs_core.c
parent[IPV4]: Remove unnecessary test for the loopback device from inetdev_destroy (diff)
downloadlinux-dev-0cc217e16cb8ca8ef2544363571fce94259900e0.tar.xz
linux-dev-0cc217e16cb8ca8ef2544363571fce94259900e0.zip
[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>
Diffstat (limited to '')
-rw-r--r--net/ipv4/ipvs/ip_vs_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c
index 74503267e5d4..fbca2a2ff29f 100644
--- a/net/ipv4/ipvs/ip_vs_core.c
+++ b/net/ipv4/ipvs/ip_vs_core.c
@@ -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,