Message ID | mbkeoa$26l$1@ger.gmane.org |
---|---|
State | Rejected |
Delegated to: | Steven Barth |
Headers | show |
On 13 February 2015 at 17:05, Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> wrote: > Currently, if you have dual WAN and the link needed for 6rd is down, it > just silently fails. This patch makes it retry in case the link comes up. > > Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> > --- a/package/network/ipv6/6rd/files/6rd.sh (revision 44437) > +++ b/package/network/ipv6/6rd/files/6rd.sh (working copy) > @@ -33,7 +33,8 @@ > fi > > if ! network_get_ipaddr ipaddr "$wanif"; then > - proto_notify_error "$cfg" "NO_WAN_LINK" > + sleep 60 > + proto_setup_failed "$cfg" > return A wild guess is that `return 1` or `exit 1` should do the trick. yousong > fi > } > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
On Fri, 13 Feb 2015 20:09:40 +0800, Yousong Zhou wrote: > A wild guess is that `return 1` or `exit 1` should do the trick. > > yousong No, the return value is ignored.
What does that "sleep 60" do for you here? It doesn't look very sane to me.
On Mon, 16 Feb 2015 09:37:18 +0100, Steven Barth wrote: > What does that "sleep 60" do for you here? It doesn't look very sane to > me. Without it, it retries every couple of seconds, and that really bogs down the CPU.
--- a/package/network/ipv6/6rd/files/6rd.sh (revision 44437) +++ b/package/network/ipv6/6rd/files/6rd.sh (working copy) @@ -33,7 +33,8 @@ fi if ! network_get_ipaddr ipaddr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" + sleep 60 + proto_setup_failed "$cfg" return fi }
Currently, if you have dual WAN and the link needed for 6rd is down, it just silently fails. This patch makes it retry in case the link comes up. Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>