HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: //usr/sbin/ip6tables
#!/bin/sh
# Copyright (c) 2000-2016 Synology Inc. All rights reserved.
#
# A version 6 iptables wrapper that aims to replace with original iptables
# This wrapper will excute the orginal iptables and retry when EAGAIN is received

RETRY_TIMES=5
RETRY_INTERVAL_MIN_SECS=1
RETRY_INTERVAL_MAX_SECS=3

i=0
while [ ${i} -lt ${RETRY_TIMES} ]; do
    /usr/bin/xtables-legacy-multi ip6tables $@
    originalExitCode=$?
    # Resource problem (resource temporarily unavailable)
    if [ ${originalExitCode} -ne 4 ]; then
        exit ${originalExitCode}
    fi
    sleep $((RETRY_INTERVAL_MIN_SECS + RANDOM % RETRY_INTERVAL_MAX_SECS))
    i=$((i+1))
done

exit ${originalExitCode}