Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/ipv4/Kconfig net/ipv4/tcp_timer.c
This commit is contained in:
@@ -543,16 +543,20 @@ struct sctp_hmac *sctp_auth_asoc_get_hmac(const struct sctp_association *asoc)
|
||||
id = ntohs(hmacs->hmac_ids[i]);
|
||||
|
||||
/* Check the id is in the supported range */
|
||||
if (id > SCTP_AUTH_HMAC_ID_MAX)
|
||||
if (id > SCTP_AUTH_HMAC_ID_MAX) {
|
||||
id = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* See is we support the id. Supported IDs have name and
|
||||
* length fields set, so that we can allocated and use
|
||||
* them. We can safely just check for name, for without the
|
||||
* name, we can't allocate the TFM.
|
||||
*/
|
||||
if (!sctp_hmac_list[id].hmac_name)
|
||||
if (!sctp_hmac_list[id].hmac_name) {
|
||||
id = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
@@ -918,6 +918,11 @@ SCTP_STATIC int sctp_setsockopt_bindx(struct sock* sk,
|
||||
/* Walk through the addrs buffer and count the number of addresses. */
|
||||
addr_buf = kaddrs;
|
||||
while (walk_size < addrs_size) {
|
||||
if (walk_size + sizeof(sa_family_t) > addrs_size) {
|
||||
kfree(kaddrs);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
sa_addr = (struct sockaddr *)addr_buf;
|
||||
af = sctp_get_af_specific(sa_addr->sa_family);
|
||||
|
||||
@@ -1004,9 +1009,13 @@ static int __sctp_connect(struct sock* sk,
|
||||
/* Walk through the addrs buffer and count the number of addresses. */
|
||||
addr_buf = kaddrs;
|
||||
while (walk_size < addrs_size) {
|
||||
if (walk_size + sizeof(sa_family_t) > addrs_size) {
|
||||
err = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
sa_addr = (union sctp_addr *)addr_buf;
|
||||
af = sctp_get_af_specific(sa_addr->sa.sa_family);
|
||||
port = ntohs(sa_addr->v4.sin_port);
|
||||
|
||||
/* If the address family is not supported or if this address
|
||||
* causes the address buffer to overflow return EINVAL.
|
||||
@@ -1016,6 +1025,8 @@ static int __sctp_connect(struct sock* sk,
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
port = ntohs(sa_addr->v4.sin_port);
|
||||
|
||||
/* Save current address so we can work with it */
|
||||
memcpy(&to, sa_addr, af->sockaddr_len);
|
||||
|
||||
|
Reference in New Issue
Block a user