aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2008-07-01 23:06:22 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-01 23:06:22 -0400
commitecbed6a41900126e7b9509e12a8d0cc22176e3eb (patch)
tree4ad958d028412df7049684dbbe686852a6dd792d /net/sctp/socket.c
parent6dbf4bcac98bbc76ef425b3a2b4169f31199f6c7 (diff)
sctp: Mark GET_PEER|LOCAL_ADDR_OLD deprecated.
Socket options SCTP_GET_PEER_ADDR_OLD, SCTP_GET_PEER_ADDR_NUM_OLD, SCTP_GET_LOCAL_ADDR_OLD, and SCTP_GET_PEER_LOCAL_ADDR_NUM_OLD have been replaced by newer versions a since 2005. It's time to officially deprecate them and schedule them for removal. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 43460a1cb6d0..df5572c39f0c 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4223,6 +4223,8 @@ static int sctp_getsockopt_peer_addrs_num_old(struct sock *sk, int len,
4223 if (copy_from_user(&id, optval, sizeof(sctp_assoc_t))) 4223 if (copy_from_user(&id, optval, sizeof(sctp_assoc_t)))
4224 return -EFAULT; 4224 return -EFAULT;
4225 4225
4226 printk(KERN_WARNING "SCTP: Use of SCTP_GET_PEER_ADDRS_NUM_OLD "
4227 "socket option deprecated\n");
4226 /* For UDP-style sockets, id specifies the association to query. */ 4228 /* For UDP-style sockets, id specifies the association to query. */
4227 asoc = sctp_id2assoc(sk, id); 4229 asoc = sctp_id2assoc(sk, id);
4228 if (!asoc) 4230 if (!asoc)
@@ -4262,6 +4264,9 @@ static int sctp_getsockopt_peer_addrs_old(struct sock *sk, int len,
4262 4264
4263 if (getaddrs.addr_num <= 0) return -EINVAL; 4265 if (getaddrs.addr_num <= 0) return -EINVAL;
4264 4266
4267 printk(KERN_WARNING "SCTP: Use of SCTP_GET_PEER_ADDRS_OLD "
4268 "socket option deprecated\n");
4269
4265 /* For UDP-style sockets, id specifies the association to query. */ 4270 /* For UDP-style sockets, id specifies the association to query. */
4266 asoc = sctp_id2assoc(sk, getaddrs.assoc_id); 4271 asoc = sctp_id2assoc(sk, getaddrs.assoc_id);
4267 if (!asoc) 4272 if (!asoc)
@@ -4355,6 +4360,9 @@ static int sctp_getsockopt_local_addrs_num_old(struct sock *sk, int len,
4355 if (copy_from_user(&id, optval, sizeof(sctp_assoc_t))) 4360 if (copy_from_user(&id, optval, sizeof(sctp_assoc_t)))
4356 return -EFAULT; 4361 return -EFAULT;
4357 4362
4363 printk(KERN_WARNING "SCTP: Use of SCTP_GET_LOCAL_ADDRS_NUM_OLD "
4364 "socket option deprecated\n");
4365
4358 /* 4366 /*
4359 * For UDP-style sockets, id specifies the association to query. 4367 * For UDP-style sockets, id specifies the association to query.
4360 * If the id field is set to the value '0' then the locally bound 4368 * If the id field is set to the value '0' then the locally bound
@@ -4515,6 +4523,10 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len,
4515 if (getaddrs.addr_num <= 0 || 4523 if (getaddrs.addr_num <= 0 ||
4516 getaddrs.addr_num >= (INT_MAX / sizeof(union sctp_addr))) 4524 getaddrs.addr_num >= (INT_MAX / sizeof(union sctp_addr)))
4517 return -EINVAL; 4525 return -EINVAL;
4526
4527 printk(KERN_WARNING "SCTP: Use of SCTP_GET_LOCAL_ADDRS_OLD "
4528 "socket option deprecated\n");
4529
4518 /* 4530 /*
4519 * For UDP-style sockets, id specifies the association to query. 4531 * For UDP-style sockets, id specifies the association to query.
4520 * If the id field is set to the value '0' then the locally bound 4532 * If the id field is set to the value '0' then the locally bound