Commit Graph

21 Commits

Author SHA1 Message Date
04840c261d Fix some c99 struct initializer uninitialized member warnings
that clang detects and GCC misses.
2015-02-13 23:25:42 -05:00
702d8b0c5b Mark pointer arguments that cannot ever be null as [static 1].
Also constify some cases, too.
2015-02-13 23:14:08 -05:00
911d4cc58e Fix the dhcp state bootstrapping when rfkill is set #3. 2015-02-13 19:08:50 -05:00
2e679ed491 Fix the dhcp state bootstrapping when rfkill is set #2. 2015-02-13 18:35:44 -05:00
a8af406307 Fix the dhcp state bootstrapping when rfkill is set. 2015-02-13 18:07:14 -05:00
79a97131bc Handle the case where the rfkill is set when ndhc is initializing. 2015-02-13 17:50:24 -05:00
cf81573082 Fix a dumb typo in the previous commit. 2015-02-13 16:56:56 -05:00
e3d4d4c1aa rfkill: Add support for reacting to radio kill switch events.
In order for this to work, the correct rfkill index must be specified
with the rfkill-idx option.

It might be possible to auto-detect the corresponding rfkill-idx option,
but I'm not sure if there's a guaranteed mapping between rfkill name and
interface name, as it seems that rfkills should represent phy devices
and not wlan devices.

The rfkill indexes can be found by checking
/sys/class/rfkill/rfkill<IDX>.
2015-02-13 16:25:36 -05:00
c58a071f52 Update copyright dates. 2015-02-13 01:54:57 -05:00
07cbd88049 Just use raw sockets for listening to DHCP requests. A UDP SO_BROADCAST
socket was previously used only for receiving RENEWING packets, and it
added needless complexity and was somewhat fragile.
2014-04-16 01:00:36 -04:00
0884d96d1e PR_SET_PDEATHSIG is not fully reliable, so instead maintain a pair of
AF_UNIX SOCK_STREAM sockets between the master processes and each subprocess,
and poll for the HUP event.

At the same time, be specific about the events that are checked in epoll
when dispatching on an event.
2014-04-15 23:19:24 -04:00
e526adce19 Make the signal handling code use safe_read() and unify ifchd and sockd
signals code.
2014-04-15 20:55:13 -04:00
b00444ab8b Bound the subprocess lifetime using prctl(PR_SET_PDEATHSIG, ...).
The pipes wouldn't do this job anymore because they were unused and thus
never performed writes that would generate SIGPIPEs, so the pipes are
removed, too.
2014-04-15 18:01:01 -04:00
730e5ef310 setpgid() can return EPERM if we are already a process group leader. 2014-04-15 15:02:20 -04:00
a777766cc6 Fix stupid typo in ndhc.c that would cause the clientid option to
corrupt the start of the hostname option if both were specified.
2014-04-15 14:55:50 -04:00
a501789e04 Parse config options with ragel and support a configuration file. 2014-04-14 15:06:31 -04:00
d267c2c44b Use the raw capability interface via updated ncmlib rather than linking
to libcap.
2014-04-07 15:05:34 -04:00
5fa2030bab Use a socketpair rather than a pair of pipes for communication between
ndhc and ifch, similar to sockd.  A single pipe is also maintained so
that SIGPIPE can bound the lifetime of an orphaned ifch process.
2014-04-07 03:44:02 -04:00
e2ee728982 Consolidate all of the global static variables in arp.c into a single
struct, and use booleans where appropriate.
2014-04-06 22:12:31 -04:00
a86363f248 Create a new process ID group for ndhc. 2014-04-06 22:07:12 -04:00
b761889025 Move source from ndhc/ to src/ since ifchd is no longer a separate program. 2014-04-06 16:57:06 -04:00