git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
net
/
sctp
/
ipv6.c
diff --git
a/net/sctp/ipv6.c
b/net/sctp/ipv6.c
index
af402f7
..
8765177
100644
(file)
--- a/
net/sctp/ipv6.c
+++ b/
net/sctp/ipv6.c
@@
-107,7
+107,7
@@
void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
skb->nh.raw = saveip;
skb->h.raw = savesctp;
if (!sk) {
skb->nh.raw = saveip;
skb->h.raw = savesctp;
if (!sk) {
- ICMP6_INC_STATS_BH(idev, I
cmp6InErrors
);
+ ICMP6_INC_STATS_BH(idev, I
CMP6_MIB_INERRORS
);
goto out;
}
goto out;
}
@@
-177,7
+177,7
@@
static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport,
__FUNCTION__, skb, skb->len,
NIP6(fl.fl6_src), NIP6(fl.fl6_dst));
__FUNCTION__, skb, skb->len,
NIP6(fl.fl6_src), NIP6(fl.fl6_dst));
- SCTP_INC_STATS(S
ctpOutSCTPPacks
);
+ SCTP_INC_STATS(S
CTP_MIB_OUTSCTPPACKS
);
return ip6_xmit(sk, skb, &fl, np->opt, ipfragok);
}
return ip6_xmit(sk, skb, &fl, np->opt, ipfragok);
}
@@
-583,8
+583,8
@@
struct sock *sctp_v6_create_accept_sk(struct sock *sk,
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct sctp6_sock *newsctp6sk;
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct sctp6_sock *newsctp6sk;
- newsk = sk_alloc(PF_INET6, GFP_KERNEL, s
izeof(struct sctp6_sock)
,
- sk->sk_slab);
+ newsk = sk_alloc(PF_INET6, GFP_KERNEL, s
k->sk_prot->slab_obj_size
,
+ sk->sk_
prot->
slab);
if (!newsk)
goto out;
if (!newsk)
goto out;
@@
-641,7
+641,7
@@
struct sock *sctp_v6_create_accept_sk(struct sock *sk,
#endif
if (newsk->sk_prot->init(newsk)) {
#endif
if (newsk->sk_prot->init(newsk)) {
-
inet_sock
_release(newsk);
+
sk_common
_release(newsk);
newsk = NULL;
}
newsk = NULL;
}
@@
-882,17
+882,17
@@
static struct proto_ops inet6_seqpacket_ops = {
.ioctl = inet6_ioctl,
.listen = sctp_inet_listen,
.shutdown = inet_shutdown,
.ioctl = inet6_ioctl,
.listen = sctp_inet_listen,
.shutdown = inet_shutdown,
- .setsockopt =
inet
_setsockopt,
- .getsockopt =
inet
_getsockopt,
+ .setsockopt =
sock_common
_setsockopt,
+ .getsockopt =
sock_common
_getsockopt,
.sendmsg = inet_sendmsg,
.sendmsg = inet_sendmsg,
- .recvmsg =
inet
_recvmsg,
+ .recvmsg =
sock_common
_recvmsg,
.mmap = sock_no_mmap,
};
static struct inet_protosw sctpv6_seqpacket_protosw = {
.type = SOCK_SEQPACKET,
.protocol = IPPROTO_SCTP,
.mmap = sock_no_mmap,
};
static struct inet_protosw sctpv6_seqpacket_protosw = {
.type = SOCK_SEQPACKET,
.protocol = IPPROTO_SCTP,
- .prot = &sctp_prot,
+ .prot = &sctp
v6
_prot,
.ops = &inet6_seqpacket_ops,
.capability = -1,
.no_check = 0,
.ops = &inet6_seqpacket_ops,
.capability = -1,
.no_check = 0,
@@
-901,7
+901,7
@@
static struct inet_protosw sctpv6_seqpacket_protosw = {
static struct inet_protosw sctpv6_stream_protosw = {
.type = SOCK_STREAM,
.protocol = IPPROTO_SCTP,
static struct inet_protosw sctpv6_stream_protosw = {
.type = SOCK_STREAM,
.protocol = IPPROTO_SCTP,
- .prot = &sctp_prot,
+ .prot = &sctp
v6
_prot,
.ops = &inet6_seqpacket_ops,
.capability = -1,
.no_check = 0,
.ops = &inet6_seqpacket_ops,
.capability = -1,
.no_check = 0,
@@
-963,9
+963,14
@@
static struct sctp_pf sctp_pf_inet6_specific = {
/* Initialize IPv6 support and register with inet6 stack. */
int sctp_v6_init(void)
{
/* Initialize IPv6 support and register with inet6 stack. */
int sctp_v6_init(void)
{
+ int rc = sk_alloc_slab(&sctpv6_prot, "sctpv6_sock");
+
+ if (rc)
+ goto out;
/* Register inet6 protocol. */
/* Register inet6 protocol. */
+ rc = -EAGAIN;
if (inet6_add_protocol(&sctpv6_protocol, IPPROTO_SCTP) < 0)
if (inet6_add_protocol(&sctpv6_protocol, IPPROTO_SCTP) < 0)
-
return -EAGAIN
;
+
goto out_sctp_free_slab
;
/* Add SCTPv6(UDP and TCP style) to inetsw6 linked list. */
inet6_register_protosw(&sctpv6_seqpacket_protosw);
/* Add SCTPv6(UDP and TCP style) to inetsw6 linked list. */
inet6_register_protosw(&sctpv6_seqpacket_protosw);
@@
-979,8
+984,12
@@
int sctp_v6_init(void)
/* Register notifier for inet6 address additions/deletions. */
register_inet6addr_notifier(&sctp_inetaddr_notifier);
/* Register notifier for inet6 address additions/deletions. */
register_inet6addr_notifier(&sctp_inetaddr_notifier);
-
- return 0;
+ rc = 0;
+out:
+ return rc;
+out_sctp_free_slab:
+ sk_free_slab(&sctpv6_prot);
+ goto out;
}
/* IPv6 specific exit support. */
}
/* IPv6 specific exit support. */
@@
-991,4
+1000,5
@@
void sctp_v6_exit(void)
inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
inet6_unregister_protosw(&sctpv6_stream_protosw);
unregister_inet6addr_notifier(&sctp_inetaddr_notifier);
inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
inet6_unregister_protosw(&sctpv6_stream_protosw);
unregister_inet6addr_notifier(&sctp_inetaddr_notifier);
+ sk_free_slab(&sctpv6_prot);
}
}