On Sat, Sep 12, 2020 at 04:36:28PM +0200, Florian Obser wrote:
> ... say if you pull a usb stick.
...or if you play with^W^Wrecreate your trunk0 { em0 athn0 } uplink
without checking unwind.
Without this diff, unwind cannot recover; with it, stuff just works for
me across destroy/create.
OK kn
> diff --git resolver.c resolver.c
> index 874ad5e76b3..8cf72db7250 100644
> --- resolver.c
> +++ resolver.c
> @@ -1952,10 +1952,13 @@ replace_autoconf_forwarders(struct imsg_rdns_proposal
> *rdns_proposal)
> }
>
> TAILQ_FOREACH(tmp, &autoconf_forwarder_list, entry) {
> - /* if_index of zero signals to clear all proposals */
> - if (rdns_proposal->src == tmp->src &&
> - (rdns_proposal->if_index == 0 || rdns_proposal->if_index ==
> - tmp->if_index))
> + /*
> + * if_index of zero signals to clear all proposals
> + * src of zero signals interface gone
> + */
> + if ((rdns_proposal->src == 0 || rdns_proposal->src ==
> + tmp->src) && (rdns_proposal->if_index == 0 ||
> + rdns_proposal->if_index == tmp->if_index))
Bit hard to read, what about aligning like this?
+ if ((rdns_proposal->src == 0 ||
+ rdns_proposal->src == tmp->src) &&
+ (rdns_proposal->if_index == 0 ||
+ rdns_proposal->if_index == tmp->if_index))
> continue;
> if ((uw_forwarder = calloc(1, sizeof(struct uw_forwarder))) ==
> NULL)