Commit eca56db1 authored by Patrick Caulfield's avatar Patrick Caulfield Committed by David S. Miller

[DECNET]: Remove DECNET_SIOCGIFCONF.

It's only purpose seems to be to break ifconfig. It often gets enabled by
default by distributors who like to set everything on, and it just confuses
people.

The functionality is available via netlink anyway - which is what anyone using
DECnet will be using for configuration.
Signed-off-by: default avatarPatrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb7bd0c1
......@@ -524,7 +524,6 @@ CONFIG_XFRM=y
CONFIG_BRIDGE=m
# CONFIG_VLAN_8021Q is not set
CONFIG_DECNET=m
# CONFIG_DECNET_SIOCGIFCONF is not set
# CONFIG_DECNET_ROUTER is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
......
......@@ -697,7 +697,6 @@ CONFIG_ATM_BR2684_IPFILTER=y
CONFIG_BRIDGE=m
CONFIG_VLAN_8021Q=m
CONFIG_DECNET=m
CONFIG_DECNET_SIOCGIFCONF=y
CONFIG_DECNET_ROUTER=y
CONFIG_DECNET_ROUTE_FWMARK=y
CONFIG_LLC=m
......
#
# DECnet configuration
#
config DECNET_SIOCGIFCONF
bool "DECnet: SIOCGIFCONF support"
depends on DECNET
help
This option should only be turned on if you are really sure that
you know what you are doing. It can break other applications which
use this system call and the proper way to get the information
provided by this call is to use rtnetlink.
If unsure, say N.
config DECNET_ROUTER
bool "DECnet: router support (EXPERIMENTAL)"
depends on DECNET && EXPERIMENTAL
......
......@@ -1291,59 +1291,6 @@ int unregister_dnaddr_notifier(struct notifier_block *nb)
return notifier_chain_unregister(&dnaddr_chain, nb);
}
#ifdef CONFIG_DECNET_SIOCGIFCONF
/*
* Now we support multiple addresses per interface.
* Since we don't want to break existing code, you have to enable
* it as a compile time option. Probably you should use the
* rtnetlink interface instead.
*/
int dnet_gifconf(struct net_device *dev, char __user *buf, int len)
{
struct dn_dev *dn_db = (struct dn_dev *)dev->dn_ptr;
struct dn_ifaddr *ifa;
char buffer[DN_IFREQ_SIZE];
struct ifreq *ifr = (struct ifreq *)buffer;
struct sockaddr_dn *addr = (struct sockaddr_dn *)&ifr->ifr_addr;
int done = 0;
if ((dn_db == NULL) || ((ifa = dn_db->ifa_list) == NULL))
return 0;
for(; ifa; ifa = ifa->ifa_next) {
if (!buf) {
done += sizeof(DN_IFREQ_SIZE);
continue;
}
if (len < DN_IFREQ_SIZE)
return done;
memset(buffer, 0, DN_IFREQ_SIZE);
if (ifa->ifa_label)
strcpy(ifr->ifr_name, ifa->ifa_label);
else
strcpy(ifr->ifr_name, dev->name);
addr->sdn_family = AF_DECnet;
addr->sdn_add.a_len = 2;
memcpy(addr->sdn_add.a_addr, &ifa->ifa_local,
sizeof(dn_address));
if (copy_to_user(buf, buffer, DN_IFREQ_SIZE)) {
done = -EFAULT;
break;
}
buf += DN_IFREQ_SIZE;
len -= DN_IFREQ_SIZE;
done += DN_IFREQ_SIZE;
}
return done;
}
#endif /* CONFIG_DECNET_SIOCGIFCONF */
#ifdef CONFIG_PROC_FS
static inline struct net_device *dn_dev_get_next(struct seq_file *seq, struct net_device *dev)
{
......@@ -1502,9 +1449,6 @@ void __init dn_dev_init(void)
decnet_address = dn_htons((addr[0] << 10) | addr[1]);
dn_dev_devices_on();
#ifdef CONFIG_DECNET_SIOCGIFCONF
register_gifconf(PF_DECnet, dnet_gifconf);
#endif /* CONFIG_DECNET_SIOCGIFCONF */
rtnetlink_links[PF_DECnet] = dnet_rtnetlink_table;
......@@ -1523,10 +1467,6 @@ void __exit dn_dev_cleanup(void)
{
rtnetlink_links[PF_DECnet] = NULL;
#ifdef CONFIG_DECNET_SIOCGIFCONF
unregister_gifconf(PF_DECnet);
#endif /* CONFIG_DECNET_SIOCGIFCONF */
#ifdef CONFIG_SYSCTL
{
int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment