Commit f87faa58 authored by Darren Shepherd's avatar Darren Shepherd

Make hashsize setting optional

parent 9d40deeb
...@@ -81,7 +81,10 @@ func (rct realConntracker) SetMax(max int) error { ...@@ -81,7 +81,10 @@ func (rct realConntracker) SetMax(max int) error {
} }
// TODO: generify this and sysctl to a new sysfs.WriteInt() // TODO: generify this and sysctl to a new sysfs.WriteInt()
glog.Infof("Setting conntrack hashsize to %d", max/4) glog.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 {
glog.Errorf("failed to set conntrack hashsize to %d: %v", max/4, err)
}
return nil
} }
func (rct realConntracker) SetTCPEstablishedTimeout(seconds int) error { func (rct realConntracker) SetTCPEstablishedTimeout(seconds int) error {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment