]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv4/netfilter/ipt_MASQUERADE.c
net: always pass struct netdev_notifier_info to netdevice notifiers
[karo-tx-linux.git] / net / ipv4 / netfilter / ipt_MASQUERADE.c
index 5d5d4d1be9c2c7c2c951943e5a7d7ce7a4b940d4..30e4de94056722535ee5304e93b49bfb6c5cf889 100644 (file)
@@ -108,7 +108,7 @@ static int masq_device_event(struct notifier_block *this,
                             unsigned long event,
                             void *ptr)
 {
-       const struct net_device *dev = ptr;
+       const struct net_device *dev = netdev_notifier_info_to_dev(ptr);
        struct net *net = dev_net(dev);
 
        if (event == NETDEV_DOWN) {
@@ -129,7 +129,10 @@ static int masq_inet_event(struct notifier_block *this,
                           void *ptr)
 {
        struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev;
-       return masq_device_event(this, event, dev);
+       struct netdev_notifier_info info;
+
+       netdev_notifier_info_init(&info, dev);
+       return masq_device_event(this, event, &info);
 }
 
 static struct notifier_block masq_dev_notifier = {