diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2008-07-18 23:05:40 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 23:05:40 -0700 |
commit | 7dab83de50c7b2b7ceac695a0b56fa6c0f95b0bc (patch) | |
tree | 979c6905f2ef643acccfea9ab9ed926e764e72c8 /net/sctp/sm_make_chunk.c | |
parent | 6d0ccbac688207ca0616ab5094932af4db4747b3 (diff) |
sctp: Support ipv6only AF_INET6 sockets.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index bbc7107c86cf..e8ca4e54981f 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -2364,8 +2364,13 @@ static int sctp_process_param(struct sctp_association *asoc, case SCTP_PARAM_IPV6_ADDRESS: if (PF_INET6 != asoc->base.sk->sk_family) break; - /* Fall through. */ + goto do_addr_param; + case SCTP_PARAM_IPV4_ADDRESS: + /* v4 addresses are not allowed on v6-only socket */ + if (ipv6_only_sock(asoc->base.sk)) + break; +do_addr_param: af = sctp_get_af_specific(param_type2af(param.p->type)); af->from_addr_param(&addr, param.addr, htons(asoc->peer.port), 0); scope = sctp_scope(peer_addr); |