On Wed, Mar 19, 2014 at 3:15 PM, Felix Fietkau <n...@openwrt.org> wrote:
> On 2014-03-14 10:14, Helmut Schaa wrote:
>> Introduce a new device event "topology change" that gets signaled
>> by bridges on adding/removing members.
>>
>> On "topology changes" the proto handlers are requested to "renew"
>> which is most useful for DHCP.
>>
>> Signed-off-by: Helmut Schaa <helmut.sc...@googlemail.com>
> [...]
>> diff --git a/scripts/netifd-proto.sh b/scripts/netifd-proto.sh
>> index 7f08b1d..debfaa7 100644
>> --- a/scripts/netifd-proto.sh
>> +++ b/scripts/netifd-proto.sh
>> @@ -20,6 +20,11 @@ _proto_do_teardown() {
>>       eval "proto_$1_teardown \"$interface\" \"$ifname\""
>>  }
>>
>> +_proto_do_renew() {
>> +     json_load "$data"
>> +     eval "proto_$1_renew \"$interface\" \"$ifname\""
>> +}
>> +
>>  _proto_do_setup() {
>>       json_load "$data"
>>       _EXPORT_VAR=0
> The code should check if proto_*_renew exists (or add a default handler
> for it) to avoid error logspam. Maybe it would even be useful for
> proto-shell.c to check if renew is supported at init time (to avoid
> useless shell callouts for proto handlers that don't support renew).

Good point. Let me respin ...
Helmut
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to