aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 334b930e0de3..bc9e380f0abf 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -659,6 +659,12 @@ static void set_operstate(struct net_device *dev, unsigned char transition)
659 } 659 }
660} 660}
661 661
662static unsigned int rtnl_dev_get_flags(const struct net_device *dev)
663{
664 return (dev->flags & ~(IFF_PROMISC | IFF_ALLMULTI)) |
665 (dev->gflags & (IFF_PROMISC | IFF_ALLMULTI));
666}
667
662static unsigned int rtnl_dev_combine_flags(const struct net_device *dev, 668static unsigned int rtnl_dev_combine_flags(const struct net_device *dev,
663 const struct ifinfomsg *ifm) 669 const struct ifinfomsg *ifm)
664{ 670{
@@ -667,7 +673,7 @@ static unsigned int rtnl_dev_combine_flags(const struct net_device *dev,
667 /* bugwards compatibility: ifi_change == 0 is treated as ~0 */ 673 /* bugwards compatibility: ifi_change == 0 is treated as ~0 */
668 if (ifm->ifi_change) 674 if (ifm->ifi_change)
669 flags = (flags & ifm->ifi_change) | 675 flags = (flags & ifm->ifi_change) |
670 (dev->flags & ~ifm->ifi_change); 676 (rtnl_dev_get_flags(dev) & ~ifm->ifi_change);
671 677
672 return flags; 678 return flags;
673} 679}