Lines Matching refs:peer
170 asoc->peer.rwnd = SCTP_DEFAULT_MAXWINDOW; in sctp_association_init()
206 INIT_LIST_HEAD(&asoc->peer.transport_addr_list); in sctp_association_init()
219 asoc->peer.sack_needed = 1; in sctp_association_init()
220 asoc->peer.sack_generation = 1; in sctp_association_init()
241 asoc->peer.ipv4_address = 1; in sctp_association_init()
243 asoc->peer.ipv6_address = 1; in sctp_association_init()
347 sctp_tsnmap_free(&asoc->peer.tsn_map); in sctp_association_free()
369 kfree(asoc->peer.cookie); in sctp_association_free()
370 kfree(asoc->peer.peer_random); in sctp_association_free()
371 kfree(asoc->peer.peer_chunks); in sctp_association_free()
372 kfree(asoc->peer.peer_hmacs); in sctp_association_free()
375 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { in sctp_association_free()
382 asoc->peer.transport_count = 0; in sctp_association_free()
430 if (asoc->peer.primary_path != NULL && in sctp_assoc_set_primary()
431 asoc->peer.primary_path != transport) in sctp_assoc_set_primary()
434 asoc->peer.primary_path = transport; in sctp_assoc_set_primary()
439 memcpy(&asoc->peer.primary_addr, &transport->ipaddr, in sctp_assoc_set_primary()
447 asoc->peer.active_path = transport; in sctp_assoc_set_primary()
482 struct sctp_transport *peer) in sctp_assoc_rm_peer() argument
489 __func__, asoc, &peer->ipaddr.sa); in sctp_assoc_rm_peer()
494 if (asoc->peer.retran_path == peer) in sctp_assoc_rm_peer()
498 list_del_rcu(&peer->transports); in sctp_assoc_rm_peer()
500 sctp_unhash_transport(peer); in sctp_assoc_rm_peer()
503 pos = asoc->peer.transport_addr_list.next; in sctp_assoc_rm_peer()
507 if (asoc->peer.primary_path == peer) in sctp_assoc_rm_peer()
509 if (asoc->peer.active_path == peer) in sctp_assoc_rm_peer()
510 asoc->peer.active_path = transport; in sctp_assoc_rm_peer()
511 if (asoc->peer.retran_path == peer) in sctp_assoc_rm_peer()
512 asoc->peer.retran_path = transport; in sctp_assoc_rm_peer()
513 if (asoc->peer.last_data_from == peer) in sctp_assoc_rm_peer()
514 asoc->peer.last_data_from = transport; in sctp_assoc_rm_peer()
517 asoc->strreset_chunk->transport == peer) { in sctp_assoc_rm_peer()
527 if (asoc->init_last_sent_to == peer) in sctp_assoc_rm_peer()
535 if (asoc->shutdown_last_sent_to == peer) in sctp_assoc_rm_peer()
542 asoc->addip_last_asconf->transport == peer) in sctp_assoc_rm_peer()
548 if (!list_empty(&peer->transmitted)) { in sctp_assoc_rm_peer()
549 struct sctp_transport *active = asoc->peer.active_path; in sctp_assoc_rm_peer()
552 list_for_each_entry(ch, &peer->transmitted, in sctp_assoc_rm_peer()
558 list_splice_tail_init(&peer->transmitted, in sctp_assoc_rm_peer()
572 if (ch->transport == peer) in sctp_assoc_rm_peer()
575 asoc->peer.transport_count--; in sctp_assoc_rm_peer()
577 sctp_ulpevent_notify_peer_addr_change(peer, SCTP_ADDR_REMOVED, 0); in sctp_assoc_rm_peer()
578 sctp_transport_free(peer); in sctp_assoc_rm_peer()
587 struct sctp_transport *peer; in sctp_assoc_add_peer() local
600 if (0 == asoc->peer.port) in sctp_assoc_add_peer()
601 asoc->peer.port = port; in sctp_assoc_add_peer()
604 peer = sctp_assoc_lookup_paddr(asoc, addr); in sctp_assoc_add_peer()
605 if (peer) { in sctp_assoc_add_peer()
610 if (peer->state == SCTP_UNKNOWN) { in sctp_assoc_add_peer()
611 peer->state = SCTP_ACTIVE; in sctp_assoc_add_peer()
613 return peer; in sctp_assoc_add_peer()
616 peer = sctp_transport_new(asoc->base.net, addr, gfp); in sctp_assoc_add_peer()
617 if (!peer) in sctp_assoc_add_peer()
620 sctp_transport_set_owner(peer, asoc); in sctp_assoc_add_peer()
625 peer->hbinterval = asoc->hbinterval; in sctp_assoc_add_peer()
626 peer->probe_interval = asoc->probe_interval; in sctp_assoc_add_peer()
628 peer->encap_port = asoc->encap_port; in sctp_assoc_add_peer()
631 peer->pathmaxrxt = asoc->pathmaxrxt; in sctp_assoc_add_peer()
634 peer->pf_retrans = asoc->pf_retrans; in sctp_assoc_add_peer()
636 peer->ps_retrans = asoc->ps_retrans; in sctp_assoc_add_peer()
641 peer->sackdelay = asoc->sackdelay; in sctp_assoc_add_peer()
642 peer->sackfreq = asoc->sackfreq; in sctp_assoc_add_peer()
648 peer->flowlabel = ntohl(info & IPV6_FLOWLABEL_MASK); in sctp_assoc_add_peer()
649 peer->flowlabel |= SCTP_FLOWLABEL_SET_MASK; in sctp_assoc_add_peer()
651 peer->flowlabel = asoc->flowlabel; in sctp_assoc_add_peer()
654 peer->dscp = asoc->dscp; in sctp_assoc_add_peer()
659 peer->param_flags = asoc->param_flags; in sctp_assoc_add_peer()
662 sctp_transport_route(peer, NULL, sp); in sctp_assoc_add_peer()
670 min_t(int, peer->pathmtu, asoc->pathmtu) : in sctp_assoc_add_peer()
671 peer->pathmtu); in sctp_assoc_add_peer()
673 peer->pmtu_pending = 0; in sctp_assoc_add_peer()
678 sctp_packet_init(&peer->packet, peer, asoc->base.bind_addr.port, in sctp_assoc_add_peer()
679 asoc->peer.port); in sctp_assoc_add_peer()
691 peer->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380)); in sctp_assoc_add_peer()
697 peer->ssthresh = SCTP_DEFAULT_MAXWINDOW; in sctp_assoc_add_peer()
699 peer->partial_bytes_acked = 0; in sctp_assoc_add_peer()
700 peer->flight_size = 0; in sctp_assoc_add_peer()
701 peer->burst_limited = 0; in sctp_assoc_add_peer()
704 peer->rto = asoc->rto_initial; in sctp_assoc_add_peer()
705 sctp_max_rto(asoc, peer); in sctp_assoc_add_peer()
708 peer->state = peer_state; in sctp_assoc_add_peer()
711 if (sctp_hash_transport(peer)) { in sctp_assoc_add_peer()
712 sctp_transport_free(peer); in sctp_assoc_add_peer()
716 sctp_transport_pl_reset(peer); in sctp_assoc_add_peer()
719 list_add_tail_rcu(&peer->transports, &asoc->peer.transport_addr_list); in sctp_assoc_add_peer()
720 asoc->peer.transport_count++; in sctp_assoc_add_peer()
722 sctp_ulpevent_notify_peer_addr_change(peer, SCTP_ADDR_ADDED, 0); in sctp_assoc_add_peer()
725 if (!asoc->peer.primary_path) { in sctp_assoc_add_peer()
726 sctp_assoc_set_primary(asoc, peer); in sctp_assoc_add_peer()
727 asoc->peer.retran_path = peer; in sctp_assoc_add_peer()
730 if (asoc->peer.active_path == asoc->peer.retran_path && in sctp_assoc_add_peer()
731 peer->state != SCTP_UNCONFIRMED) { in sctp_assoc_add_peer()
732 asoc->peer.retran_path = peer; in sctp_assoc_add_peer()
735 return peer; in sctp_assoc_add_peer()
746 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { in sctp_assoc_del_peer()
765 list_for_each_entry(t, &asoc->peer.transport_addr_list, in sctp_assoc_lookup_paddr()
781 list_for_each_entry_safe(t, temp, &asoc->peer.transport_addr_list, in sctp_assoc_del_nonprimary_peers()
948 active = asoc->peer.active_path; in sctp_assoc_lookup_tsn()
960 list_for_each_entry(transport, &asoc->peer.transport_addr_list, in sctp_assoc_lookup_tsn()
1039 asoc->peer.last_data_from = chunk->transport; in sctp_assoc_bh_rcv()
1110 asoc->peer.rwnd = new->peer.rwnd; in sctp_assoc_update()
1111 asoc->peer.sack_needed = new->peer.sack_needed; in sctp_assoc_update()
1112 asoc->peer.auth_capable = new->peer.auth_capable; in sctp_assoc_update()
1113 asoc->peer.i = new->peer.i; in sctp_assoc_update()
1115 if (!sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL, in sctp_assoc_update()
1116 asoc->peer.i.initial_tsn, GFP_ATOMIC)) in sctp_assoc_update()
1120 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { in sctp_assoc_update()
1160 list_for_each_entry(trans, &new->peer.transport_addr_list, in sctp_assoc_update()
1180 kfree(asoc->peer.peer_random); in sctp_assoc_update()
1181 asoc->peer.peer_random = new->peer.peer_random; in sctp_assoc_update()
1182 new->peer.peer_random = NULL; in sctp_assoc_update()
1184 kfree(asoc->peer.peer_chunks); in sctp_assoc_update()
1185 asoc->peer.peer_chunks = new->peer.peer_chunks; in sctp_assoc_update()
1186 new->peer.peer_chunks = NULL; in sctp_assoc_update()
1188 kfree(asoc->peer.peer_hmacs); in sctp_assoc_update()
1189 asoc->peer.peer_hmacs = new->peer.peer_hmacs; in sctp_assoc_update()
1190 new->peer.peer_hmacs = NULL; in sctp_assoc_update()
1276 struct sctp_transport *trans = asoc->peer.retran_path; in sctp_assoc_update_retran_path()
1280 if (asoc->peer.transport_count == 1) in sctp_assoc_update_retran_path()
1285 if (asoc->peer.active_path == asoc->peer.retran_path && in sctp_assoc_update_retran_path()
1286 asoc->peer.active_path->state == SCTP_ACTIVE) in sctp_assoc_update_retran_path()
1293 if (&trans->transports == &asoc->peer.transport_addr_list) in sctp_assoc_update_retran_path()
1302 if (trans == asoc->peer.retran_path) in sctp_assoc_update_retran_path()
1306 asoc->peer.retran_path = trans_next; in sctp_assoc_update_retran_path()
1309 __func__, asoc, &asoc->peer.retran_path->ipaddr.sa); in sctp_assoc_update_retran_path()
1318 list_for_each_entry(trans, &asoc->peer.transport_addr_list, in sctp_select_active_and_retran_path()
1352 if ((asoc->peer.primary_path->state == SCTP_ACTIVE || in sctp_select_active_and_retran_path()
1353 asoc->peer.primary_path->state == SCTP_UNKNOWN) && in sctp_select_active_and_retran_path()
1354 asoc->peer.primary_path != trans_pri) { in sctp_select_active_and_retran_path()
1356 trans_pri = asoc->peer.primary_path; in sctp_select_active_and_retran_path()
1370 trans_pri = sctp_trans_elect_best(asoc->peer.active_path, trans_pf); in sctp_select_active_and_retran_path()
1375 asoc->peer.active_path = trans_pri; in sctp_select_active_and_retran_path()
1376 asoc->peer.retran_path = trans_sec; in sctp_select_active_and_retran_path()
1388 return asoc->peer.active_path; in sctp_assoc_choose_alter_transport()
1390 if (last_sent_to == asoc->peer.retran_path) in sctp_assoc_choose_alter_transport()
1393 return asoc->peer.retran_path; in sctp_assoc_choose_alter_transport()
1434 list_for_each_entry(t, &asoc->peer.transport_addr_list, transports) { in sctp_assoc_sync_pmtu()
1517 asoc->peer.sack_needed = 0; in sctp_assoc_rwnd_increase()
1583 if (asoc->peer.ipv4_address) in sctp_assoc_set_bind_addr_from_ep()
1585 if (asoc->peer.ipv6_address) in sctp_assoc_set_bind_addr_from_ep()
1687 htonl(asoc->peer.addip_serial)) in sctp_assoc_clean_asconf_ack_cache()