tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysctl to disable protocol stack

    Date:        Wed, 9 Dec 2009 11:47:30 +0200
    From:        Alan Barrett <>
    Message-ID:  <>

  | This looks useful, but I'd prefer enabled=0 instread of disabled=1.
  | Similarly for function and variable names in the code.

So would I, but that's too hard ...   it means every domain struct, for
every protocol (ours, and any that any third party add) needs to have
the enabled field set - NetBSD could do that in the init function, since
we know it would need to be done (we want the protocols enabled by
default, not disabled, I think) - but we can't expect external protocols
that may be added in to know that they have to do that.

Having the var be "disabled" then just riding on the "not initialised,
starts as 0" (hence, not disabled) C init feature means that there's no
need to even think about doing anything to protocols that we don't
want to explicitly add "disableable" support to.

It also happens that having explicit disable bits allows some quite
strange but interesting artifacts (you can leave support for IPv6 enabled,
but refuse all incoming connection requests for example - or perhaps do that
to v4, to encourage people to use v6 to connect to you).  This one wasn't
a design aim (the previous one was a requirement) but just fell out of
the way it got implemented, and we kept it...


Home | Main Index | Thread Index | Old Index