If you can't set hashsize on nf_conntrack don't fail

pull/58/head
Darren Shepherd 2018-10-05 21:18:43 -07:00
parent 8060d56594
commit c47c6432f5
1 changed files with 4 additions and 1 deletions

View File

@ -81,7 +81,10 @@ func (rct realConntracker) SetMax(max int) error {
}
// TODO: generify this and sysctl to a new sysfs.WriteInt()
klog.Infof("Setting conntrack hashsize to %d", max/4)
return writeIntStringFile("/sys/module/nf_conntrack/parameters/hashsize", max/4)
if err := writeIntStringFile("/sys/module/nf_conntrack/parameters/hashsize", max/4); err != nil {
klog.Errorf("failed to set conntrack hashsize to %d: %v", max/4, err)
}
return nil
}
func (rct realConntracker) SetTCPEstablishedTimeout(seconds int) error {