diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-15 03:34:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-15 03:34:44 -0400 |
commit | 63fe46da9c380b3f2bbdf3765044649517cc717c (patch) | |
tree | 9478c1aca1d692b408955aea20c9cd9a37e589c0 /net/sctp | |
parent | 99dd1a2b8347ac2ae802300b7862f6f7bcf17139 (diff) | |
parent | 066b2118976e6e7cc50eed39e2747c75343a23c4 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-4965-rs.c
drivers/net/wireless/rt2x00/rt61pci.c
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 81b606424e12..bbc7107c86cf 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -2418,7 +2418,8 @@ static int sctp_process_param(struct sctp_association *asoc, | |||
2418 | break; | 2418 | break; |
2419 | 2419 | ||
2420 | case SCTP_PARAM_IPV6_ADDRESS: | 2420 | case SCTP_PARAM_IPV6_ADDRESS: |
2421 | asoc->peer.ipv6_address = 1; | 2421 | if (PF_INET6 == asoc->base.sk->sk_family) |
2422 | asoc->peer.ipv6_address = 1; | ||
2422 | break; | 2423 | break; |
2423 | 2424 | ||
2424 | case SCTP_PARAM_HOST_NAME_ADDRESS: | 2425 | case SCTP_PARAM_HOST_NAME_ADDRESS: |
@@ -2829,6 +2830,19 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc, | |||
2829 | addr_param = (union sctp_addr_param *) | 2830 | addr_param = (union sctp_addr_param *) |
2830 | ((void *)asconf_param + sizeof(sctp_addip_param_t)); | 2831 | ((void *)asconf_param + sizeof(sctp_addip_param_t)); |
2831 | 2832 | ||
2833 | switch (addr_param->v4.param_hdr.type) { | ||
2834 | case SCTP_PARAM_IPV6_ADDRESS: | ||
2835 | if (!asoc->peer.ipv6_address) | ||
2836 | return SCTP_ERROR_INV_PARAM; | ||
2837 | break; | ||
2838 | case SCTP_PARAM_IPV4_ADDRESS: | ||
2839 | if (!asoc->peer.ipv4_address) | ||
2840 | return SCTP_ERROR_INV_PARAM; | ||
2841 | break; | ||
2842 | default: | ||
2843 | return SCTP_ERROR_INV_PARAM; | ||
2844 | } | ||
2845 | |||
2832 | af = sctp_get_af_specific(param_type2af(addr_param->v4.param_hdr.type)); | 2846 | af = sctp_get_af_specific(param_type2af(addr_param->v4.param_hdr.type)); |
2833 | if (unlikely(!af)) | 2847 | if (unlikely(!af)) |
2834 | return SCTP_ERROR_INV_PARAM; | 2848 | return SCTP_ERROR_INV_PARAM; |