Commit ed087c6b authored by Darren Shepherd's avatar Darren Shepherd

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

parent 7303013c
......@@ -81,7 +81,10 @@ func (rct realConntracker) SetMax(max int) error {
}
// TODO: generify this and sysctl to a new sysfs.WriteInt()
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 {
......
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