Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4c744fb0
Commit
4c744fb0
authored
Oct 06, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Delete support for old-style protocols, no longer necessary.
parent
609c0d95
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
16 additions
and
92 deletions
+16
-92
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_alb.c
+0
-1
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_main.c
+0
-1
drivers/net/hamradio/bpqether.c
drivers/net/hamradio/bpqether.c
+0
-1
drivers/net/pppoe.c
drivers/net/pppoe.c
+0
-2
drivers/net/wan/hdlc_generic.c
drivers/net/wan/hdlc_generic.c
+1
-3
drivers/net/wan/lapbether.c
drivers/net/wan/lapbether.c
+0
-1
drivers/net/wan/syncppp.c
drivers/net/wan/syncppp.c
+0
-1
include/linux/netdevice.h
include/linux/netdevice.h
+2
-5
net/8021q/vlan.c
net/8021q/vlan.c
+0
-1
net/appletalk/ddp.c
net/appletalk/ddp.c
+0
-2
net/ax25/af_ax25.c
net/ax25/af_ax25.c
+0
-1
net/core/dev.c
net/core/dev.c
+6
-45
net/decnet/af_decnet.c
net/decnet/af_decnet.c
+0
-1
net/econet/af_econet.c
net/econet/af_econet.c
+0
-1
net/ipv4/arp.c
net/ipv4/arp.c
+0
-1
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+1
-4
net/ipv4/ipconfig.c
net/ipv4/ipconfig.c
+0
-2
net/ipv6/ipv6_sockglue.c
net/ipv6/ipv6_sockglue.c
+1
-4
net/ipx/af_ipx.c
net/ipx/af_ipx.c
+0
-2
net/irda/irsyms.c
net/irda/irsyms.c
+1
-6
net/llc/llc_core.c
net/llc/llc_core.c
+0
-2
net/packet/af_packet.c
net/packet/af_packet.c
+4
-4
net/x25/af_x25.c
net/x25/af_x25.c
+0
-1
No files found.
drivers/net/bonding/bond_alb.c
View file @
4c744fb0
...
...
@@ -888,7 +888,6 @@ rlb_initialize(struct bonding *bond)
pk_type
->
type
=
__constant_htons
(
ETH_P_ARP
);
pk_type
->
dev
=
bond
->
device
;
pk_type
->
func
=
rlb_arp_recv
;
pk_type
->
data
=
PKT_CAN_SHARE_SKB
;
dev_add_pack
(
pk_type
);
...
...
drivers/net/bonding/bond_main.c
View file @
4c744fb0
...
...
@@ -955,7 +955,6 @@ static void bond_register_lacpdu(struct bonding *bond)
pk_type
->
type
=
PKT_TYPE_LACPDU
;
pk_type
->
dev
=
bond
->
device
;
pk_type
->
func
=
bond_3ad_lacpdu_recv
;
pk_type
->
data
=
PKT_CAN_SHARE_SKB
;
dev_add_pack
(
pk_type
);
}
...
...
drivers/net/hamradio/bpqether.c
View file @
4c744fb0
...
...
@@ -105,7 +105,6 @@ static const char *bpq_print_ethaddr(const unsigned char *);
static
struct
packet_type
bpq_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_BPQ
),
.
func
=
bpq_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
struct
notifier_block
bpq_dev_notifier
=
{
...
...
drivers/net/pppoe.c
View file @
4c744fb0
...
...
@@ -468,13 +468,11 @@ static int pppoe_disc_rcv(struct sk_buff *skb,
static
struct
packet_type
pppoes_ptype
=
{
.
type
=
__constant_htons
(
ETH_P_PPP_SES
),
.
func
=
pppoe_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
struct
packet_type
pppoed_ptype
=
{
.
type
=
__constant_htons
(
ETH_P_PPP_DISC
),
.
func
=
pppoe_disc_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
/***********************************************************************
...
...
drivers/net/wan/hdlc_generic.c
View file @
4c744fb0
...
...
@@ -279,11 +279,9 @@ EXPORT_SYMBOL(hdlc_ioctl);
EXPORT_SYMBOL
(
register_hdlc_device
);
EXPORT_SYMBOL
(
unregister_hdlc_device
);
static
struct
packet_type
hdlc_packet_type
=
{
static
struct
packet_type
hdlc_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_HDLC
),
.
func
=
hdlc_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
...
...
drivers/net/wan/lapbether.c
View file @
4c744fb0
...
...
@@ -438,7 +438,6 @@ static int lapbeth_device_event(struct notifier_block *this,
static
struct
packet_type
lapbeth_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_DEC
),
.
func
=
lapbeth_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
struct
notifier_block
lapbeth_dev_notifier
=
{
...
...
drivers/net/wan/syncppp.c
View file @
4c744fb0
...
...
@@ -1455,7 +1455,6 @@ static int sppp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_t
struct
packet_type
sppp_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_WAN_PPP
),
.
func
=
sppp_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
char
banner
[]
__initdata
=
...
...
include/linux/netdevice.h
View file @
4c744fb0
...
...
@@ -477,15 +477,12 @@ struct net_device
*/
#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev))
#define PKT_CAN_SHARE_SKB ((void*)1)
struct
packet_type
{
struct
packet_type
{
unsigned
short
type
;
/* This is really htons(ether_type). */
struct
net_device
*
dev
;
/* NULL is wildcarded here */
int
(
*
func
)
(
struct
sk_buff
*
,
struct
net_device
*
,
struct
packet_type
*
);
void
*
data
;
/* Private to the packet type */
void
*
af_packet_priv
;
struct
list_head
list
;
};
...
...
net/8021q/vlan.c
View file @
4c744fb0
...
...
@@ -67,7 +67,6 @@ unsigned short vlan_default_dev_flags = 1;
static
struct
packet_type
vlan_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_8021Q
),
.
func
=
vlan_skb_recv
,
/* VLAN receive method */
.
data
=
PKT_CAN_SHARE_SKB
,
};
/* End of global variables definitions. */
...
...
net/appletalk/ddp.c
View file @
4c744fb0
...
...
@@ -1872,13 +1872,11 @@ static struct notifier_block ddp_notifier = {
struct
packet_type
ltalk_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_LOCALTALK
),
.
func
=
ltalk_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
struct
packet_type
ppptalk_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_PPPTALK
),
.
func
=
atalk_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
unsigned
char
ddp_snap_id
[]
=
{
0x08
,
0x00
,
0x07
,
0x80
,
0x9B
};
...
...
net/ax25/af_ax25.c
View file @
4c744fb0
...
...
@@ -1978,7 +1978,6 @@ static struct packet_type ax25_packet_type = {
.
type
=
__constant_htons
(
ETH_P_AX25
),
.
dev
=
NULL
,
/* All devices */
.
func
=
ax25_kiss_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
struct
notifier_block
ax25_dev_notifier
=
{
...
...
net/core/dev.c
View file @
4c744fb0
...
...
@@ -229,8 +229,7 @@ void dev_add_pack(struct packet_type *pt)
spin_lock_bh
(
&
ptype_lock
);
#ifdef CONFIG_NET_FASTROUTE
/* Hack to detect packet socket */
if
(
pt
->
data
&&
pt
->
data
!=
PKT_CAN_SHARE_SKB
)
{
if
(
pt
->
af_packet_priv
)
{
netdev_fastroute_obstacles
++
;
dev_clear_fastroute
(
pt
->
dev
);
}
...
...
@@ -278,7 +277,7 @@ void __dev_remove_pack(struct packet_type *pt)
list_for_each_entry
(
pt1
,
head
,
list
)
{
if
(
pt
==
pt1
)
{
#ifdef CONFIG_NET_FASTROUTE
if
(
pt
->
data
&&
pt
->
data
!=
PKT_CAN_SHARE_SKB
)
if
(
pt
->
af_packet_priv
)
netdev_fastroute_obstacles
--
;
#endif
list_del_rcu
(
&
pt
->
list
);
...
...
@@ -943,7 +942,7 @@ void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
* they originated from - MvS (miquels@drinkel.ow.org)
*/
if
((
ptype
->
dev
==
dev
||
!
ptype
->
dev
)
&&
(
struct
sock
*
)
ptype
->
data
!=
skb
->
sk
)
{
(
struct
sock
*
)
ptype
->
af_packet_priv
!=
skb
->
sk
)
{
struct
sk_buff
*
skb2
=
skb_clone
(
skb
,
GFP_ATOMIC
);
if
(
!
skb2
)
break
;
...
...
@@ -1404,36 +1403,6 @@ int netif_rx(struct sk_buff *skb)
return
NET_RX_DROP
;
}
/* Deliver skb to an old protocol, which is not threaded well
or which do not understand shared skbs.
*/
static
int
deliver_to_old_ones
(
struct
packet_type
*
pt
,
struct
sk_buff
*
skb
,
int
last
)
{
int
ret
=
NET_RX_DROP
;
if
(
!
last
)
{
skb
=
skb_clone
(
skb
,
GFP_ATOMIC
);
if
(
!
skb
)
goto
out
;
}
if
(
skb_is_nonlinear
(
skb
)
&&
__skb_linearize
(
skb
,
GFP_ATOMIC
))
goto
out_kfree
;
#ifdef CONFIG_SMP
/* Old protocols did not depened on BHs different of NET_BH and
TIMER_BH - they need to be fixed for the new assumptions.
*/
print_symbol
(
"fix old protocol handler %s!
\n
"
,
(
unsigned
long
)
pt
->
func
);
#endif
ret
=
pt
->
func
(
skb
,
skb
->
dev
,
pt
);
out:
return
ret
;
out_kfree:
kfree_skb
(
skb
);
goto
out
;
}
static
__inline__
void
skb_bond
(
struct
sk_buff
*
skb
)
{
struct
net_device
*
dev
=
skb
->
dev
;
...
...
@@ -1493,12 +1462,8 @@ static void net_tx_action(struct softirq_action *h)
static
__inline__
int
deliver_skb
(
struct
sk_buff
*
skb
,
struct
packet_type
*
pt_prev
,
int
last
)
{
if
(
unlikely
(
!
pt_prev
->
data
))
return
deliver_to_old_ones
(
pt_prev
,
skb
,
last
);
else
{
atomic_inc
(
&
skb
->
users
);
return
pt_prev
->
func
(
skb
,
skb
->
dev
,
pt_prev
);
}
atomic_inc
(
&
skb
->
users
);
return
pt_prev
->
func
(
skb
,
skb
->
dev
,
pt_prev
);
}
...
...
@@ -1579,11 +1544,7 @@ int netif_receive_skb(struct sk_buff *skb)
}
if
(
pt_prev
)
{
if
(
!
pt_prev
->
data
)
{
ret
=
deliver_to_old_ones
(
pt_prev
,
skb
,
1
);
}
else
{
ret
=
pt_prev
->
func
(
skb
,
skb
->
dev
,
pt_prev
);
}
ret
=
pt_prev
->
func
(
skb
,
skb
->
dev
,
pt_prev
);
}
else
{
kfree_skb
(
skb
);
/* Jamal, now you will not able to escape explaining
...
...
net/decnet/af_decnet.c
View file @
4c744fb0
...
...
@@ -2081,7 +2081,6 @@ static struct packet_type dn_dix_packet_type = {
.
type
=
__constant_htons
(
ETH_P_DNA_RT
),
.
dev
=
NULL
,
/* All devices */
.
func
=
dn_route_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
#ifdef CONFIG_PROC_FS
...
...
net/econet/af_econet.c
View file @
4c744fb0
...
...
@@ -1052,7 +1052,6 @@ static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
static
struct
packet_type
econet_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_ECONET
),
.
func
=
econet_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
void
econet_hw_initialise
(
void
)
...
...
net/ipv4/arp.c
View file @
4c744fb0
...
...
@@ -1110,7 +1110,6 @@ void arp_ifdown(struct net_device *dev)
static
struct
packet_type
arp_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_ARP
),
.
func
=
arp_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
int
arp_proc_init
(
void
);
...
...
net/ipv4/ip_output.c
View file @
4c744fb0
...
...
@@ -1295,12 +1295,9 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
* IP protocol layer initialiser
*/
static
struct
packet_type
ip_packet_type
=
{
static
struct
packet_type
ip_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_IP
),
.
dev
=
NULL
,
/* All devices */
.
func
=
ip_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
/*
...
...
net/ipv4/ipconfig.c
View file @
4c744fb0
...
...
@@ -390,7 +390,6 @@ static int ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct pack
static
struct
packet_type
rarp_packet_type
__initdata
=
{
.
type
=
__constant_htons
(
ETH_P_RARP
),
.
func
=
ic_rarp_recv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
inline
void
ic_rarp_init
(
void
)
...
...
@@ -553,7 +552,6 @@ static int ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct pac
static
struct
packet_type
bootp_packet_type
__initdata
=
{
.
type
=
__constant_htons
(
ETH_P_IP
),
.
func
=
ic_bootp_recv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
...
...
net/ipv6/ipv6_sockglue.c
View file @
4c744fb0
...
...
@@ -57,12 +57,9 @@
DEFINE_SNMP_STAT
(
struct
ipv6_mib
,
ipv6_statistics
);
static
struct
packet_type
ipv6_packet_type
=
{
static
struct
packet_type
ipv6_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_IPV6
),
.
dev
=
NULL
,
/* All devices */
.
func
=
ipv6_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
/*
...
...
net/ipx/af_ipx.c
View file @
4c744fb0
...
...
@@ -1920,13 +1920,11 @@ SOCKOPS_WRAP(ipx_dgram, PF_IPX);
static
struct
packet_type
ipx_8023_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_802_3
),
.
func
=
ipx_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
struct
packet_type
ipx_dix_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_IPX
),
.
func
=
ipx_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
struct
notifier_block
ipx_dev_notifier
=
{
...
...
net/irda/irsyms.c
View file @
4c744fb0
...
...
@@ -187,13 +187,9 @@ __u32 irda_debug = IRDA_DEBUG_LEVEL;
/* Packet type handler.
* Tell the kernel how IrDA packets should be handled.
*/
static
struct
packet_type
irda_packet_type
=
{
static
struct
packet_type
irda_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_IRDA
),
.
dev
=
NULL
,
/* Wildcard : All devices */
.
func
=
irlap_driver_rcv
,
/* Packet type handler irlap_frame.c */
.
data
=
PKT_CAN_SHARE_SKB
,
//.next = NULL,
};
/*
...
...
@@ -310,7 +306,6 @@ void __exit irda_cleanup(void)
#endif
/* Remove IrDA packet type (stop receiving packets) */
irda_packet_type
.
type
=
htons
(
ETH_P_IRDA
);
dev_remove_pack
(
&
irda_packet_type
);
/* Stop receiving interfaces notifications */
...
...
net/llc/llc_core.c
View file @
4c744fb0
...
...
@@ -140,13 +140,11 @@ void llc_sap_close(struct llc_sap *sap)
static
struct
packet_type
llc_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_802_2
),
.
func
=
llc_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
struct
packet_type
llc_tr_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_TR_802_2
),
.
func
=
llc_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
int
__init
llc_init
(
void
)
...
...
net/packet/af_packet.c
View file @
4c744fb0
...
...
@@ -227,7 +227,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct
* field for just this event.
*/
sk
=
(
struct
sock
*
)
pt
->
data
;
sk
=
pt
->
af_packet_priv
;
/*
* Yank back the headers [hope the device set this
...
...
@@ -422,7 +422,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
if
(
skb
->
pkt_type
==
PACKET_LOOPBACK
)
goto
drop
;
sk
=
(
struct
sock
*
)
pt
->
data
;
sk
=
pt
->
af_packet_priv
;
po
=
pkt_sk
(
sk
);
skb
->
dev
=
dev
;
...
...
@@ -525,7 +525,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
if
(
skb
->
pkt_type
==
PACKET_LOOPBACK
)
goto
drop
;
sk
=
(
struct
sock
*
)
pt
->
data
;
sk
=
pt
->
af_packet_priv
;
po
=
pkt_sk
(
sk
);
if
(
dev
->
hard_header
)
{
...
...
@@ -973,7 +973,7 @@ static int packet_create(struct socket *sock, int protocol)
if
(
sock
->
type
==
SOCK_PACKET
)
po
->
prot_hook
.
func
=
packet_rcv_spkt
;
#endif
po
->
prot_hook
.
data
=
(
void
*
)
sk
;
po
->
prot_hook
.
af_packet_priv
=
sk
;
if
(
protocol
)
{
po
->
prot_hook
.
type
=
protocol
;
...
...
net/x25/af_x25.c
View file @
4c744fb0
...
...
@@ -1345,7 +1345,6 @@ SOCKOPS_WRAP(x25_proto, AF_X25);
static
struct
packet_type
x25_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_X25
),
.
func
=
x25_lapb_receive_frame
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
struct
notifier_block
x25_dev_notifier
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment