patchpanel: implement traffic tagging for ConnectNamespace

This patch adds fwmark tagging to traffic from network namespaces
configured with the patchpanel ConnectNamespace DBus API. Both the
source tag and the routing tag are added.

The ConnectNamespace implementation has now 3 distinct routing mode:
 - tracking default physical network (previously only available mode),
 - tracking default logical network, physical or VPN,
 - tracking a specific physical network, a-la ARC.

BUG=b:174811524
BUG=b:161508179
BUG=chromium:1156894
TEST=unit tests. $ tast run <DUT_ip> network.TestProxyServer, checked
rules set in iptables -t mangle -L PREROUTING and -L POSTROUTING.

Change-Id: I10d9ea2da6e206f8f2d5270df8680d4351818a97
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2574147
Tested-by: Hugo Benichi <hugobenichi@google.com>
Commit-Queue: Hugo Benichi <hugobenichi@google.com>
Reviewed-by: Garrick Evans <garrick@chromium.org>
diff --git a/patchpanel/mock_datapath.h b/patchpanel/mock_datapath.h
index d78d791..aecda79 100644
--- a/patchpanel/mock_datapath.h
+++ b/patchpanel/mock_datapath.h
@@ -54,16 +54,18 @@
                     uint32_t remote_ipv4_prefix_len,
                     bool remote_multicast_flag));
   MOCK_METHOD1(RemoveInterface, void(const std::string& ifname));
-  MOCK_METHOD4(StartRoutingDevice,
+  MOCK_METHOD5(StartRoutingDevice,
                void(const std::string& ext_ifname,
                     const std::string& int_ifname,
                     uint32_t int_ipv4_addr,
-                    TrafficSource source));
-  MOCK_METHOD4(StopRoutingDevice,
+                    TrafficSource source,
+                    bool route_on_vpn));
+  MOCK_METHOD5(StopRoutingDevice,
                void(const std::string& ext_ifname,
                     const std::string& int_ifname,
                     uint32_t int_ipv4_addr,
-                    TrafficSource source));
+                    TrafficSource source,
+                    bool route_on_vpn));
   MOCK_METHOD3(MaskInterfaceFlags,
                bool(const std::string& ifname, uint16_t on, uint16_t off));
   MOCK_METHOD2(AddIPv6Forwarding,