fix for kernels with no NETLINK_NO_ENOBUFS defined

netlink.c: In function 'netlink_socket':
netlink.c:84:41: error: 'NETLINK_NO_ENOBUFS' undeclared (first use in
this function)
netlink.c:84:41: note: each undeclared identifier is reported only
once for each function it appears in
make[2]: *** [netlink.o] Error 1

This is obvious as my kernel-sources have no "NETLINK_NO_ENOBUFS" definition
in "include/linux/netlink.h".

The culprit is the else-if line here:

[ netlink.c ]

int netlink_socket(void)
{
...
        if (sock == -1) {
                flog(LOG_ERR, "Unable to open netlink socket: %s", strerror(errno));
        }
        else if (setsockopt(sock, SOL_NETLINK, NETLINK_NO_ENOBUFS, &val, sizeof(val)) < 0 ) {
                flog(LOG_ERR, "Unable to setsockopt NETLINK_NO_ENOBUFS: %s", strerror(errno));
        }
...

The NETLINK_NO_ENOBUFS socket flag was first introduced with Linux-kernel
v2.6.29-rc7:

   commit 38938bfe3489394e2eed5e40c9bb8f66a2ce1405
   "netlink: add NETLINK_NO_ENOBUFS socket flag"

The issue in radvd was introduced with:

   commit de9a8849258b2a6a125d686dcb9c424affad354d
   "setsockopt NETLINK_NO_ENOBUFS"

I have added extra checks for SOL_NETLINK and NETLINK_NO_ENOBUFS definitions
which fixes the issue for me.

NOTE: Compile-tested only!
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Performance fix in netlink message processing

When running 'top', I sometimes see RADVD consuming a lot of CPU (some
times close to 50%).  I put some debug statements into RADVD, and have
found that RADVD listens to a netlink socket, and basically reloads the
configuration file for every netlink message it receives, regardless of
content.  I have seen more than 60 reloads in a single second, which
are generally triggered for Wireless Extension events for one of the
wireless interfaces.  There currently is a patch
(https://dev.openwrt.org/browser/packages/ipv6/radvd/patches/100-silent-netlink-config-reload.patch)
that attempts to silence the logging of the reloads, but this is really
just masking the problem, and poorly at that.  It seems like RADVD
should be filtering the netlink messages down to what it cares about,
and only then triggering the reload.
IPv6 forwarding setting should be 1 or 2

A value of 2 means that the kernel has enabled IP forwarding and that it
also will perform router solicitation. Whilst this kind of setup may
appear unusual; it is reasonably widely used especially for consumer
devices which will have a WAN link (e.g. ppp, etc.)
update CHANGES and VERSION