Age | Commit message (Collapse) | Author |
|
am: 87b492fdcd
Change-Id: Iab91b0c164b9a4c8700d9041ba01307f2d28c4f5
|
|
am: bbe9a70a85
Change-Id: Id69ef48808b97459b15df51d0d966a9bfd7b3e4b
|
|
Test: none
Change-Id: I221265a452e12b168af8d4cca9a61f43946f8214
|
|
am: 8ab701a7e8
Change-Id: I8190fd98c880e3da56ca3dd4e89a13fc2da1b564
|
|
am: 9bccbbbd5f
Change-Id: I173918779387836537b029bf0f25f0e2edcabbe9
|
|
am: 731501919f
Change-Id: Ic392c08ee8972aa8ed7fa2a088d2a5ba6a278b04
|
|
Clang 6.0.1 update introduced a number of new warnings, failing
werror build. Ignore the -Wformat warning for external/dhcpcd-6.8.2.
Test: m checkbuild
Change-Id: Ia0624f0eedcf66c0c1ef6fa6479e895cf48d3662
|
|
f472281e9d
am: 9d31c1720e
Change-Id: I2b1f46d8408ca3f2645f0087240bbf27572fca38
|
|
am: f472281e9d
Change-Id: I67449c741531bdeb8d7fa5cd594850603f611e8c
|
|
am: 10a0659b1f
Change-Id: Ic22dcae34078ed6cbd94003c4d870e7336e31669
|
|
am: b828aa31f3
Change-Id: I5a82c57c065bb341fd35160f43fba81e423c82d7
|
|
* Suppress warnings of unused variables.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I981ad76ad8f79a2c1ebd05be2bdc91c98aae8e18
|
|
am: df64c96f01
* commit 'df64c96f01b3dd2a823d6aa788653c3bedd1efda':
Make dhcpcd-6.8.2 admit that it uses BSD extensions.
Change-Id: Ibcc09804d01f0105a14ad07615e39d8007b5d5cf
|
|
am: b74b4ad38f
* commit 'b74b4ad38fa162d3fe09e035fa570f419261c7dd':
Make dhcpcd-6.8.2 admit that it uses BSD extensions.
Change-Id: Idc1accf23b67aadda5894f902f6c06d59ae2ed01
|
|
Change-Id: I38e31b1e1eee0a456ebd602029198bb7907e1239
|
|
am: d088482545
* commit 'd0884825457b7117aa93514786b95731e2cb08d8':
Make dhcpcd-6.8.2 admit that it uses BSD extensions.
Change-Id: Ifd52e53f69050e9d20dc8b29f373e4c4d4a3e557
|
|
Not to be confused with external/dhcpcd. Of course we have two copies...
Change-Id: Ifa2393815ba020cd3bc108abeef9d79a083889dc
|
|
this change is needed for Android Virtual Device (AVD) on
GCE (Google Compute Engine).
Bug: 27336968
Change-Id: I838683a1ca6558d4226aa5b3b0d2996d0ecfaa72
|
|
This is the same CL as https://chromium-review.googlesource.com/#/c/320426/ and
is applied here to work correctly on Brillo
Make option vendor_encapsulated_options of type binhex and pass
VendorEncapsulatedOptions on dbus as a byte array
BUG: chromium:574578
TEST=run `dbus-monitor --system \
"type=signal,path=/org/chromium/dhcpcd,interface=org.chromium.dhcpcd,arg1='BOUND'"`
and check that VendorEncapsulatedOptions is sent as array of bytes
Change-Id: Icd9c6c1f73d5eb46a8eb04204e6d2cb039a38f45
|
|
option size
Ensure that option length fits inside data length less option size.
Thanks to Nico Golde for the report. Fixes CVE-2016-1504
http://roy.marples.name/projects/dhcpcd/ci/595883e2a431f65d?sbs=1
BUG: 26461547
Change-Id: I8bbb01eda998a0d7e552dcd4bf22db14c796d90e
|
|
dhcp_optlen now returns the length of the data we can sanely work on given the
option definition and data length. Call dhcp_optlen in dhcp_envoption1 to take
into ensure these bounds are not overstepped. Fixes an issue reported by Nico
Golde where extra undersized data was present in the option. An example of this
would be an array of uint16's with a trailing byte.
http://roy.marples.name/projects/dhcpcd/ci/76a1609352263bd9?sbs=0
BUG: 26402253
Change-Id: Ic3c73277bb1cc09be08b3fbceecb97e2effd05ff
|
|
Brillo builds can use minijail to change dhcpcd-6.8.2 uid and
gid, so do not use switch_user() in these builds.
BUG: 25083940
Change-Id: I175191142015298db1909ee660d2a67672a4508c
TEST: dhcpcd-6.8.2 runs as expected during weaved setup in brillo build.
|
|
Comment out this target and note that each target using
dhcpcd-6.8.2 should define its own source and destination
for the dhcpcd.conf file.
While there, remove android.conf since it is no longer
used by any target in dhcpcd-6.8.2.
BUG: None
Change-Id: I68d740633ab4d7e42e9661a7443ca53cb25aa4cc
|
|
We don't want to run any scripts for shill's usage.
Bug: 24372451
TEST=Use shill to connect to GoogleGuest, verify dhcpcd is not
TEST=trying to run any scripts based on the logs.
Change-Id: I77fc220dffe12aa54c8071981dab8c3ff778d71f
|
|
Have dhcpcd-6.8.2 switch itself to the dhcp uid and gid after
spawning. This assumes that dhcpcd-6.8.2 is started as root,
which is current the case when shill spawns it.
BUG: 24408645
TEST: dhcpcd-6.8.2 builds and is started successfully by shill.
Change-Id: Ia14c31ddd7ac06cc19f0541ae3c7bf0f019447ce
|
|
Update android.conf with the configuration options used
by dhcpcd in Chrome OS. This allows dhcpcd to behave
correctly during shill's configuration process.
While there, move the -DPASSIVE_MODE flag to the
LOCAL_CFLAGS variable, since it was previously not
being used in LOCAL_CPPFLAGS (dhcpcd-6.8.2 is written
entirely in C).
BUG: 24372451
Change-Id: I3cf5e8f685f57c04994a57ddfb960531c7821b04
|
|
Add comment in dhcpcd-6.8.2 Android.mk differentiating
dhcpcd-6.8.2 from dhcpcd.
BUG: 22956197
Change-Id: I5af1d4bd3f4f9d52cc2f36b8484544139687e25f
|
|
In if_discover, the interface struct's index member
(ifp->index) is assigned from the sll_ifindex member of
of ifa->if_addr (see if.c:490). However, this member is
not set in the get_interface function of ifaddrs.c. This
unitialized interface index member is later used to bind
a socket and send messages on it, which leads to errors.
Assign the interface index of selected interface in
get_interface to fix this.
BUG: 22956197
Change-Id: I41da8fc7abdf3f5fc05c1dc0446d2a1d9dc7557d
|
|
Add includes for the headers of the source files in
the compat/ directory that we use when compiling
dhcpcd-6.8.2. This prevents any conflicts with
similarly named headers in Android's include paths.
BUG: 22956197
Change-Id: I159d5d08fc0ffabcdfceec18e1546e8c5d3046c9
|
|
Add Android.mk file to build the dhcpcd-6.8.2 and dhcpcd-6.8.2.conf targets.
BUG: 22956197
Change-Id: I8eee7c5a5a4c632809047753b735222c42331437
TEST: Build android for a device that includes dhcpcd-6.8.2 and ensure
TEST: that the build succeeds.
|
|
Add an Android implementation of ifaddrs to the
dhcpcd-6.8.2 repo, which this daemon depends on.
ifaddr.c cherry-picked from
https://googleplex-android.git.corp.google.com/platform/external/dhcpcd/+/master
at 31db56e5b40726fed587656ac1730705c79741b9.
ifaddr.h cherry-picked from
https://googleplex-android.git.corp.google.com/platform/external/dhcpcd/+/master
at e86eee143ed21592f88a46623a81f71002430459.
BUG: 22956197
Change-Id: Id19c9ee8e7c0c32b36742052f9ee63dc197aa218
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-DHCPv6-Fix-prefix-
delegation-lease-file-name.patch.
For DHCPv6, daemon creates two lease files, one for non-temporary
address and the other for prefix delegation. Currently only non-temporary
address lease is using the lease identifier obtained from command line
for its file name, since dhcpcd is using a separate pseudo interface
for handling prefix delegation messages.
So fix it to have both lease files using the same identifier obtained
from the command line, with non-temporary address lease ends in ".lease6"
and prefix delegation ends is ".pd.lease6".
BUG: 22956197
Change-Id: I24ada24e791e0be77aaadd148349be00ef2b6966
Reviewed-on: https://chromium-review.googlesource.com/282041
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-UPSTREAM-Zero-Length-
Embedded-Option.patch.
When we have a zero length for an embedded option, warn if any
more data or not the last option and return the number of
currently processed options. This fixes a potential buffer
overrun for options where the last embedded optional is an
optional string. Thanks to Paul Stewart @ Chromium for the fix.
http://roy.marples.name/projects/dhcpcd/ci/732e88eaa0?sbs=0
BUG: 22956197
Change-Id: I0291624e28fcec8f4d6f3affeb8fec1fff332f19
Reviewed-on: https://chromium-review.googlesource.com/281000
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-ChromiumOS-DHCPv6-
support.patch.
Add support to emit DHCPv6 configuration/status updates through
DBus, and prevent the daemon from updating IPv6 system configurations.
Add command line option "-a" to enable ia options for shill usage,
since ia options can only be specified through the config file by
default. When "-a" option is enabled, the daemon will request ia_na
(Non-temporary Address) and ia_pd (Prefix Delegation) options from
the DHCPv6 server.
BUG: 22956197
Change-Id: I12ba8e72ec4f2e8aa1cede6c717f477be2df20ea
Reviewed-on: https://chromium-review.googlesource.com/275700
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Add-DBus-RPC-support.patch.
Porting the DBus support from version 5.1.4 and allow it to be
configurable through the package configuration. Removed the unused
and incomplete implemention for DBus method GetInterfaces and GetStatus.
Also: update the default lease file name to tailor around the
expectation of shill ("dhcpcd-%dev.lease).
Also: update the config file to meet shill's expectation.
BUG: 22956197
Change-Id: Ic729dffc6b14fed0b27ed0731c11ef609434e03c
Review URL: http://codereview.chromium.org/2428004
Review URL: http://codereview.chromium.org/2851022
Review URL: http://codereview.chromium.org/2851023
Review URL: http://codereview.chromium.org/2865017
Review URL: http://codereview.chromium.org/2965010
Review URL: http://codereview.chromium.org/2957010
Review URL: http://codereview.chromium.org/3060016
Reviewed-on: http://gerrit.chromium.org/gerrit/2228
Reviewed-on: https://gerrit.chromium.org/gerrit/22597
Reviewed-on: https://gerrit.chromium.org/gerrit/36716
Reviewed-on: https://gerrit.chromium.org/gerrit/38183
Reviewed-on: https://gerrit.chromium.org/gerrit/59967
Reviewed-on: https://chromium-review.googlesource.com/178462
Reviewed-on: https://chromium-review.googlesource.com/185086
Reviewed-on: https://chromium-review.googlesource.com/195269
Reviewed-on: https://chromium-review.googlesource.com/259072
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Improve-debugability.patch.
Increase log level for certain log messages and add more log messages
to improve debugability.
BUG: 22956197
Change-Id: Idec6362a13d946831c8f0837a4cfe31c2671665e
Reviewed-on: https://gerrit.chromium.org/gerrit/42622
Reviewed-on: https://chromium-review.googlesource.com/185511
Reviewed-on: https://chromium-review.googlesource.com/186593
Reviewed-on: https://chromium-review.googlesource.com/206143
Reviewed-on: https://gerrit.chromium.org/gerrit/24835
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/i
aster/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Add-ability-to-disable-
hook-scripts.patch.
This allow dhcpcd to be installed without hook scripts and bypassing
the hook script processing code.
BUG: 22956197
Change-Id: I47177410ac4516a0df27277f251f1ae0d632d770
Reviewed-on: https://chromium-review.googlesource.com/272614
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-UPSTREAM-Fix-ARP-
checking.patch.
Fix ARP checking logic and the usage of IN_IFF_TENTATIVE compiler flag
around ARP checking.
Upstream patch link:
http://roy.marples.name/projects/dhcpcd/info/fad4fae29d5d7dc9
http://roy.marples.name/projects/dhcpcd/info/9dcdaf2d1ef4a44d
BUG: 22956197
Change-Id: I1ba5c5d56a104cadf4566367408abb068b7e1268
Reviewed-on: https://chromium-review.googlesource.com/272614
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Add-RPC-support-for-
DHCPv4-client.patch.
Define a RPC interface for the daemon to interact with other
applications (command execution and status update), and integrate
it with the DHCPv4 client. Default to stub implementation for now
until new RPC mechanism is implemented and enabled.
Also add a new compiler flag "PASSIVE_MODE" which will be enabled
when a RPC mechanism is enabled (e.g. DBus). This compiler flag
will prevent the daemon from modifying system configurations
(e.g. routing table, interface address). The idea is that when
RPC is enabled, the daemon will provide configurations through
RPC, and the remote application will be the one responsible for
modifying system configurations.
Integration with DHCPv6 client will be added in the future.
BUG: 22956197
Change-Id: I7147d13e2cfab5c209c1ab862f33ef9d1b1dddaf
Reviewed-on: https://chromium-review.googlesource.com/208835
Review URL: http://codereview.chromium.org/3061018
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Add-option-definition-
for-Web-Proxy-Auto-Discovery.patch.
This option can be use to request Web Proxy Auto-Discovery info
from the DHCP server.
BUG: 22956197
Change-Id: I8ee0712ee9ce09202fefb02262812625a8138adc
Reviewed-on: https://gerrit.chromium.org/gerrit/59967
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Stop-ARP-probes-when-
conflict-is-detected.patch.
Currently, an ARP state is create for each IP when performing duplicate
address detection. However, when duplicate address is detected, the ARP
state for that IP doesn't get cleanup, causing the ARP request to be
sent continuously with a random timeout. All ARP states would eventually
get cleanup when a duplicate address detection succeed.
So clean up the ARP state when duplicate address is detected to avoid
generating unnecessary traffics and causing any problems with the dhcp
state machine.
BUG: 22956197
Change-Id: I0e6a2f14eb3871872dee409b6b0c87ec19c58bed
Reviewed-on: https://chromium-review.googlesource.com/272614
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Merge-in-DHCP-options-
from-the-original-offer.patch.
We've found that some APs respond to DHCP REQUEST messages with a
subset of the DHCP options that were present in the original DHCP
negotiation. Copy such options out of the stored lease and carry
them forward whenever a lease renewal succeeds.
BUG: 22956197
Change-Id: I9fa006535a67cdb3e25f7d02a8a81d051033922e
Reviewed-on: https://chromium-review.googlesource.com/195270
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Fix-OOB-read-in-dhcpcd.patch.
Should have done this sooner, but hey, late is better than never.
Based on https://googleplex-android-review.git.corp.google.com/#/c/588010/.
BUG: 22956197
Change-Id: I241cacc7c131237acbf1f8f011f1444e907eaebb
Reviewed-on: https://chromium-review.googlesource.com/242880
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Track-and-validate-
disputed-addresses.patch.
Keep track of whether we have received a NAK response. If we
accept an ACK shortly after a NAK, although we accept this
address, it must be more carefully evaluated by using the "ARP
for self" method. If this method succeeds, the system should
proceed as normal (either doing a gateway ARP or sending the
success notification via D-Bus).
Moreover, if the "ARP self" method fails, it will DECLINE the
lease and restart the DHCP process. When examining any messages
from the DHCP server in this restarted session, ignore the
first OFFER if it is for the previously declined IP address.
In scenarios where there may be more than one conflicting DHCP
server on the network, this allows the possibility to accept
a more viable offer.
BUG: 22956197
Change-Id: I3f2e6cfbaf9c14ce09218e817e2dd35517d78f85
Reviewed-on: https://chromium-review.googlesource.com/208273
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Accept-an-ACK-after-a-
NAK.patch.
When a NAK is received, wait for a response interval before
acting on it. In doing so, this allows for networks that
may have duelling DHCP servers which both consider themselves
authoritative on a network. Since other DHCP clients also
act in a similar manner, issues of this sort end up undetected
and network administrators thus consider this situation nominal.
BUG: 22956197
Change-Id: I8cceb03f8296abb4ee6bbdc87c222ae9234b3f5f
Reviewed-on: https://chromium-review.googlesource.com/208207
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Be-more-permissive-on-
NAKs.patch.
Previously, we'd reject NAKs that did not include a server ID.
Since we'd only check that a server ID was present, but did not
validate it against any stored state, the test is merely pedantic.
Moreover, some DHCP servers (e.g. OpenBSD 4.6) send NAK messages
without a server ID. [1]
To improve compatibility with real-world DHCP servers, drop the
check for the presence of a server ID.
BUG: 22956197
Change-Id: I11515205b89affde5bc61eb95e6615db450d6176
Reviewed-on: https://chromium-review.googlesource.com/194972
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Allow-lease-file-to-be-
set-on-command-line.patch.
Currently, dhcpcd names its lease files using the interface name
as the unique part of the name. There are a couple reasons why
this may not work well: firstly if "eth0" can have different MAC
addresses (multiple USB-Ethernet dongles for example) leases for
one interface aren't valid for the other. Secondly, when using
a wireless interface, it would be convenient to hold multiple
leases in parallel for each SSID one is connected to.
This change adds a suffix to each interface argument (dhcpcd can
accept multiple interface arguments) that specifies the identifier
to use to save lease files with. By default, the behavior is
identical.
The second CL (https://gerrit.chromium.org/gerrit/22170) for fixing
pid file formating bug originally introduced by this CL is not needed
anymore since this bug doesn't exist/apply in the updated implementation.
BUG: 22956197
Change-Id: Id04168daa965065ca50e60f55c4cdc80f751c9c3
Reviewed-on: https://gerrit.chromium.org/gerrit/21991
Reviewed-on: https://gerrit.chromium.org/gerrit/22170
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Fix-dhcpcd-running-as-a-
regular-user.patch.
Update the lease file permission to 0600 to prevent other
users from reading the lease file.
Moreover, also soften the log message shown when not running as root,
since by using Linux capabilities dhcpcd can run fine as a regular user.
BUG: 22956197
Change-Id: Ib6f4ae4a892c6f5697cd03e79e3aa018b80712fe
Reviewed-on: https://gerrit.chromium.org/gerrit/22644
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Teach-DHCP-client-to-do-
unicast-ARP-for-gatew.patch.
Implement RFC-4436 ("Detecting Network Attachment in IPv4 (DNAv4)").
Keep track of the MAC address of the default gateway in a file as
a part of the arpgw change ("-R" option), and append this info to
the end of the saved lease.
Implement a separate command line option ("-P") which will use
the MAC address stored in the lease to do a unicast ARP to the
default gateway saved in the lease. If this succeeds, notify
listeners that this succeeded, along with the contents of the lease,
but do not stop the normal DHCP process. This returns immediate,
fast feedback that our lease will likely work, but continues the
DHCP process so we know for sure.
BUG: 22956197
Change-Id: I4a494ff227b8bddac78e53c6354ebfa904bf384d
Reviewed-on: https://gerrit.chromium.org/gerrit/22643
|
|
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Optionally-ARP-for-gateway-
IP-address.patch.
If the "arpgw" option is enabled in the config, we ARP for
the gateway provided in the DHCP response as part of the
process of testing our lease. If this fails (ARP times
out) we DECLINE our lease in the hope that a new lease will
work better. This can allow us to work around issues with
infrastructures where IP address / MAC pairs are placed on
a "dummy" VLAN under certain conditions. Requesting a
different IP can sometimes help resolve this.
The code is setup so that for each dhcpcd instance, the
"arpgw" function is allowed to only fail once. This is
to protect ourselves from mistakenly diagnosing a bad
system, or from looping endlessly if the system is truly
hosed.
BUG: 22956197
Change-Id: I0f49882e85b2cac08dd3bd0046cacf564f8b4749
Reviewed-on: http://gerrit.chromium.org/gerrit/3080
Reviewed-on: http://gerrit.chromium.org/gerrit/3531
|