Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 2015 16:50:08 +0200 (CEST)
From:      elof2@sentor.se
To:        freebsd-net <freebsd-net@freebsd.org>
Subject:   sysctl and signed net.bpf.maxbufsize variable
Message-ID:  <alpine.BSF.2.00.1510211635320.49057@farmermaggot.shire.sentor.se>

next in thread | raw e-mail | index | archive | help

Isn't this a bug?

# sysctl net.bpf.maxbufsize=3000000000
net.bpf.maxbufsize: 524288 -> -1294967296

No error message and exit status is 0.


Shouldn't net.bpf.maxbufsize be unsigned?



I would like sysctl to have a crude sanity control and return an error if 
you set a positive value but the result becomes negative.


...and also have some specific sanity control to test if you try to set a 
value waaaay out of bounds (like setting net.bpf.maxbufsize to a value greater 
than the maximum RAM).

/Elof



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1510211635320.49057>