You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a firewall rule on my router for my yi cameras which prevents any internet access in or out to ensure unintended connections are not possible. The intent of the code in check_update.sh is to check to see if a new version is available via a wget from git and, if unsuccessful following 10 failures, make no further attempts.
I run a private DNS server and i noticed a lot of requests from my yi cameras trying to get the IP for git. The attempts would be every few seconds and happen continuously throughout the day. As my private DNS server is on my LAN the cameras can access it, so while they can request the IP they are unable to download the file. It appears that if the file cant be downloaded it retries forever.
To Reproduce
Steps to reproduce the behaviour:
make sure updates are set to on
Allow the DNS to resolve (unsure if this is the cause, it just allowed me to see the problem)
block internet connections for the cameras ip
restart the camera
monitor the DNS requests and you'll see continuous attempts
Obviously the above would occur if they have no internet connection or git it down etc...
Expected behaviour
Once check_updates.sh is triggered by cron, it should stop any further attempts after 10 failures as the code intended.
Technical Details
I believe its bcause the N_RETRY variable to store the number of attempts is not being set correctly. It uses the following to increment the number of tries:
((N_RETRY++))
While this will work on some shells, it wont work on all of them. I tried this on my CentOS machine and it will increment the variable. I SSHd into the camera and attempted the same and it errored.
I believe the code should do the following instead:
N_RETRY=$(( N_RETRY+1 ))
My current work around is to set the updates to off which is the default anyway.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have a firewall rule on my router for my yi cameras which prevents any internet access in or out to ensure unintended connections are not possible. The intent of the code in check_update.sh is to check to see if a new version is available via a wget from git and, if unsuccessful following 10 failures, make no further attempts.
I run a private DNS server and i noticed a lot of requests from my yi cameras trying to get the IP for git. The attempts would be every few seconds and happen continuously throughout the day. As my private DNS server is on my LAN the cameras can access it, so while they can request the IP they are unable to download the file. It appears that if the file cant be downloaded it retries forever.
To Reproduce
Steps to reproduce the behaviour:
Obviously the above would occur if they have no internet connection or git it down etc...
Expected behaviour
Once check_updates.sh is triggered by cron, it should stop any further attempts after 10 failures as the code intended.
Technical Details
I believe its bcause the N_RETRY variable to store the number of attempts is not being set correctly. It uses the following to increment the number of tries:
((N_RETRY++))
While this will work on some shells, it wont work on all of them. I tried this on my CentOS machine and it will increment the variable. I SSHd into the camera and attempted the same and it errored.
I believe the code should do the following instead:
N_RETRY=$(( N_RETRY+1 ))
My current work around is to set the updates to off which is the default anyway.
The text was updated successfully, but these errors were encountered: