mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
This commit is contained in:
commit
a25606c845
14 changed files with 152 additions and 76 deletions
|
@ -871,7 +871,7 @@ P: Marcel Holtmann
|
||||||
M: marcel@holtmann.org
|
M: marcel@holtmann.org
|
||||||
P: Maxim Krasnyansky
|
P: Maxim Krasnyansky
|
||||||
M: maxk@qualcomm.com
|
M: maxk@qualcomm.com
|
||||||
L: bluez-devel@lists.sf.net
|
L: linux-bluetooth@vger.kernel.org
|
||||||
W: http://bluez.sf.net
|
W: http://bluez.sf.net
|
||||||
W: http://www.bluez.org
|
W: http://www.bluez.org
|
||||||
W: http://www.holtmann.org/linux/bluetooth/
|
W: http://www.holtmann.org/linux/bluetooth/
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include <linux/moduleparam.h>
|
#include <linux/moduleparam.h>
|
||||||
#include <net/pkt_sched.h>
|
#include <net/pkt_sched.h>
|
||||||
#include <net/net_namespace.h>
|
#include <net/net_namespace.h>
|
||||||
|
#include <linux/lockdep.h>
|
||||||
|
|
||||||
#define TX_TIMEOUT (2*HZ)
|
#define TX_TIMEOUT (2*HZ)
|
||||||
|
|
||||||
|
@ -227,6 +228,16 @@ static struct rtnl_link_ops ifb_link_ops __read_mostly = {
|
||||||
module_param(numifbs, int, 0);
|
module_param(numifbs, int, 0);
|
||||||
MODULE_PARM_DESC(numifbs, "Number of ifb devices");
|
MODULE_PARM_DESC(numifbs, "Number of ifb devices");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* dev_ifb->queue_lock is usually taken after dev->ingress_lock,
|
||||||
|
* reversely to e.g. qdisc_lock_tree(). It should be safe until
|
||||||
|
* ifb doesn't take dev->queue_lock with dev_ifb->ingress_lock.
|
||||||
|
* But lockdep should know that ifb has different locks from dev.
|
||||||
|
*/
|
||||||
|
static struct lock_class_key ifb_queue_lock_key;
|
||||||
|
static struct lock_class_key ifb_ingress_lock_key;
|
||||||
|
|
||||||
|
|
||||||
static int __init ifb_init_one(int index)
|
static int __init ifb_init_one(int index)
|
||||||
{
|
{
|
||||||
struct net_device *dev_ifb;
|
struct net_device *dev_ifb;
|
||||||
|
@ -246,6 +257,10 @@ static int __init ifb_init_one(int index)
|
||||||
err = register_netdevice(dev_ifb);
|
err = register_netdevice(dev_ifb);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
lockdep_set_class(&dev_ifb->queue_lock, &ifb_queue_lock_key);
|
||||||
|
lockdep_set_class(&dev_ifb->ingress_lock, &ifb_ingress_lock_key);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
|
|
@ -64,8 +64,8 @@
|
||||||
|
|
||||||
#define DRV_MODULE_NAME "tg3"
|
#define DRV_MODULE_NAME "tg3"
|
||||||
#define PFX DRV_MODULE_NAME ": "
|
#define PFX DRV_MODULE_NAME ": "
|
||||||
#define DRV_MODULE_VERSION "3.87"
|
#define DRV_MODULE_VERSION "3.88"
|
||||||
#define DRV_MODULE_RELDATE "December 20, 2007"
|
#define DRV_MODULE_RELDATE "March 20, 2008"
|
||||||
|
|
||||||
#define TG3_DEF_MAC_MODE 0
|
#define TG3_DEF_MAC_MODE 0
|
||||||
#define TG3_DEF_RX_MODE 0
|
#define TG3_DEF_RX_MODE 0
|
||||||
|
@ -11841,7 +11841,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_valid_ether_addr(&dev->dev_addr[0])) {
|
if (!is_valid_ether_addr(&dev->dev_addr[0])) {
|
||||||
#ifdef CONFIG_SPARC64
|
#ifdef CONFIG_SPARC
|
||||||
if (!tg3_get_default_macaddr_sparc(tp))
|
if (!tg3_get_default_macaddr_sparc(tp))
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2270,7 +2270,7 @@ static const struct pid_entry tgid_base_stuff[] = {
|
||||||
DIR("fd", S_IRUSR|S_IXUSR, fd),
|
DIR("fd", S_IRUSR|S_IXUSR, fd),
|
||||||
DIR("fdinfo", S_IRUSR|S_IXUSR, fdinfo),
|
DIR("fdinfo", S_IRUSR|S_IXUSR, fdinfo),
|
||||||
#ifdef CONFIG_NET
|
#ifdef CONFIG_NET
|
||||||
DIR("net", S_IRUGO|S_IXUSR, net),
|
DIR("net", S_IRUGO|S_IXUGO, net),
|
||||||
#endif
|
#endif
|
||||||
REG("environ", S_IRUSR, environ),
|
REG("environ", S_IRUSR, environ),
|
||||||
INF("auxv", S_IRUSR, pid_auxv),
|
INF("auxv", S_IRUSR, pid_auxv),
|
||||||
|
|
|
@ -375,15 +375,19 @@ static inline void sctp_sysctl_unregister(void) { return; }
|
||||||
|
|
||||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||||
|
|
||||||
int sctp_v6_init(void);
|
void sctp_v6_pf_init(void);
|
||||||
void sctp_v6_exit(void);
|
void sctp_v6_pf_exit(void);
|
||||||
|
int sctp_v6_protosw_init(void);
|
||||||
|
void sctp_v6_protosw_exit(void);
|
||||||
int sctp_v6_add_protocol(void);
|
int sctp_v6_add_protocol(void);
|
||||||
void sctp_v6_del_protocol(void);
|
void sctp_v6_del_protocol(void);
|
||||||
|
|
||||||
#else /* #ifdef defined(CONFIG_IPV6) */
|
#else /* #ifdef defined(CONFIG_IPV6) */
|
||||||
|
|
||||||
static inline int sctp_v6_init(void) { return 0; }
|
static inline void sctp_v6_pf_init(void) { return 0; }
|
||||||
static inline void sctp_v6_exit(void) { return; }
|
static inline void sctp_v6_pf_exit(void) { return; }
|
||||||
|
static inline int sctp_v6_protosw_init(void) { return 0; }
|
||||||
|
static inline void sctp_v6_protosw_exit(void) { return; }
|
||||||
static inline int sctp_v6_add_protocol(void) { return 0; }
|
static inline int sctp_v6_add_protocol(void) { return 0; }
|
||||||
static inline void sctp_v6_del_protocol(void) { return; }
|
static inline void sctp_v6_del_protocol(void) { return; }
|
||||||
|
|
||||||
|
|
|
@ -78,9 +78,13 @@ static int audit_default;
|
||||||
/* If auditing cannot proceed, audit_failure selects what happens. */
|
/* If auditing cannot proceed, audit_failure selects what happens. */
|
||||||
static int audit_failure = AUDIT_FAIL_PRINTK;
|
static int audit_failure = AUDIT_FAIL_PRINTK;
|
||||||
|
|
||||||
/* If audit records are to be written to the netlink socket, audit_pid
|
/*
|
||||||
* contains the (non-zero) pid. */
|
* If audit records are to be written to the netlink socket, audit_pid
|
||||||
|
* contains the pid of the auditd process and audit_nlk_pid contains
|
||||||
|
* the pid to use to send netlink messages to that process.
|
||||||
|
*/
|
||||||
int audit_pid;
|
int audit_pid;
|
||||||
|
static int audit_nlk_pid;
|
||||||
|
|
||||||
/* If audit_rate_limit is non-zero, limit the rate of sending audit records
|
/* If audit_rate_limit is non-zero, limit the rate of sending audit records
|
||||||
* to that number per second. This prevents DoS attacks, but results in
|
* to that number per second. This prevents DoS attacks, but results in
|
||||||
|
@ -350,7 +354,7 @@ static int kauditd_thread(void *dummy)
|
||||||
wake_up(&audit_backlog_wait);
|
wake_up(&audit_backlog_wait);
|
||||||
if (skb) {
|
if (skb) {
|
||||||
if (audit_pid) {
|
if (audit_pid) {
|
||||||
int err = netlink_unicast(audit_sock, skb, audit_pid, 0);
|
int err = netlink_unicast(audit_sock, skb, audit_nlk_pid, 0);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
BUG_ON(err != -ECONNREFUSED); /* Shoudn't happen */
|
BUG_ON(err != -ECONNREFUSED); /* Shoudn't happen */
|
||||||
printk(KERN_ERR "audit: *NO* daemon at audit_pid=%d\n", audit_pid);
|
printk(KERN_ERR "audit: *NO* daemon at audit_pid=%d\n", audit_pid);
|
||||||
|
@ -626,6 +630,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||||
sid, 1);
|
sid, 1);
|
||||||
|
|
||||||
audit_pid = new_pid;
|
audit_pid = new_pid;
|
||||||
|
audit_nlk_pid = NETLINK_CB(skb).pid;
|
||||||
}
|
}
|
||||||
if (status_get->mask & AUDIT_STATUS_RATE_LIMIT)
|
if (status_get->mask & AUDIT_STATUS_RATE_LIMIT)
|
||||||
err = audit_set_rate_limit(status_get->rate_limit,
|
err = audit_set_rate_limit(status_get->rate_limit,
|
||||||
|
|
|
@ -136,7 +136,7 @@ void br_fdb_cleanup(unsigned long _data)
|
||||||
this_timer = f->ageing_timer + delay;
|
this_timer = f->ageing_timer + delay;
|
||||||
if (time_before_eq(this_timer, jiffies))
|
if (time_before_eq(this_timer, jiffies))
|
||||||
fdb_delete(f);
|
fdb_delete(f);
|
||||||
else if (this_timer < next_timer)
|
else if (time_before(this_timer, next_timer))
|
||||||
next_timer = this_timer;
|
next_timer = this_timer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,10 +215,12 @@ static void zap_completion_queue(void)
|
||||||
while (clist != NULL) {
|
while (clist != NULL) {
|
||||||
struct sk_buff *skb = clist;
|
struct sk_buff *skb = clist;
|
||||||
clist = clist->next;
|
clist = clist->next;
|
||||||
if (skb->destructor)
|
if (skb->destructor) {
|
||||||
|
atomic_inc(&skb->users);
|
||||||
dev_kfree_skb_any(skb); /* put this one back */
|
dev_kfree_skb_any(skb); /* put this one back */
|
||||||
else
|
} else {
|
||||||
__kfree_skb(skb);
|
__kfree_skb(skb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,6 +252,8 @@ recent_mt_check(const char *tablename, const void *ip,
|
||||||
if ((info->check_set & (IPT_RECENT_SET | IPT_RECENT_REMOVE)) &&
|
if ((info->check_set & (IPT_RECENT_SET | IPT_RECENT_REMOVE)) &&
|
||||||
(info->seconds || info->hit_count))
|
(info->seconds || info->hit_count))
|
||||||
return false;
|
return false;
|
||||||
|
if (info->hit_count > ip_pkt_list_tot)
|
||||||
|
return false;
|
||||||
if (info->name[0] == '\0' ||
|
if (info->name[0] == '\0' ||
|
||||||
strnlen(info->name, IPT_RECENT_NAME_LEN) == IPT_RECENT_NAME_LEN)
|
strnlen(info->name, IPT_RECENT_NAME_LEN) == IPT_RECENT_NAME_LEN)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -255,7 +255,7 @@ static u16 tcp_select_window(struct sock *sk)
|
||||||
*
|
*
|
||||||
* Relax Will Robinson.
|
* Relax Will Robinson.
|
||||||
*/
|
*/
|
||||||
new_win = cur_win;
|
new_win = ALIGN(cur_win, 1 << tp->rx_opt.rcv_wscale);
|
||||||
}
|
}
|
||||||
tp->rcv_wnd = new_win;
|
tp->rcv_wnd = new_win;
|
||||||
tp->rcv_wup = tp->rcv_nxt;
|
tp->rcv_wup = tp->rcv_nxt;
|
||||||
|
|
|
@ -179,11 +179,12 @@ config IPV6_SIT
|
||||||
Saying M here will produce a module called sit.ko. If unsure, say Y.
|
Saying M here will produce a module called sit.ko. If unsure, say Y.
|
||||||
|
|
||||||
config IPV6_TUNNEL
|
config IPV6_TUNNEL
|
||||||
tristate "IPv6: IPv6-in-IPv6 tunnel"
|
tristate "IPv6: IP-in-IPv6 tunnel (RFC2473)"
|
||||||
select INET6_TUNNEL
|
select INET6_TUNNEL
|
||||||
depends on IPV6
|
depends on IPV6
|
||||||
---help---
|
---help---
|
||||||
Support for IPv6-in-IPv6 tunnels described in RFC 2473.
|
Support for IPv6-in-IPv6 and IPv4-in-IPv6 tunnels described in
|
||||||
|
RFC 2473.
|
||||||
|
|
||||||
If unsure, say N.
|
If unsure, say N.
|
||||||
|
|
||||||
|
|
|
@ -842,7 +842,7 @@ static int process_setup(struct sk_buff *skb, struct nf_conn *ct,
|
||||||
|
|
||||||
set_h225_addr = rcu_dereference(set_h225_addr_hook);
|
set_h225_addr = rcu_dereference(set_h225_addr_hook);
|
||||||
if ((setup->options & eSetup_UUIE_destCallSignalAddress) &&
|
if ((setup->options & eSetup_UUIE_destCallSignalAddress) &&
|
||||||
(set_h225_addr) && ct->status && IPS_NAT_MASK &&
|
(set_h225_addr) && ct->status & IPS_NAT_MASK &&
|
||||||
get_h225_addr(ct, *data, &setup->destCallSignalAddress,
|
get_h225_addr(ct, *data, &setup->destCallSignalAddress,
|
||||||
&addr, &port) &&
|
&addr, &port) &&
|
||||||
memcmp(&addr, &ct->tuplehash[!dir].tuple.src.u3, sizeof(addr))) {
|
memcmp(&addr, &ct->tuplehash[!dir].tuple.src.u3, sizeof(addr))) {
|
||||||
|
|
|
@ -1015,15 +1015,24 @@ static struct sctp_pf sctp_pf_inet6 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Initialize IPv6 support and register with socket layer. */
|
/* Initialize IPv6 support and register with socket layer. */
|
||||||
int sctp_v6_init(void)
|
void sctp_v6_pf_init(void)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
|
|
||||||
/* Register the SCTP specific PF_INET6 functions. */
|
/* Register the SCTP specific PF_INET6 functions. */
|
||||||
sctp_register_pf(&sctp_pf_inet6, PF_INET6);
|
sctp_register_pf(&sctp_pf_inet6, PF_INET6);
|
||||||
|
|
||||||
/* Register the SCTP specific AF_INET6 functions. */
|
/* Register the SCTP specific AF_INET6 functions. */
|
||||||
sctp_register_af(&sctp_af_inet6);
|
sctp_register_af(&sctp_af_inet6);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sctp_v6_pf_exit(void)
|
||||||
|
{
|
||||||
|
list_del(&sctp_af_inet6.list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize IPv6 support and register with socket layer. */
|
||||||
|
int sctp_v6_protosw_init(void)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
|
||||||
rc = proto_register(&sctpv6_prot, 1);
|
rc = proto_register(&sctpv6_prot, 1);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
@ -1036,6 +1045,14 @@ int sctp_v6_init(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sctp_v6_protosw_exit(void)
|
||||||
|
{
|
||||||
|
inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
|
||||||
|
inet6_unregister_protosw(&sctpv6_stream_protosw);
|
||||||
|
proto_unregister(&sctpv6_prot);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Register with inet6 layer. */
|
/* Register with inet6 layer. */
|
||||||
int sctp_v6_add_protocol(void)
|
int sctp_v6_add_protocol(void)
|
||||||
{
|
{
|
||||||
|
@ -1048,15 +1065,6 @@ int sctp_v6_add_protocol(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IPv6 specific exit support. */
|
|
||||||
void sctp_v6_exit(void)
|
|
||||||
{
|
|
||||||
inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
|
|
||||||
inet6_unregister_protosw(&sctpv6_stream_protosw);
|
|
||||||
proto_unregister(&sctpv6_prot);
|
|
||||||
list_del(&sctp_af_inet6.list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Unregister with inet6 layer. */
|
/* Unregister with inet6 layer. */
|
||||||
void sctp_v6_del_protocol(void)
|
void sctp_v6_del_protocol(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -995,6 +995,58 @@ static void cleanup_sctp_mibs(void)
|
||||||
free_percpu(sctp_statistics[1]);
|
free_percpu(sctp_statistics[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void sctp_v4_pf_init(void)
|
||||||
|
{
|
||||||
|
/* Initialize the SCTP specific PF functions. */
|
||||||
|
sctp_register_pf(&sctp_pf_inet, PF_INET);
|
||||||
|
sctp_register_af(&sctp_af_inet);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sctp_v4_pf_exit(void)
|
||||||
|
{
|
||||||
|
list_del(&sctp_af_inet.list);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sctp_v4_protosw_init(void)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
rc = proto_register(&sctp_prot, 1);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
/* Register SCTP(UDP and TCP style) with socket layer. */
|
||||||
|
inet_register_protosw(&sctp_seqpacket_protosw);
|
||||||
|
inet_register_protosw(&sctp_stream_protosw);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sctp_v4_protosw_exit(void)
|
||||||
|
{
|
||||||
|
inet_unregister_protosw(&sctp_stream_protosw);
|
||||||
|
inet_unregister_protosw(&sctp_seqpacket_protosw);
|
||||||
|
proto_unregister(&sctp_prot);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sctp_v4_add_protocol(void)
|
||||||
|
{
|
||||||
|
/* Register notifier for inet address additions/deletions. */
|
||||||
|
register_inetaddr_notifier(&sctp_inetaddr_notifier);
|
||||||
|
|
||||||
|
/* Register SCTP with inet layer. */
|
||||||
|
if (inet_add_protocol(&sctp_protocol, IPPROTO_SCTP) < 0)
|
||||||
|
return -EAGAIN;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sctp_v4_del_protocol(void)
|
||||||
|
{
|
||||||
|
inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
|
||||||
|
unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
|
||||||
|
}
|
||||||
|
|
||||||
/* Initialize the universe into something sensible. */
|
/* Initialize the universe into something sensible. */
|
||||||
SCTP_STATIC __init int sctp_init(void)
|
SCTP_STATIC __init int sctp_init(void)
|
||||||
{
|
{
|
||||||
|
@ -1038,8 +1090,6 @@ SCTP_STATIC __init int sctp_init(void)
|
||||||
/* Initialize object count debugging. */
|
/* Initialize object count debugging. */
|
||||||
sctp_dbg_objcnt_init();
|
sctp_dbg_objcnt_init();
|
||||||
|
|
||||||
/* Initialize the SCTP specific PF functions. */
|
|
||||||
sctp_register_pf(&sctp_pf_inet, PF_INET);
|
|
||||||
/*
|
/*
|
||||||
* 14. Suggested SCTP Protocol Parameter Values
|
* 14. Suggested SCTP Protocol Parameter Values
|
||||||
*/
|
*/
|
||||||
|
@ -1197,19 +1247,22 @@ SCTP_STATIC __init int sctp_init(void)
|
||||||
sctp_sysctl_register();
|
sctp_sysctl_register();
|
||||||
|
|
||||||
INIT_LIST_HEAD(&sctp_address_families);
|
INIT_LIST_HEAD(&sctp_address_families);
|
||||||
sctp_register_af(&sctp_af_inet);
|
sctp_v4_pf_init();
|
||||||
|
sctp_v6_pf_init();
|
||||||
|
|
||||||
|
/* Initialize the local address list. */
|
||||||
|
INIT_LIST_HEAD(&sctp_local_addr_list);
|
||||||
|
spin_lock_init(&sctp_local_addr_lock);
|
||||||
|
sctp_get_local_addr_list();
|
||||||
|
|
||||||
|
status = sctp_v4_protosw_init();
|
||||||
|
|
||||||
status = proto_register(&sctp_prot, 1);
|
|
||||||
if (status)
|
if (status)
|
||||||
goto err_proto_register;
|
goto err_protosw_init;
|
||||||
|
|
||||||
/* Register SCTP(UDP and TCP style) with socket layer. */
|
status = sctp_v6_protosw_init();
|
||||||
inet_register_protosw(&sctp_seqpacket_protosw);
|
|
||||||
inet_register_protosw(&sctp_stream_protosw);
|
|
||||||
|
|
||||||
status = sctp_v6_init();
|
|
||||||
if (status)
|
if (status)
|
||||||
goto err_v6_init;
|
goto err_v6_protosw_init;
|
||||||
|
|
||||||
/* Initialize the control inode/socket for handling OOTB packets. */
|
/* Initialize the control inode/socket for handling OOTB packets. */
|
||||||
if ((status = sctp_ctl_sock_init())) {
|
if ((status = sctp_ctl_sock_init())) {
|
||||||
|
@ -1218,19 +1271,9 @@ SCTP_STATIC __init int sctp_init(void)
|
||||||
goto err_ctl_sock_init;
|
goto err_ctl_sock_init;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the local address list. */
|
status = sctp_v4_add_protocol();
|
||||||
INIT_LIST_HEAD(&sctp_local_addr_list);
|
if (status)
|
||||||
spin_lock_init(&sctp_local_addr_lock);
|
|
||||||
sctp_get_local_addr_list();
|
|
||||||
|
|
||||||
/* Register notifier for inet address additions/deletions. */
|
|
||||||
register_inetaddr_notifier(&sctp_inetaddr_notifier);
|
|
||||||
|
|
||||||
/* Register SCTP with inet layer. */
|
|
||||||
if (inet_add_protocol(&sctp_protocol, IPPROTO_SCTP) < 0) {
|
|
||||||
status = -EAGAIN;
|
|
||||||
goto err_add_protocol;
|
goto err_add_protocol;
|
||||||
}
|
|
||||||
|
|
||||||
/* Register SCTP with inet6 layer. */
|
/* Register SCTP with inet6 layer. */
|
||||||
status = sctp_v6_add_protocol();
|
status = sctp_v6_add_protocol();
|
||||||
|
@ -1241,18 +1284,18 @@ SCTP_STATIC __init int sctp_init(void)
|
||||||
out:
|
out:
|
||||||
return status;
|
return status;
|
||||||
err_v6_add_protocol:
|
err_v6_add_protocol:
|
||||||
inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
|
sctp_v6_del_protocol();
|
||||||
unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
|
|
||||||
err_add_protocol:
|
err_add_protocol:
|
||||||
sctp_free_local_addr_list();
|
sctp_v4_del_protocol();
|
||||||
sock_release(sctp_ctl_socket);
|
sock_release(sctp_ctl_socket);
|
||||||
err_ctl_sock_init:
|
err_ctl_sock_init:
|
||||||
sctp_v6_exit();
|
sctp_v6_protosw_exit();
|
||||||
err_v6_init:
|
err_v6_protosw_init:
|
||||||
inet_unregister_protosw(&sctp_stream_protosw);
|
sctp_v4_protosw_exit();
|
||||||
inet_unregister_protosw(&sctp_seqpacket_protosw);
|
err_protosw_init:
|
||||||
proto_unregister(&sctp_prot);
|
sctp_free_local_addr_list();
|
||||||
err_proto_register:
|
sctp_v4_pf_exit();
|
||||||
|
sctp_v6_pf_exit();
|
||||||
sctp_sysctl_unregister();
|
sctp_sysctl_unregister();
|
||||||
list_del(&sctp_af_inet.list);
|
list_del(&sctp_af_inet.list);
|
||||||
free_pages((unsigned long)sctp_port_hashtable,
|
free_pages((unsigned long)sctp_port_hashtable,
|
||||||
|
@ -1285,23 +1328,21 @@ SCTP_STATIC __exit void sctp_exit(void)
|
||||||
|
|
||||||
/* Unregister with inet6/inet layers. */
|
/* Unregister with inet6/inet layers. */
|
||||||
sctp_v6_del_protocol();
|
sctp_v6_del_protocol();
|
||||||
inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
|
sctp_v4_del_protocol();
|
||||||
|
|
||||||
/* Unregister notifier for inet address additions/deletions. */
|
|
||||||
unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
|
|
||||||
|
|
||||||
/* Free the local address list. */
|
|
||||||
sctp_free_local_addr_list();
|
|
||||||
|
|
||||||
/* Free the control endpoint. */
|
/* Free the control endpoint. */
|
||||||
sock_release(sctp_ctl_socket);
|
sock_release(sctp_ctl_socket);
|
||||||
|
|
||||||
/* Cleanup v6 initializations. */
|
/* Free protosw registrations */
|
||||||
sctp_v6_exit();
|
sctp_v6_protosw_exit();
|
||||||
|
sctp_v4_protosw_exit();
|
||||||
|
|
||||||
|
/* Free the local address list. */
|
||||||
|
sctp_free_local_addr_list();
|
||||||
|
|
||||||
/* Unregister with socket layer. */
|
/* Unregister with socket layer. */
|
||||||
inet_unregister_protosw(&sctp_stream_protosw);
|
sctp_v6_pf_exit();
|
||||||
inet_unregister_protosw(&sctp_seqpacket_protosw);
|
sctp_v4_pf_exit();
|
||||||
|
|
||||||
sctp_sysctl_unregister();
|
sctp_sysctl_unregister();
|
||||||
list_del(&sctp_af_inet.list);
|
list_del(&sctp_af_inet.list);
|
||||||
|
@ -1320,8 +1361,6 @@ SCTP_STATIC __exit void sctp_exit(void)
|
||||||
|
|
||||||
kmem_cache_destroy(sctp_chunk_cachep);
|
kmem_cache_destroy(sctp_chunk_cachep);
|
||||||
kmem_cache_destroy(sctp_bucket_cachep);
|
kmem_cache_destroy(sctp_bucket_cachep);
|
||||||
|
|
||||||
proto_unregister(&sctp_prot);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(sctp_init);
|
module_init(sctp_init);
|
||||||
|
|
Loading…
Reference in a new issue