summaryrefslogtreecommitdiff
path: root/pfinet/linux-src
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-03-26 01:01:04 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-03-26 01:01:04 +0100
commit0992a61cafb0f3def3b6997f7c3670a4474f479b (patch)
treeda2819801a2f7c53c53962fef1fd2e048aa26c58 /pfinet/linux-src
parenta89bb489bfc0bb8d66f69e783b031b30233fdc82 (diff)
Fix tunnel and dummy interfaces
* pfinet/linux-src/include/linux/netdevice.h (netdevice): Add `change_flags' field. * pfinet/ethernet.c (ethernet_change_flags): Make function static. (setup_ethernet_device): Set `change_flags' field of `dev' to ethernet_change_flags. * pfinet/linux-src/net/core/dev.c (dev_change_flags): Call `change_flags' field of `dev' if non-nul, instead of calling ethernet_change_flags. * pfinet/pfinet.h (ethernet_change_flags): Remove function prototype.
Diffstat (limited to 'pfinet/linux-src')
-rw-r--r--pfinet/linux-src/include/linux/netdevice.h2
-rw-r--r--pfinet/linux-src/net/core/dev.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/pfinet/linux-src/include/linux/netdevice.h b/pfinet/linux-src/include/linux/netdevice.h
index 86f84a90..0b6af203 100644
--- a/pfinet/linux-src/include/linux/netdevice.h
+++ b/pfinet/linux-src/include/linux/netdevice.h
@@ -317,6 +317,8 @@ struct device
/* Semi-private data. Keep it at the end of device struct. */
struct dst_entry *fastpath[NETDEV_FASTROUTE_HMASK+1];
#endif
+
+ int (*change_flags)(struct device *dev, short flags);
};
diff --git a/pfinet/linux-src/net/core/dev.c b/pfinet/linux-src/net/core/dev.c
index ff16e827..b47c5027 100644
--- a/pfinet/linux-src/net/core/dev.c
+++ b/pfinet/linux-src/net/core/dev.c
@@ -1452,8 +1452,8 @@ int dev_change_flags(struct device *dev, unsigned flags)
dev_set_allmulti(dev, inc);
}
- if (!ret)
- ret = ethernet_change_flags(dev, dev->flags);
+ if (!ret && dev->change_flags)
+ ret = dev->change_flags(dev, dev->flags);
return ret;
}