[NAT]: Update the conntrack entries timeout to Max value after warmboot (#4596)
Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com> All new NAT conntrack entries are added to kernel with max entry timeout of 432000 and setting the same timeout during system warm reboot also
This commit is contained in:
parent
7a6fca2f98
commit
525029e3d8
@ -36,7 +36,7 @@ def add_nat_conntrack_entry_in_kernel(ipproto, srcip, dstip, srcport, dstport, n
|
||||
if (ipproto == IP_PROTO_TCP):
|
||||
state = ' --state ESTABLISHED '
|
||||
ctcmd = 'conntrack -I -n ' + natdstip + ':' + natdstport + ' -g ' + natsrcip + ':' + natsrcport + \
|
||||
' --protonum ' + ipproto + state + ' --timeout 600 --src ' + srcip + ' --sport ' + srcport + \
|
||||
' --protonum ' + ipproto + state + ' --timeout 432000 --src ' + srcip + ' --sport ' + srcport + \
|
||||
' --dst ' + dstip + ' --dport ' + dstport + ' -u ASSURED'
|
||||
subprocess.call(ctcmd, shell=True)
|
||||
logger.info("Restored NAT entry: {}".format(ctcmd))
|
||||
|
Reference in New Issue
Block a user