diff options
Diffstat (limited to 'net/sctp/sm_sideeffect.c')
-rw-r--r-- | net/sctp/sm_sideeffect.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 4e4ca65cd320..42bbb2410550 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -961,6 +961,29 @@ static int sctp_cmd_send_msg(struct sctp_association *asoc, | |||
961 | } | 961 | } |
962 | 962 | ||
963 | 963 | ||
964 | /* Sent the next ASCONF packet currently stored in the association. | ||
965 | * This happens after the ASCONF_ACK was succeffully processed. | ||
966 | */ | ||
967 | static void sctp_cmd_send_asconf(struct sctp_association *asoc) | ||
968 | { | ||
969 | /* Send the next asconf chunk from the addip chunk | ||
970 | * queue. | ||
971 | */ | ||
972 | if (!list_empty(&asoc->addip_chunk_list)) { | ||
973 | struct list_head *entry = asoc->addip_chunk_list.next; | ||
974 | struct sctp_chunk *asconf = list_entry(entry, | ||
975 | struct sctp_chunk, list); | ||
976 | list_del_init(entry); | ||
977 | |||
978 | /* Hold the chunk until an ASCONF_ACK is received. */ | ||
979 | sctp_chunk_hold(asconf); | ||
980 | if (sctp_primitive_ASCONF(asoc, asconf)) | ||
981 | sctp_chunk_free(asconf); | ||
982 | else | ||
983 | asoc->addip_last_asconf = asconf; | ||
984 | } | ||
985 | } | ||
986 | |||
964 | 987 | ||
965 | /* These three macros allow us to pull the debugging code out of the | 988 | /* These three macros allow us to pull the debugging code out of the |
966 | * main flow of sctp_do_sm() to keep attention focused on the real | 989 | * main flow of sctp_do_sm() to keep attention focused on the real |
@@ -1616,6 +1639,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
1616 | } | 1639 | } |
1617 | error = sctp_cmd_send_msg(asoc, cmd->obj.msg); | 1640 | error = sctp_cmd_send_msg(asoc, cmd->obj.msg); |
1618 | break; | 1641 | break; |
1642 | case SCTP_CMD_SEND_NEXT_ASCONF: | ||
1643 | sctp_cmd_send_asconf(asoc); | ||
1644 | break; | ||
1619 | default: | 1645 | default: |
1620 | printk(KERN_WARNING "Impossible command: %u, %p\n", | 1646 | printk(KERN_WARNING "Impossible command: %u, %p\n", |
1621 | cmd->verb, cmd->obj.ptr); | 1647 | cmd->verb, cmd->obj.ptr); |