Commit 8a4ba73
committed
setconfig: fix crash on dynamic multi-value plugin options
We had an assert(!(ot->type & OPT_MULTI)) which crashed when using
setconfig on a plugin option marked as both dynamic and multi.
The fix changes plugin_set_dynamic_opt to accept an array of values
(scalar options pass a 1-element array, multi options pass the complete
set). For multi options, setconfig replaces ALL values atomically - an
empty array clears them.
Fixes: #8295
Changelog-Fixed: setconfig no longer crashes on dynamic multi-value plugin options1 parent 7e9ec3e commit 8a4ba73
File tree
14 files changed
+952
-563
lines changed- cln-grpc
- proto
- src
- cln-rpc/src
- common
- contrib
- msggen/msggen
- pyln-grpc-proto/pyln/grpc
- pyln-testing/pyln/testing
- doc/schemas
- lightningd
- tests
- plugins
14 files changed
+952
-563
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3706 | 3706 | | |
3707 | 3707 | | |
3708 | 3708 | | |
| 3709 | + | |
3709 | 3710 | | |
3710 | 3711 | | |
3711 | 3712 | | |
3712 | | - | |
| 3713 | + | |
| 3714 | + | |
3713 | 3715 | | |
3714 | 3716 | | |
3715 | 3717 | | |
| |||
13028 | 13030 | | |
13029 | 13031 | | |
13030 | 13032 | | |
| 13033 | + | |
| 13034 | + | |
| 13035 | + | |
| 13036 | + | |
13031 | 13037 | | |
13032 | 13038 | | |
13033 | 13039 | | |
| |||
13044 | 13050 | | |
13045 | 13051 | | |
13046 | 13052 | | |
| 13053 | + | |
| 13054 | + | |
| 13055 | + | |
| 13056 | + | |
13047 | 13057 | | |
13048 | 13058 | | |
13049 | 13059 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
111 | 119 | | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32674 | 32674 | | |
32675 | 32675 | | |
32676 | 32676 | | |
| 32677 | + | |
| 32678 | + | |
| 32679 | + | |
| 32680 | + | |
| 32681 | + | |
| 32682 | + | |
| 32683 | + | |
| 32684 | + | |
| 32685 | + | |
32677 | 32686 | | |
32678 | 32687 | | |
32679 | 32688 | | |
32680 | | - | |
| 32689 | + | |
32681 | 32690 | | |
32682 | 32691 | | |
32683 | 32692 | | |
| |||
32704 | 32713 | | |
32705 | 32714 | | |
32706 | 32715 | | |
32707 | | - | |
32708 | 32716 | | |
32709 | 32717 | | |
32710 | 32718 | | |
| |||
32717 | 32725 | | |
32718 | 32726 | | |
32719 | 32727 | | |
32720 | | - | |
| 32728 | + | |
| 32729 | + | |
| 32730 | + | |
| 32731 | + | |
| 32732 | + | |
| 32733 | + | |
| 32734 | + | |
| 32735 | + | |
| 32736 | + | |
| 32737 | + | |
| 32738 | + | |
32721 | 32739 | | |
32722 | 32740 | | |
32723 | 32741 | | |
| |||
32764 | 32782 | | |
32765 | 32783 | | |
32766 | 32784 | | |
| 32785 | + | |
| 32786 | + | |
| 32787 | + | |
| 32788 | + | |
| 32789 | + | |
| 32790 | + | |
| 32791 | + | |
| 32792 | + | |
| 32793 | + | |
| 32794 | + | |
32767 | 32795 | | |
32768 | 32796 | | |
32769 | 32797 | | |
| |||
32821 | 32849 | | |
32822 | 32850 | | |
32823 | 32851 | | |
| 32852 | + | |
| 32853 | + | |
| 32854 | + | |
| 32855 | + | |
| 32856 | + | |
| 32857 | + | |
| 32858 | + | |
| 32859 | + | |
| 32860 | + | |
| 32861 | + | |
| 32862 | + | |
| 32863 | + | |
| 32864 | + | |
| 32865 | + | |
| 32866 | + | |
| 32867 | + | |
| 32868 | + | |
| 32869 | + | |
| 32870 | + | |
| 32871 | + | |
| 32872 | + | |
| 32873 | + | |
| 32874 | + | |
| 32875 | + | |
| 32876 | + | |
| 32877 | + | |
| 32878 | + | |
| 32879 | + | |
| 32880 | + | |
| 32881 | + | |
| 32882 | + | |
32824 | 32883 | | |
32825 | 32884 | | |
32826 | 32885 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2021 | 2021 | | |
2022 | 2022 | | |
2023 | 2023 | | |
| 2024 | + | |
| 2025 | + | |
2024 | 2026 | | |
2025 | 2027 | | |
2026 | 2028 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
39 | | - | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
63 | 72 | | |
64 | 73 | | |
65 | 74 | | |
66 | | - | |
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
| |||
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
79 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
80 | 98 | | |
81 | 99 | | |
82 | 100 | | |
| |||
123 | 141 | | |
124 | 142 | | |
125 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
126 | 154 | | |
127 | 155 | | |
128 | 156 | | |
| |||
180 | 208 | | |
181 | 209 | | |
182 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
183 | 242 | | |
184 | 243 | | |
185 | 244 | | |
0 commit comments