MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sctp_asconf_process_param_ack

Function sctp_asconf_process_param_ack

freebsd/netinet/sctp_asconf.c:1614–1648  ·  view source on GitHub ↗

* process an asconf queue param. * aparam: parameter to process, will be removed from the queue. * flag: 1=success case, 0=failure case */

Source from the content-addressed store, hash-verified

1612 * flag: 1=success case, 0=failure case
1613 */
1614static void
1615sctp_asconf_process_param_ack(struct sctp_tcb *stcb,
1616 struct sctp_asconf_addr *aparam, uint32_t flag)
1617{
1618 uint16_t param_type;
1619
1620 /* process this param */
1621 param_type = aparam->ap.aph.ph.param_type;
1622 switch (param_type) {
1623 case SCTP_ADD_IP_ADDRESS:
1624 SCTPDBG(SCTP_DEBUG_ASCONF1,
1625 "process_param_ack: added IP address\n");
1626 sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, flag);
1627 break;
1628 case SCTP_DEL_IP_ADDRESS:
1629 SCTPDBG(SCTP_DEBUG_ASCONF1,
1630 "process_param_ack: deleted IP address\n");
1631 /* nothing really to do... lists already updated */
1632 break;
1633 case SCTP_SET_PRIM_ADDR:
1634 SCTPDBG(SCTP_DEBUG_ASCONF1,
1635 "process_param_ack: set primary IP address\n");
1636 /* nothing to do... peer may start using this addr */
1637 break;
1638 default:
1639 /* should NEVER happen */
1640 break;
1641 }
1642
1643 /* remove the param and free it */
1644 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aparam, next);
1645 if (aparam->ifa)
1646 sctp_free_ifa(aparam->ifa);
1647 SCTP_FREE(aparam, SCTP_M_ASC_ADDR);
1648}
1649
1650/*
1651 * cleanup from a bad asconf ack parameter

Callers 1

sctp_handle_asconf_ackFunction · 0.85

Calls 2

sctp_free_ifaFunction · 0.85

Tested by

no test coverage detected