shill: Enable and disable reverse-path filtering
When an http proxy request is active (as well as portal check, when
that gets written), we need to initiate connections over a non-default
network interface. For this we temporarily disable reverse-path
filtering on the interface during the duration of the request.
BUG=chromium-os:24141
TEST=New unit tests for HTTPProxy and Connection
Change-Id: Ife2ad775fd8a3d2fb48f860e804eeb442dc5c58a
Reviewed-on: https://gerrit.chromium.org/gerrit/12889
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/device.h b/device.h
index c10d6d0..85bf29b 100644
--- a/device.h
+++ b/device.h
@@ -79,6 +79,14 @@
virtual void EnableIPv6();
virtual void EnableIPv6Privacy();
+ // Request the removal of reverse-path filtering for this interface.
+ // This will allow packets destined for this interface to be accepted,
+ // even if this is not the default route for such a packet to arrive.
+ virtual void DisableReversePathFilter();
+
+ // Request reverse-path filtering for this interface.
+ virtual void EnableReversePathFilter();
+
// Returns true if the selected service on the device (if any) is connected.
// Returns false if there is no selected service, or if the selected service
// is not connected.
@@ -181,6 +189,9 @@
static const char kIPFlagDisableIPv6[];
static const char kIPFlagUseTempAddr[];
static const char kIPFlagUseTempAddrUsedAndDefault[];
+ static const char kIPFlagReversePathFilter[];
+ static const char kIPFlagReversePathFilterEnabled[];
+ static const char kIPFlagReversePathFilterLooseMode[];
static const char kStoragePowered[];
static const char kStorageIPConfigs[];