Commit Graph

16 Commits

Author SHA1 Message Date
Nicholas J. Kain
82d9682ed8 Update to latest ncmlib changes. 2014-03-30 17:02:48 -04:00
Nicholas J. Kain
abda60e0e9 Remove unused defines. 2014-03-28 11:17:52 -04:00
Nicholas J. Kain
22dcfc00ee Enable seccomp-filter if CMake detects that host is x86_64 or x86. 2014-03-21 23:52:15 -04:00
Nicholas J. Kain
b6444fa806 Don't strip the generated executables by default. 2014-03-14 20:49:03 -04:00
Nicholas J. Kain
84b36f0e02 Remove -Wcast-qual. The warnings are not useful on the ndhc code, and
I would effectively end up silencing them via the (uintptr_t) casting
hack.
2014-03-10 22:56:01 -04:00
Nicholas J. Kain
85fcc1e8f0 Use stricter gcc warning flags by default. 2014-03-10 18:34:53 -04:00
Nicholas J. Kain
1824802fb2 Merge ifchd into ndhc. Rather than function as entirely separate daemons,
ndhc will fork off an ifchd child that it will communicate with via
pipes rather than by connecting to a SO_PEERCRED AF_UNIX socket.

The advantages include:

1. Simpler configuration.  Much easier for users and packagers to set up.
2. Drastically less complex code for the ifch functionality.  More code
   is removed than added, and the result is a lot less complex.
3. Potentially better security.  The ifch can only service the parent
   ndhc process, and it is restricted to issuing modifications to
   the single interface that ndhc manages.
4. Less memory used on systems that allow overcommit.

The downsides:

1. Possibly more memory used on systems that run multiple ndhcs and use
   strict commit limits.

At the same time, use netlink rather than ioctls so that the
interface ip, subnet, and broadcast address can be set simultaneously.
This change reduces the netlink notification spam greatly.

The current code builds but isn't yet complete.  Subsequent commits will
flesh things out and polish out some remaining issues.
2014-03-10 00:52:56 -04:00
Nicholas J. Kain
c3c76e48d5 Enable stricter warnings on format strings. 2012-04-03 10:04:47 -04:00
Nicholas J. Kain
ab4a2e0b97 Switch to using clock_gettime() rather than gettimeofday(). 2011-07-31 01:27:59 -04:00
Nicholas J. Kain
7e1e902b34 Share ifchd command defines between ifchd and ndhc. 2011-07-25 02:01:38 -04:00
Nicholas J. Kain
2aff36a274 Provide a gmake Makefile for distro builds and packagers.
Define _GNU_SOURCE in the CFLAGS.
Update the README.
Remove the duplicate Gentoo init script ndhc.sh that is in the root.
Remove DESIGN -- it's outdated.
2011-07-12 04:09:05 -04:00
Nicholas J. Kain
01c4731403 Make sure that the netlink socket will never block after program
initialization.  Fetching if/address/index/mac mappings is done only once at
program init, so it is done synchronously as an exception to this rule.

Rewrite the netlink handling.  Now uses NIH code that should be safe, small,
and correct.  No external deps FTW.
2011-07-03 17:30:55 -04:00
Nicholas J. Kain
17570e9a38 Rewrite the netlink handling code to use libmnl. The size cost is very small,
and it is hard to do netlink completely correctly as it is poorly documented.
2011-07-02 01:34:50 -04:00
Nicholas J. Kain
b882669f85 Convert to using shared ncmlib. 2010-11-12 05:42:07 -05:00
Nicholas J. Kain
b42eeb8847 Move ifchd files to a subdirectory. 2010-11-12 04:51:49 -05:00
Nicholas J. Kain
c999fee9f5 Initial CMake support.
Fix an off-by-one array initialization.
Clean up VERSION a bit.
2010-11-12 04:44:25 -05:00