diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index e45be4e3f80d..578630e8e00d 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -2375,6 +2375,14 @@ static int sctp_process_param(struct sctp_association *asoc, | |||
2375 | asoc->peer.ipv4_address = 0; | 2375 | asoc->peer.ipv4_address = 0; |
2376 | asoc->peer.ipv6_address = 0; | 2376 | asoc->peer.ipv6_address = 0; |
2377 | 2377 | ||
2378 | /* Assume that peer supports the address family | ||
2379 | * by which it sends a packet. | ||
2380 | */ | ||
2381 | if (peer_addr->sa.sa_family == AF_INET6) | ||
2382 | asoc->peer.ipv6_address = 1; | ||
2383 | else if (peer_addr->sa.sa_family == AF_INET) | ||
2384 | asoc->peer.ipv4_address = 1; | ||
2385 | |||
2378 | /* Cycle through address types; avoid divide by 0. */ | 2386 | /* Cycle through address types; avoid divide by 0. */ |
2379 | sat = ntohs(param.p->length) - sizeof(sctp_paramhdr_t); | 2387 | sat = ntohs(param.p->length) - sizeof(sctp_paramhdr_t); |
2380 | if (sat) | 2388 | if (sat) |