Roy Marples
32aaa4c963
Build fixes for only INET and only INET6
2013-11-14 15:48:07 +00:00
Roy Marples
a68c246036
Support older udev versions where we need to rely on udev-settle.
2013-09-12 16:46:41 +00:00
Roy Marples
413652c1b3
Instead of linking directly to libudev, create a plugin system for /dev
...
management. This allows dhcpcd to work even if udev removed and adds the
ability to change from udev to something else in the future.
2013-09-12 15:43:20 +00:00
Roy Marples
c0dd39cd08
Only start on settled devices.
2013-09-09 18:17:54 +00:00
Roy Marples
27f61373d1
It seems that FreeBSD will send RTM_DELADDR + RTM_NEWADDR when
...
replacing an existing IPv4 address with the same values.
As such, we need to maintain a list of configured IPv4 addresses
for each interface so we know when to add it and when to skip it
to avoid receiving bogus RTM_DELADDR messages from ourself.
2013-09-06 09:38:24 +00:00
Roy Marples
e82129a42c
Reduce code size by merging IPv6 ND with RS.
2013-08-20 10:29:43 +00:00
Roy Marples
fcb6db8681
Try and fix bringing up virtual interfaces on BSD
2013-08-18 15:35:40 +00:00
Roy Marples
1f4c1525a5
Purge prefix list and routers at start of IPv6 for BSD.
...
Remove link_addr compact function as we now had a LL address list.
Fix INET and INET6 seperate compiles.
2013-06-10 00:56:54 +00:00
Roy Marples
d5690e937b
Because not all OS's send RTM_NEWADDR for a refreshed RA we need
...
to manage a list of all IPv6 addresses on an interface so that we
can know if we need to wait for DAD to complete or not.
2013-06-09 07:31:08 +00:00
Roy Marples
336dd1b83b
Move signal handling into dhcpcd.c
...
Log the PID of the signal caller
Move syslog functions out of the signal handler if we're not
exiting as it's not safe.
Close existing IPv4 sockets when restarting an interface.
Fix control handling keeping current flags and accepting new ones.
2013-06-07 12:44:19 +00:00
Roy Marples
5369feb4e7
On Linux, PPP interfaces do not have a hardware address, so
...
get the ifindex via if_nametoindex(3).
Also, don't record an error restoring kernel RA settings for
a removed interface.
Thanks to Sergey Fionov.
2013-05-30 21:01:48 +00:00
Roy Marples
fefc5353f3
Use LINK_UP/DOWN instead of magic numbers
2013-05-30 07:51:02 +00:00
Roy Marples
c5d2e393a5
Move SIOCGIFAFLAG_IN6 into if-bsd as in6_addr_flags
...
Add pfx_flush to flush ND6 entries when changing routes.
Both these functions only work for BSD, just stubs on Linux.
This tidies the code a little and fixes changing IPv6 routes on BSD,
although the kernel may complain network is down for a few moments.
2013-05-30 05:38:21 +00:00
Roy Marples
49c6102339
Fix non FreeBSD compiles
2013-05-23 08:17:00 +00:00
Roy Marples
4c80d49c44
Fix compile on FreeBSD
...
Document why we don't set IN6_IFF_TENTATIVE when adding addresses
and a possible error on FreeBSD.
2013-05-22 18:16:32 +00:00
Roy Marples
4e39089aa5
Get local link address flags for supported OS's.
...
Just in-case they are tentative.
2013-05-18 15:30:55 +00:00
Roy Marples
9be80cbed3
Fix an alignment error
2013-05-17 23:24:07 +00:00
Roy Marples
5331b839c9
Store IPv6 link local addresses per interface.
...
Listen to kernel messages to account them.
If we don't have a local link address, delay IPv6RS as it just
won#t work until we have a local link address.
2013-05-17 23:09:36 +00:00
Roy Marples
8cc47ba26d
White space police
2013-04-04 20:31:04 +00:00
Roy Marples
4b0cbc8974
Use a TAILQ macro for our interface list.
2013-02-19 13:37:42 +00:00
Roy Marples
10e17e3f63
Remove xzalloc function
2013-02-15 21:45:08 +00:00
Roy Marples
aae24feb3d
It's now possible to compile out IPv4 and IPv6 support by passing
...
--disable-ipv4 or --disable-ipv6 to configure.
2013-02-04 13:30:35 +00:00
Roy Marples
e88c525f50
Move ipv4 specific code out of net.c and into ipv4.c
2013-02-04 11:03:08 +00:00
Roy Marples
95fdd136ae
Move if_state into interface->if_data as dhcp_state.
...
This should reduce memory usage for non IPv4 interfaces.
2013-02-03 22:55:45 +00:00
Roy Marples
5dc65f77b3
Move ipv4 specific infos from interface to if_state.
2013-02-03 14:52:24 +00:00
Roy Marples
875979f614
Move options away from ipv4 state to the interface.
2013-02-03 10:35:59 +00:00
Roy Marples
d7555c1259
Add DHCPv6 INFORM support.
...
This is automatically started when RA flags O is set.
If no DHCPv6 request options are configured in dhcpcd.conf then we
request domain servers and search lists.
2012-10-12 10:31:51 +00:00
Roy Marples
eebe9a1887
Improve IPv6 RA support by allowing dhcpcd to manage the address and routes
...
instead of the kernel. dhcpcd will only do this if RA is disabled in the kernel
or dhcpcd has been instructed to do this via dhcpcd.conf(5) ipv6ra_own and
ipv6ra_own_default directives.
Send and process IPv6 Neighbor Solicitions and Adverts to prove router
reachability. If a router cannot be reached in this way then it is expired.
When debugging, all ND messages are displayed which will create a lot of log
spam.
To ease packaging, ./configure now accepts LDFLAGS and --enable-static.
2012-07-05 16:37:41 +00:00
Roy Marples
d08933a85d
Fix compile on Linux
2012-03-30 09:42:01 +00:00
Roy Marples
2c77247bd0
Interface index should persist and be unique for the interface lifetime.
...
As such, store it at discover and stop using if_nametoindex(3).
2012-03-30 09:37:21 +00:00
Roy Marples
c73d67fcf3
Remove FreeBSD memory debug as I submitted a fix for their libc: PR bin/166483.
2012-03-29 09:11:48 +00:00
roy@uberlaptop.marples.name
dcc1e564e7
Fix some valgrind errors on FreeBSD
2012-03-27 16:30:33 +00:00
roy@uberlaptop.marples.name
ba0bc18bcb
FreeBSD 7 does not support IFT_INFINIBAND
2012-03-21 19:11:07 +00:00
Roy Marples
8cf1f9a8ca
Support bridge and VLAN interfaces on BSD.
...
Fall back to ethernet if unknown and specified.
2012-03-20 09:19:01 +00:00
Roy Marples
46caaa5ee4
Store the RA data for the interface so we can do a comparison.
...
Only log the fact we received an RA if the new RA is different or any
part of the old one has expired.
2012-02-13 08:37:54 +00:00
Roy Marples
37eea8615a
When the dhcp server is running in dom0 and the client in domU,
...
packets (that are not explicitely checksumed in the userspace)
sent to the another domain have partial UDP checksums (offload)
only, but are marked as such. This patch reads and checks the
mark to decide whether to verify the UDP checksum or not.
Based on the ISC dhcp patch by David Cantrell.
Thanks to Marius Tomaschewski.
2011-03-24 17:59:20 +00:00
Roy Marples
6b5542f174
Fix working out the inform address if none given.
2010-11-11 21:07:50 +00:00
Roy Marples
462822d281
Use the active link layer address if supported.
2010-08-04 06:44:56 +00:00
Roy Marples
7b6f803e29
These files were updated in 2010, so fix copyrights.
2010-06-04 08:33:16 +00:00
Roy Marples
58c910e8b7
Randomize ip_id and remove IPTOS_LOWDELAY and IP_DF flags.
...
This makes us a better net citizen.
2010-03-12 20:33:15 +00:00
Roy Marples
255e14dab1
Enable net.ipv4.conf.$iface.promote_secondaries on Linux so that
...
we keep the subnet when changing addresses on the same subnet.
2010-02-26 20:37:30 +00:00
Roy Marples
cbd2877694
Don't warn about unsupported family for infiniband.
...
Thanks to Aurelien.
2010-01-13 23:54:45 +00:00
Roy Marples
305352558c
Style
2009-12-14 14:46:54 +00:00
Roy Marples
68510bef05
If we have to bring an interface up, and we don't have any carriers
...
then we need to wait for a second to allow an interface to settle.
2009-11-20 15:14:27 +00:00
Roy Marples
9579be23a9
Only work with ethernet by default so firewire does not slow down the boot.
2009-10-15 07:32:49 +00:00
Roy Marples
8ab2df96b1
Just have one open socket for AF_NET.
2009-10-15 00:30:54 +00:00
Roy Marples
355889a91c
Remove the -w option and make it the default action if at least one
...
interface reports a carrier.
2009-10-14 15:16:07 +00:00
Roy Marples
6b8f0f11ba
We should not affect other interfaces when handling new interface
...
notifications.
2009-09-01 07:45:11 +00:00
Roy Marples
7201382072
Whitespace.
2009-08-12 08:38:41 +00:00
Roy Marples
bcaed78bc5
Don't check family on point to point interfaces as we monitor them.
2009-08-05 21:39:42 +00:00