diff options
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/ipv6.c | 5 | ||||
-rw-r--r-- | net/sctp/outqueue.c | 3 | ||||
-rw-r--r-- | net/sctp/proc.c | 20 | ||||
-rw-r--r-- | net/sctp/protocol.c | 3 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 2 |
5 files changed, 25 insertions, 8 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 87f940587d5f..4862835b0c39 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -257,7 +257,7 @@ static struct dst_entry *sctp_v6_get_dst(struct sctp_association *asoc, | |||
257 | NIP6(fl.fl6_src)); | 257 | NIP6(fl.fl6_src)); |
258 | } | 258 | } |
259 | 259 | ||
260 | dst = ip6_route_output(NULL, &fl); | 260 | dst = ip6_route_output(&init_net, NULL, &fl); |
261 | if (!dst->error) { | 261 | if (!dst->error) { |
262 | struct rt6_info *rt; | 262 | struct rt6_info *rt; |
263 | rt = (struct rt6_info *)dst; | 263 | rt = (struct rt6_info *)dst; |
@@ -313,7 +313,8 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc, | |||
313 | __FUNCTION__, asoc, dst, NIP6(daddr->v6.sin6_addr)); | 313 | __FUNCTION__, asoc, dst, NIP6(daddr->v6.sin6_addr)); |
314 | 314 | ||
315 | if (!asoc) { | 315 | if (!asoc) { |
316 | ipv6_get_saddr(dst, &daddr->v6.sin6_addr,&saddr->v6.sin6_addr); | 316 | ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, |
317 | &daddr->v6.sin6_addr, &saddr->v6.sin6_addr); | ||
317 | SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n", | 318 | SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n", |
318 | NIP6(saddr->v6.sin6_addr)); | 319 | NIP6(saddr->v6.sin6_addr)); |
319 | return; | 320 | return; |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 1bb3c5c35d2a..fd4deefab3cf 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -494,6 +494,8 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport, | |||
494 | */ | 494 | */ |
495 | if (transport == transport->asoc->peer.retran_path) | 495 | if (transport == transport->asoc->peer.retran_path) |
496 | sctp_assoc_update_retran_path(transport->asoc); | 496 | sctp_assoc_update_retran_path(transport->asoc); |
497 | transport->asoc->rtx_data_chunks += | ||
498 | transport->asoc->unack_data; | ||
497 | break; | 499 | break; |
498 | case SCTP_RTXR_FAST_RTX: | 500 | case SCTP_RTXR_FAST_RTX: |
499 | SCTP_INC_STATS(SCTP_MIB_FAST_RETRANSMITS); | 501 | SCTP_INC_STATS(SCTP_MIB_FAST_RETRANSMITS); |
@@ -504,6 +506,7 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport, | |||
504 | break; | 506 | break; |
505 | case SCTP_RTXR_T1_RTX: | 507 | case SCTP_RTXR_T1_RTX: |
506 | SCTP_INC_STATS(SCTP_MIB_T1_RETRANSMITS); | 508 | SCTP_INC_STATS(SCTP_MIB_T1_RETRANSMITS); |
509 | transport->asoc->init_retries++; | ||
507 | break; | 510 | break; |
508 | default: | 511 | default: |
509 | BUG(); | 512 | BUG(); |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 973f1dbc2ec3..ddca90e5e3a5 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -279,8 +279,10 @@ static void * sctp_assocs_seq_start(struct seq_file *seq, loff_t *pos) | |||
279 | *pos = 0; | 279 | *pos = 0; |
280 | 280 | ||
281 | if (*pos == 0) | 281 | if (*pos == 0) |
282 | seq_printf(seq, " ASSOC SOCK STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT " | 282 | seq_printf(seq, " ASSOC SOCK STY SST ST HBKT " |
283 | "RPORT LADDRS <-> RADDRS\n"); | 283 | "ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT " |
284 | "RPORT LADDRS <-> RADDRS " | ||
285 | "HBINT INS OUTS MAXRT T1X T2X RTXC\n"); | ||
284 | 286 | ||
285 | return (void *)pos; | 287 | return (void *)pos; |
286 | } | 288 | } |
@@ -319,15 +321,21 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v) | |||
319 | assoc = sctp_assoc(epb); | 321 | assoc = sctp_assoc(epb); |
320 | sk = epb->sk; | 322 | sk = epb->sk; |
321 | seq_printf(seq, | 323 | seq_printf(seq, |
322 | "%8p %8p %-3d %-3d %-2d %-4d %4d %8d %8d %7d %5lu %-5d %5d ", | 324 | "%8p %8p %-3d %-3d %-2d %-4d " |
325 | "%4d %8d %8d %7d %5lu %-5d %5d " | ||
326 | "%8lu %5d %5d %4d %4d %4d %8d ", | ||
323 | assoc, sk, sctp_sk(sk)->type, sk->sk_state, | 327 | assoc, sk, sctp_sk(sk)->type, sk->sk_state, |
324 | assoc->state, hash, assoc->assoc_id, | 328 | assoc->state, hash, |
329 | assoc->assoc_id, | ||
325 | assoc->sndbuf_used, | 330 | assoc->sndbuf_used, |
326 | atomic_read(&assoc->rmem_alloc), | 331 | atomic_read(&assoc->rmem_alloc), |
327 | sock_i_uid(sk), sock_i_ino(sk), | 332 | sock_i_uid(sk), sock_i_ino(sk), |
328 | epb->bind_addr.port, | 333 | epb->bind_addr.port, |
329 | assoc->peer.port); | 334 | assoc->peer.port, |
330 | 335 | assoc->hbinterval, assoc->c.sinit_max_instreams, | |
336 | assoc->c.sinit_num_ostreams, assoc->max_retrans, | ||
337 | assoc->init_retries, assoc->shutdown_retries, | ||
338 | assoc->rtx_data_chunks); | ||
331 | seq_printf(seq, " "); | 339 | seq_printf(seq, " "); |
332 | sctp_seq_dump_local_addrs(seq, epb); | 340 | sctp_seq_dump_local_addrs(seq, epb); |
333 | seq_printf(seq, "<-> "); | 341 | seq_printf(seq, "<-> "); |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 688546dccd82..8d9d929f6cea 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -629,6 +629,9 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
629 | struct sctp_sockaddr_entry *addr = NULL; | 629 | struct sctp_sockaddr_entry *addr = NULL; |
630 | struct sctp_sockaddr_entry *temp; | 630 | struct sctp_sockaddr_entry *temp; |
631 | 631 | ||
632 | if (ifa->ifa_dev->dev->nd_net != &init_net) | ||
633 | return NOTIFY_DONE; | ||
634 | |||
632 | switch (ev) { | 635 | switch (ev) { |
633 | case NETDEV_UP: | 636 | case NETDEV_UP: |
634 | addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC); | 637 | addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC); |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index f2ed6473feef..ade0cbd3a52b 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -5312,6 +5312,8 @@ sctp_disposition_t sctp_sf_t2_timer_expire(const struct sctp_endpoint *ep, | |||
5312 | SCTP_DEBUG_PRINTK("Timer T2 expired.\n"); | 5312 | SCTP_DEBUG_PRINTK("Timer T2 expired.\n"); |
5313 | SCTP_INC_STATS(SCTP_MIB_T2_SHUTDOWN_EXPIREDS); | 5313 | SCTP_INC_STATS(SCTP_MIB_T2_SHUTDOWN_EXPIREDS); |
5314 | 5314 | ||
5315 | ((struct sctp_association *)asoc)->shutdown_retries++; | ||
5316 | |||
5315 | if (asoc->overall_error_count >= asoc->max_retrans) { | 5317 | if (asoc->overall_error_count >= asoc->max_retrans) { |
5316 | sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, | 5318 | sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, |
5317 | SCTP_ERROR(ETIMEDOUT)); | 5319 | SCTP_ERROR(ETIMEDOUT)); |