Skip to content

Commit 90833aa

Browse files
AdrianBunkDavid S. Miller
authored andcommitted
[NET]: The scheduled removal of the frame diverter.
This patch contains the scheduled removal of the frame diverter. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d7f7365 commit 90833aa

12 files changed

Lines changed: 6 additions & 767 deletions

File tree

‎Documentation/feature-removal-schedule.txt‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,6 @@ Who: Patrick McHardy <kaber@trash.net>
227227

228228
---------------------------
229229

230-
What: frame diverter
231-
When: November 2006
232-
Why: The frame diverter is included in most distribution kernels, but is
233-
broken. It does not correctly handle many things:
234-
- IPV6
235-
- non-linear skb's
236-
- network device RCU on removal
237-
- input frames not correctly checked for protocol errors
238-
It also adds allocation overhead even if not enabled.
239-
It is not clear if anyone is still using it.
240-
Who: Stephen Hemminger <shemminger@osdl.org>
241-
242-
---------------------------
243-
244-
245230
What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment
246231
When: October 2008
247232
Why: The stacking of class devices makes these values misleading and

‎drivers/net/Space.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include <linux/errno.h>
3434
#include <linux/init.h>
3535
#include <linux/netlink.h>
36-
#include <linux/divert.h>
3736

3837
/* A unified ethernet device probe. This is the easiest way to have every
3938
ethernet adaptor have the name "eth[0123...]".

‎include/linux/Kbuild‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ unifdef-y += cuda.h
193193
unifdef-y += cyclades.h
194194
unifdef-y += dccp.h
195195
unifdef-y += dirent.h
196-
unifdef-y += divert.h
197196
unifdef-y += dlm.h
198197
unifdef-y += elfcore.h
199198
unifdef-y += errno.h

‎include/linux/divert.h‎

Lines changed: 0 additions & 132 deletions
This file was deleted.

‎include/linux/netdevice.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#include <linux/percpu.h>
3939
#include <linux/dmaengine.h>
4040

41-
struct divert_blk;
4241
struct vlan_group;
4342
struct ethtool_ops;
4443
struct netpoll_info;
@@ -517,11 +516,6 @@ struct net_device
517516
/* bridge stuff */
518517
struct net_bridge_port *br_port;
519518

520-
#ifdef CONFIG_NET_DIVERT
521-
/* this will get initialized at each interface type init routine */
522-
struct divert_blk *divert;
523-
#endif /* CONFIG_NET_DIVERT */
524-
525519
/* class/net/name entry */
526520
struct class_device class_dev;
527521
/* space for optional statistics and wireless sysfs groups */

‎include/linux/sockios.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */
7373
#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */
7474

75-
#define SIOCGIFDIVERT 0x8944 /* Frame diversion support */
76-
#define SIOCSIFDIVERT 0x8945 /* Set frame diversion options */
75+
/* SIOCGIFDIVERT was: 0x8944 Frame diversion support */
76+
/* SIOCSIFDIVERT was: 0x8945 Set frame diversion options */
7777

7878
#define SIOCETHTOOL 0x8946 /* Ethtool interface */
7979

‎net/Kconfig‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -175,33 +175,6 @@ source "net/ipx/Kconfig"
175175
source "drivers/net/appletalk/Kconfig"
176176
source "net/x25/Kconfig"
177177
source "net/lapb/Kconfig"
178-
179-
config NET_DIVERT
180-
bool "Frame Diverter (EXPERIMENTAL)"
181-
depends on EXPERIMENTAL && BROKEN
182-
---help---
183-
The Frame Diverter allows you to divert packets from the
184-
network, that are not aimed at the interface receiving it (in
185-
promisc. mode). Typically, a Linux box setup as an Ethernet bridge
186-
with the Frames Diverter on, can do some *really* transparent www
187-
caching using a Squid proxy for example.
188-
189-
This is very useful when you don't want to change your router's
190-
config (or if you simply don't have access to it).
191-
192-
The other possible usages of diverting Ethernet Frames are
193-
numberous:
194-
- reroute smtp traffic to another interface
195-
- traffic-shape certain network streams
196-
- transparently proxy smtp connections
197-
- etc...
198-
199-
For more informations, please refer to:
200-
<http://diverter.sourceforge.net/>
201-
<http://perso.wanadoo.fr/magpie/EtherDivert.html>
202-
203-
If unsure, say N.
204-
205178
source "net/econet/Kconfig"
206179
source "net/wanrouter/Kconfig"
207180
source "net/sched/Kconfig"

‎net/core/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ obj-y += dev.o ethtool.o dev_mcast.o dst.o netevent.o \
1212

1313
obj-$(CONFIG_XFRM) += flow.o
1414
obj-$(CONFIG_SYSFS) += net-sysfs.o
15-
obj-$(CONFIG_NET_DIVERT) += dv.o
1615
obj-$(CONFIG_NET_PKTGEN) += pktgen.o
1716
obj-$(CONFIG_WIRELESS_EXT) += wireless.o
1817
obj-$(CONFIG_NETPOLL) += netpoll.o

‎net/core/dev.c‎

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
#include <linux/seq_file.h>
9999
#include <linux/stat.h>
100100
#include <linux/if_bridge.h>
101-
#include <linux/divert.h>
102101
#include <net/dst.h>
103102
#include <net/pkt_sched.h>
104103
#include <net/checksum.h>
@@ -1827,8 +1826,6 @@ int netif_receive_skb(struct sk_buff *skb)
18271826
ncls:
18281827
#endif
18291828

1830-
handle_diverter(skb);
1831-
18321829
if (handle_bridge(&skb, &pt_prev, &ret, orig_dev))
18331830
goto out;
18341831

@@ -2898,10 +2895,6 @@ int register_netdevice(struct net_device *dev)
28982895
spin_lock_init(&dev->ingress_lock);
28992896
#endif
29002897

2901-
ret = alloc_divert_blk(dev);
2902-
if (ret)
2903-
goto out;
2904-
29052898
dev->iflink = -1;
29062899

29072900
/* Init, if this function is available */
@@ -2910,13 +2903,13 @@ int register_netdevice(struct net_device *dev)
29102903
if (ret) {
29112904
if (ret > 0)
29122905
ret = -EIO;
2913-
goto out_err;
2906+
goto out;
29142907
}
29152908
}
29162909

29172910
if (!dev_valid_name(dev->name)) {
29182911
ret = -EINVAL;
2919-
goto out_err;
2912+
goto out;
29202913
}
29212914

29222915
dev->ifindex = dev_new_index();
@@ -2930,7 +2923,7 @@ int register_netdevice(struct net_device *dev)
29302923
= hlist_entry(p, struct net_device, name_hlist);
29312924
if (!strncmp(d->name, dev->name, IFNAMSIZ)) {
29322925
ret = -EEXIST;
2933-
goto out_err;
2926+
goto out;
29342927
}
29352928
}
29362929

@@ -2974,7 +2967,7 @@ int register_netdevice(struct net_device *dev)
29742967

29752968
ret = netdev_register_sysfs(dev);
29762969
if (ret)
2977-
goto out_err;
2970+
goto out;
29782971
dev->reg_state = NETREG_REGISTERED;
29792972

29802973
/*
@@ -3001,9 +2994,6 @@ int register_netdevice(struct net_device *dev)
30012994

30022995
out:
30032996
return ret;
3004-
out_err:
3005-
free_divert_blk(dev);
3006-
goto out;
30072997
}
30082998

30092999
/**
@@ -3320,8 +3310,6 @@ int unregister_netdevice(struct net_device *dev)
33203310
/* Notifier chain MUST detach us from master device. */
33213311
BUG_TRAP(!dev->master);
33223312

3323-
free_divert_blk(dev);
3324-
33253313
/* Finish processing unregister after unlock */
33263314
net_set_todo(dev);
33273315

0 commit comments

Comments
 (0)