Commit cfa9794
committed
internal: send LOCAL_CLEANUP on forward delete
WOLFSSH_FWD_LOCAL_CLEANUP is part of the public WS_FwdCbAction contract
and the library never sent it, so an application's handler never ran and
every peer-opened forward leaked what its setup callback allocated.
ChannelDelete() now sends it, so a peer close, an open refused after the
setup ran, wolfSSH_ChannelFree(), and freeing the session all report it.
- record the setup in a new fwdSetupTxd bit on WOLFSSH_CHANNEL: a
locally opened forward gets no LOCAL_SETUP, so the channel type alone
cannot say whether the application holds anything
- clear the bit when the cleanup goes out, so a channel reports it once
- pass the channel's id in the port parameter, the way
WOLFSSH_FWD_CHANNEL_ID does, so an application with two forwards can
tell which one ended
- TestDirectTcpipFwdCbRejectsChannelId now counts three callback calls1 parent 557f3df commit cfa9794
3 files changed
Lines changed: 39 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3834 | 3834 | | |
3835 | 3835 | | |
3836 | 3836 | | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
3837 | 3868 | | |
3838 | 3869 | | |
3839 | 3870 | | |
3840 | 3871 | | |
3841 | 3872 | | |
3842 | 3873 | | |
| 3874 | + | |
3843 | 3875 | | |
3844 | 3876 | | |
3845 | 3877 | | |
| |||
12039 | 12071 | | |
12040 | 12072 | | |
12041 | 12073 | | |
| 12074 | + | |
| 12075 | + | |
| 12076 | + | |
12042 | 12077 | | |
12043 | 12078 | | |
12044 | 12079 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3242 | 3242 | | |
3243 | 3243 | | |
3244 | 3244 | | |
3245 | | - | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
3246 | 3248 | | |
3247 | 3249 | | |
3248 | 3250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1375 | 1375 | | |
1376 | 1376 | | |
1377 | 1377 | | |
| 1378 | + | |
1378 | 1379 | | |
1379 | 1380 | | |
1380 | 1381 | | |
| |||
0 commit comments