Commit Graph

168 Commits

Author SHA1 Message Date
Roy Marples
601fb3d500 Add (c) to Copyright 2009-05-01 13:57:45 +00:00
Roy Marples
c1b631bf93 Revert iforder -> interface_order 2009-04-20 10:02:17 +00:00
Roy Marples
e77f6a4514 Prefix interface vars with if so we don't stamp on generic names like 'flags'. 2009-04-20 09:37:11 +00:00
Roy Marples
6f767217f6 Add the ability to arping an address and select a profile based on the
hardware address replied with or the ip address.
2009-03-31 08:35:38 +00:00
Roy Marples
4a4bcf7cf5 Improve PTP INFORM support some more. 2009-03-23 22:02:37 +00:00
Roy Marples
b07b07c339 Export interface flags. 2009-03-23 12:56:33 +00:00
Roy Marples
263e8fdd42 Move dhcpf.h into dhcp.h were it belongs 2009-03-19 22:45:57 +00:00
Roy Marples
1abffd5ba5 We can now detected primary addresses added or changed in BSD.
As such, we can wait for a 3RDPARTY to configure the interface, such as PPP.
We can then take the destination addess and automatically give it a default
route or any other DHCP option such as DNS servers.
This addresses #159.
2009-03-19 17:52:12 +00:00
Roy Marples
a4f6339ebd We shouldn't need to flush arp entires ourself on BSD platforms. 2009-03-11 11:53:11 +00:00
Roy Marples
90bf8aef21 Don't add subnet routes to INADDR_ANY or those without a gateway. 2009-03-05 16:31:05 +00:00
Roy Marples
eab2229cfa Enforce NetBSD KNF style more 2009-02-11 17:56:22 +00:00
Roy Marples
2c8b080627 We should state which interface we're removing the route from correctly. 2009-01-27 20:57:27 +00:00
Roy Marples
fa344ba2b1 Add route removal detection to Linux.
This involved a rejig of the socket code so we can detect
if we removed the route or not.
2009-01-27 18:09:02 +00:00
Roy Marples
16687a3be1 We need to ensure that manual route deletions are deleted from our internal routing table also. Partial fix for #159. 2009-01-26 22:32:42 +00:00
Roy Marples
9a9fb78867 Report ssid for carrier events correctly. 2009-01-23 01:19:25 +00:00
Roy Marples
88a69342c8 ssid should be old_ and new_. 2009-01-22 23:52:20 +00:00
Roy Marples
bf91047e8f Report the fact we're wireless and our ssid 2009-01-22 22:52:41 +00:00
Roy Marples
5313b78124 --getinterfaces should be more than sufficient for the control socket. 2009-01-15 14:22:40 +00:00
Roy Marples
1ba422363a Store the reason we run the script against the interface state.
This enables us to query states via the control socket.
2009-01-13 17:04:28 +00:00
Roy Marples
e467f4b217 Remove the limit for the number of connections to the control socket.
Send the dhcpcd-run-hooks enviornment to listeners on the control socket.
2009-01-12 16:39:01 +00:00
Roy Marples
91a44b91b0 Add a static directive that allows the configuration of variables, which
supercedes any DHCP configured variables.
If ip_address is configured then we don't bother with a DHCP 
transaction.
2009-01-01 14:23:36 +00:00
Roy Marples
83b738f21f Plug a leak. 2008-12-16 13:35:05 +00:00
Roy Marples
9c30ffcfd6 Re work the route management so we deal with a changed route table in a renewal/rebind correctly. 2008-12-16 13:28:42 +00:00
Roy Marples
5aad14ecbd Default route is more descriptive. 2008-12-02 14:54:46 +00:00
Roy Marples
9928a3bb97 Save a malloc 2008-12-02 14:18:37 +00:00
Roy Marples
38d187ed86 Ensure we de-reference the old pointer from the open routes correctly when building lists. 2008-12-02 00:24:25 +00:00
Roy Marples
399b1c0151 Save a few more bytes. 2008-12-01 18:03:20 +00:00
Roy Marples
fb10befc1c Add desc_route to save some bytes. 2008-12-01 16:56:56 +00:00
Roy Marples
3a3c791b7a Don't manipulate subnet routes when they are INADDR_BROADCAST as they don't exist. 2008-11-24 22:30:41 +00:00
Roy Marples
eee1b3eed9 Fix changing routes on BSD. 2008-11-10 08:31:33 +00:00
Roy Marples
eae4f5b472 Get INFORM support almost working again. 2008-10-18 16:41:19 +00:00
Roy Marples
35a8183fb9 static objects are initialized to 0 by default, so don't explicity do this. 2008-10-06 12:45:32 +00:00
Roy Marples
afc7387846 We need to flush the ARP table after configuring new routes. 2008-09-15 19:15:52 +00:00
Roy Marples
1da85ce390 Add subnet routes to our routing table so we can change them for systems without metrics. 2008-09-15 16:53:11 +00:00
Roy Marples
441f7d159d Remove remembering routes per interface and have a global routing table so we can change routes depending on interface state. This is very useful for the BSD's where there is no route metric. 2008-09-12 18:08:07 +00:00
Roy Marples
2b60ecb71e Sort interfaces according to preference and pass this to dhcpcd-run-hooks so we can prefer configs. 2008-09-09 17:07:48 +00:00
Roy Marples
cf7a295fa3 On Linux, fix replacing the kernel added subnet route correctly for metrics. 2008-09-08 11:30:31 +00:00
Roy Marples
765fbf7db0 Remove logger and exclusively uses syslog instead. This saves almost 2K on NetBSD/amd64 from before changing strerror to %m. 2008-09-05 18:24:34 +00:00
Roy Marples
f6de5860b6 As our logger calls emulate syslog, we can use %m. However, this means we have to convert it for printf as POSIX does not require that printf supports it. This also means we drop -pedantic from our GCC flags. 2008-09-05 13:12:35 +00:00
Roy Marples
686608c28c Add the remembered routes in reverse order. This saves having to reverse them later, and uses less code. Remember the new subnet route when changing it for the metric. 2008-09-04 22:41:33 +00:00
Roy Marples
fd05b7dcfc Add an event loop.
Split client.c into smaller files and functions and
recode around the event loop.
Add multiple interface support using the new event loop.
Document changes and outstanding bugs.
2008-09-02 13:28:11 +00:00
Roy Marples
4cec793b24 Fix INFORM and document it in dhcpcd-run-hooks. 2008-08-13 19:41:40 +00:00
Roy Marples
6b842b3c9f Rename exec_script to run_script. Split the exec/fork part to static exec_script. This allows us to use vfork and stop gcc complaining about exec stamping on the env variable. 2008-08-11 09:28:53 +00:00
Roy Marples
523f398e5e Remove loads of code specific to fork()less systems. dhcpcd no longer backgrounds on these systems, but is a lot lighter. 2008-08-11 08:32:52 +00:00
Roy Marples
37e7de1899 DHCP_option -> DHO_option. 2008-08-08 17:55:48 +00:00
Roy Marples
b8b4be9a39 Remove #ifdefs to disable specific bits of code. We now build everything - we're small enough :) 2008-07-23 17:06:42 +00:00
Roy Marples
991f1ad654 No need to check for this error code. 2008-07-19 14:14:40 +00:00
Roy Marples
90b99acc91 Don't report deleteing a non existant address on FreeBSD. 2008-07-19 14:04:18 +00:00
Roy Marples
378b071611 Report the reason we exec the script and don't error on deleting non existant routes on Linux. 2008-07-09 21:15:26 +00:00
Roy Marples
21d9edf8f3 removing -> deleting and don't report error on routes already deleted. 2008-07-09 10:24:17 +00:00