Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | #ifndef _XFRM_CONTROLLER_H |
| 17 | #define _XFRM_CONTROLLER_H |
| 18 | |
| 19 | #include <atomic> |
| 20 | #include <list> |
| 21 | #include <map> |
| 22 | #include <string> |
| 23 | #include <utility> // for pair |
| 24 | |
| 25 | #include <linux/netlink.h> |
Nathan Harold | 420ceac | 2017-04-05 19:36:59 -0700 | [diff] [blame] | 26 | #include <linux/udp.h> |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 27 | #include <linux/xfrm.h> |
| 28 | #include <sysutils/SocketClient.h> |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 29 | |
| 30 | #include "NetdConstants.h" |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 31 | #include "netdutils/Status.h" |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 32 | |
| 33 | namespace android { |
| 34 | namespace net { |
| 35 | |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 36 | // Exposed for testing |
| 37 | extern const uint32_t ALGO_MASK_AUTH_ALL; |
| 38 | // Exposed for testing |
| 39 | extern const uint32_t ALGO_MASK_CRYPT_ALL; |
| 40 | // Exposed for testing |
Benedict Wong | be65b43 | 2017-08-22 21:43:14 -0700 | [diff] [blame] | 41 | extern const uint32_t ALGO_MASK_AEAD_ALL; |
| 42 | // Exposed for testing |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 43 | extern const uint8_t REPLAY_WINDOW_SIZE; |
| 44 | |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 45 | // Suggest we avoid the smallest and largest ints |
| 46 | class XfrmMessage; |
| 47 | class TransportModeSecurityAssociation; |
| 48 | |
| 49 | class XfrmSocket { |
| 50 | public: |
| 51 | virtual void close() { |
Nathan Harold | 420ceac | 2017-04-05 19:36:59 -0700 | [diff] [blame] | 52 | if (mSock >= 0) { |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 53 | ::close(mSock); |
| 54 | } |
| 55 | mSock = -1; |
| 56 | } |
| 57 | |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 58 | virtual netdutils::Status open() = 0; |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 59 | |
| 60 | virtual ~XfrmSocket() { close(); } |
| 61 | |
ludi | e51e386 | 2017-08-15 19:28:12 -0700 | [diff] [blame] | 62 | // Sends the netlink message contained in iovecs. This populates iovecs[0] with |
| 63 | // a valid netlink message header. |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 64 | virtual netdutils::Status sendMessage(uint16_t nlMsgType, uint16_t nlMsgFlags, |
| 65 | uint16_t nlMsgSeqNum, |
| 66 | std::vector<iovec>* iovecs) const = 0; |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 67 | |
| 68 | protected: |
| 69 | int mSock; |
| 70 | }; |
| 71 | |
| 72 | enum struct XfrmDirection : uint8_t { |
| 73 | IN = XFRM_POLICY_IN, |
| 74 | OUT = XFRM_POLICY_OUT, |
| 75 | FORWARD = XFRM_POLICY_FWD, |
| 76 | MASK = XFRM_POLICY_MASK, |
| 77 | }; |
| 78 | |
| 79 | enum struct XfrmMode : uint8_t { |
| 80 | TRANSPORT = XFRM_MODE_TRANSPORT, |
| 81 | TUNNEL = XFRM_MODE_TUNNEL, |
| 82 | }; |
| 83 | |
Nathan Harold | 420ceac | 2017-04-05 19:36:59 -0700 | [diff] [blame] | 84 | enum struct XfrmEncapType : uint16_t { |
| 85 | NONE = 0, |
| 86 | ESPINUDP_NON_IKE = UDP_ENCAP_ESPINUDP_NON_IKE, |
| 87 | ESPINUDP = UDP_ENCAP_ESPINUDP |
| 88 | }; |
| 89 | |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 90 | struct XfrmAlgo { |
| 91 | std::string name; |
| 92 | std::vector<uint8_t> key; |
| 93 | uint16_t truncLenBits; |
| 94 | }; |
| 95 | |
Nathan Harold | 420ceac | 2017-04-05 19:36:59 -0700 | [diff] [blame] | 96 | struct XfrmEncap { |
| 97 | XfrmEncapType type; |
| 98 | uint16_t srcPort; |
| 99 | uint16_t dstPort; |
| 100 | }; |
| 101 | |
Nathan Harold | 7441c69 | 2017-12-12 21:25:01 -0800 | [diff] [blame] | 102 | // minimally sufficient structure to match either an SA or a Policy |
| 103 | struct XfrmId { |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 104 | xfrm_address_t dstAddr; // network order |
| 105 | xfrm_address_t srcAddr; |
| 106 | int addrFamily; // AF_INET or AF_INET6 |
| 107 | int transformId; // requestId |
| 108 | int spi; |
| 109 | }; |
| 110 | |
Nathan Harold | 7441c69 | 2017-12-12 21:25:01 -0800 | [diff] [blame] | 111 | struct XfrmSaInfo : XfrmId { |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 112 | XfrmAlgo auth; |
| 113 | XfrmAlgo crypt; |
Benedict Wong | be65b43 | 2017-08-22 21:43:14 -0700 | [diff] [blame] | 114 | XfrmAlgo aead; |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 115 | int netId; |
| 116 | XfrmMode mode; |
Nathan Harold | 420ceac | 2017-04-05 19:36:59 -0700 | [diff] [blame] | 117 | XfrmEncap encap; |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 118 | }; |
| 119 | |
| 120 | class XfrmController { |
| 121 | public: |
| 122 | XfrmController(); |
| 123 | |
Benedict Wong | b2daefb | 2017-12-06 22:05:46 -0800 | [diff] [blame] | 124 | netdutils::Status ipSecSetEncapSocketOwner(const android::base::unique_fd& socket, int newUid, |
| 125 | uid_t callerUid); |
| 126 | |
Nathan Harold | da54f12 | 2018-01-09 16:42:57 -0800 | [diff] [blame] | 127 | netdutils::Status ipSecAllocateSpi(int32_t transformId, const std::string& localAddress, |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 128 | const std::string& remoteAddress, int32_t inSpi, |
| 129 | int32_t* outSpi); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 130 | |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 131 | netdutils::Status ipSecAddSecurityAssociation( |
Nathan Harold | da54f12 | 2018-01-09 16:42:57 -0800 | [diff] [blame] | 132 | int32_t transformId, int32_t mode, const std::string& sourceAddress, |
| 133 | const std::string& destinationAddress, int64_t underlyingNetworkHandle, int32_t spi, |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 134 | const std::string& authAlgo, const std::vector<uint8_t>& authKey, int32_t authTruncBits, |
| 135 | const std::string& cryptAlgo, const std::vector<uint8_t>& cryptKey, int32_t cryptTruncBits, |
Benedict Wong | be65b43 | 2017-08-22 21:43:14 -0700 | [diff] [blame] | 136 | const std::string& aeadAlgo, const std::vector<uint8_t>& aeadKey, int32_t aeadIcvBits, |
ludi | ec83605 | 2017-05-20 14:17:05 -0700 | [diff] [blame] | 137 | int32_t encapType, int32_t encapLocalPort, int32_t encapRemotePort); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 138 | |
Nathan Harold | da54f12 | 2018-01-09 16:42:57 -0800 | [diff] [blame] | 139 | netdutils::Status ipSecDeleteSecurityAssociation(int32_t transformId, |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 140 | const std::string& localAddress, |
| 141 | const std::string& remoteAddress, int32_t spi); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 142 | |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 143 | netdutils::Status ipSecApplyTransportModeTransform(const android::base::unique_fd& socket, |
| 144 | int32_t transformId, int32_t direction, |
| 145 | const std::string& localAddress, |
| 146 | const std::string& remoteAddress, |
| 147 | int32_t spi); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 148 | |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 149 | netdutils::Status ipSecRemoveTransportModeTransform(const android::base::unique_fd& socket); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 150 | |
ludi | 771b800 | 2017-11-20 15:09:05 -0800 | [diff] [blame^] | 151 | netdutils::Status ipSecAddSecurityPolicy(int32_t transformId, int32_t direction, |
| 152 | const std::string& sourceAddress, |
| 153 | const std::string& destinationAddress, int32_t spi); |
| 154 | |
| 155 | netdutils::Status ipSecUpdateSecurityPolicy(int32_t transformId, int32_t direction, |
| 156 | const std::string& sourceAddress, |
| 157 | const std::string& destinationAddress, int32_t spi); |
| 158 | |
| 159 | netdutils::Status ipSecDeleteSecurityPolicy(int32_t transformId, int32_t direction, |
| 160 | const std::string& sourceAddress, |
| 161 | const std::string& destinationAddress); |
| 162 | |
Jonathan Basseri | c6461a6 | 2017-08-31 14:47:33 -0700 | [diff] [blame] | 163 | // Some XFRM netlink attributes comprise a header, a struct, and some data |
| 164 | // after the struct. We wrap all of those in one struct for easier |
| 165 | // marshalling. The structs below must be ABI compatible with the kernel and |
| 166 | // are composed from kernel structures; thus, they use the kernel naming |
| 167 | // convention. |
| 168 | |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 169 | // Exposed for testing |
Benedict Wong | 4f60ee1 | 2017-10-10 12:27:25 -0700 | [diff] [blame] | 170 | static constexpr size_t MAX_KEY_LENGTH = 128; |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 171 | |
Jonathan Basseri | c6461a6 | 2017-08-31 14:47:33 -0700 | [diff] [blame] | 172 | // Container for the content of an XFRMA_ALG_CRYPT netlink attribute. |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 173 | // Exposed for testing |
| 174 | struct nlattr_algo_crypt { |
| 175 | nlattr hdr; |
| 176 | xfrm_algo crypt; |
Benedict Wong | 4f60ee1 | 2017-10-10 12:27:25 -0700 | [diff] [blame] | 177 | uint8_t key[MAX_KEY_LENGTH]; |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 178 | }; |
| 179 | |
Jonathan Basseri | c6461a6 | 2017-08-31 14:47:33 -0700 | [diff] [blame] | 180 | // Container for the content of an XFRMA_ALG_AUTH_TRUNC netlink attribute. |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 181 | // Exposed for testing |
| 182 | struct nlattr_algo_auth { |
| 183 | nlattr hdr; |
| 184 | xfrm_algo_auth auth; |
Benedict Wong | 4f60ee1 | 2017-10-10 12:27:25 -0700 | [diff] [blame] | 185 | uint8_t key[MAX_KEY_LENGTH]; |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 186 | }; |
| 187 | |
Jonathan Basseri | c6461a6 | 2017-08-31 14:47:33 -0700 | [diff] [blame] | 188 | // Container for the content of an XFRMA_TMPL netlink attribute. |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 189 | // Exposed for testing |
Benedict Wong | be65b43 | 2017-08-22 21:43:14 -0700 | [diff] [blame] | 190 | struct nlattr_algo_aead { |
| 191 | nlattr hdr; |
| 192 | xfrm_algo_aead aead; |
Benedict Wong | 4f60ee1 | 2017-10-10 12:27:25 -0700 | [diff] [blame] | 193 | uint8_t key[MAX_KEY_LENGTH]; |
Benedict Wong | be65b43 | 2017-08-22 21:43:14 -0700 | [diff] [blame] | 194 | }; |
| 195 | |
| 196 | // Exposed for testing |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 197 | struct nlattr_user_tmpl { |
| 198 | nlattr hdr; |
| 199 | xfrm_user_tmpl tmpl; |
| 200 | }; |
| 201 | |
Jonathan Basseri | c6461a6 | 2017-08-31 14:47:33 -0700 | [diff] [blame] | 202 | // Container for the content of an XFRMA_ENCAP netlink attribute. |
Nathan Harold | 39b5df4 | 2017-08-02 18:45:25 -0700 | [diff] [blame] | 203 | // Exposed for testing |
| 204 | struct nlattr_encap_tmpl { |
| 205 | nlattr hdr; |
| 206 | xfrm_encap_tmpl tmpl; |
| 207 | }; |
| 208 | |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 209 | private: |
Nathan Harold | e2dd4c7 | 2017-04-19 11:09:11 -0700 | [diff] [blame] | 210 | /* |
| 211 | * Below is a redefinition of the xfrm_usersa_info struct that is part |
| 212 | * of the Linux uapi <linux/xfrm.h> to align the structures to a 64-bit |
| 213 | * boundary. |
| 214 | */ |
| 215 | #ifdef NETLINK_COMPAT32 |
| 216 | // Shadow the kernel definition of xfrm_usersa_info with a 64-bit aligned version |
| 217 | struct xfrm_usersa_info : ::xfrm_usersa_info { |
| 218 | } __attribute__((aligned(8))); |
| 219 | // Shadow the kernel's version, using the aligned version of xfrm_usersa_info |
| 220 | struct xfrm_userspi_info { |
| 221 | struct xfrm_usersa_info info; |
| 222 | __u32 min; |
| 223 | __u32 max; |
| 224 | }; |
| 225 | |
| 226 | /* |
| 227 | * Anyone who encounters a failure when sending netlink messages should look here |
| 228 | * first. Hitting the static_assert() below should be a strong hint that Android |
| 229 | * IPsec will probably not work with your current settings. |
| 230 | * |
| 231 | * Again, experimentally determined, the "flags" field should be the first byte in |
| 232 | * the final word of the xfrm_usersa_info struct. The check validates the size of |
| 233 | * the padding to be 7. |
| 234 | * |
| 235 | * This padding is verified to be correct on gcc/x86_64 kernel, and clang/x86 userspace. |
| 236 | */ |
| 237 | static_assert(sizeof(::xfrm_usersa_info) % 8 != 0, "struct xfrm_usersa_info has changed " |
| 238 | "alignment. Please consider whether this " |
| 239 | "patch is needed."); |
| 240 | static_assert(sizeof(xfrm_usersa_info) - offsetof(xfrm_usersa_info, flags) == 8, |
| 241 | "struct xfrm_usersa_info probably misaligned with kernel struct."); |
| 242 | static_assert(sizeof(xfrm_usersa_info) % 8 == 0, "struct xfrm_usersa_info_t is not 64-bit " |
| 243 | "aligned. Please consider whether this patch " |
| 244 | "is needed."); |
| 245 | static_assert(sizeof(::xfrm_userspi_info) - sizeof(::xfrm_usersa_info) == |
| 246 | sizeof(xfrm_userspi_info) - sizeof(xfrm_usersa_info), |
| 247 | "struct xfrm_userspi_info has changed and does not match the kernel struct."); |
| 248 | #endif |
| 249 | |
Nathan Harold | 7441c69 | 2017-12-12 21:25:01 -0800 | [diff] [blame] | 250 | // helper function for filling in the XfrmId (and XfrmSaInfo) structure |
Nathan Harold | da54f12 | 2018-01-09 16:42:57 -0800 | [diff] [blame] | 251 | static netdutils::Status fillXfrmId(const std::string& sourceAddress, |
| 252 | const std::string& destinationAddress, int32_t spi, |
| 253 | int32_t transformId, XfrmId* xfrmId); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 254 | |
| 255 | // Top level functions for managing a Transport Mode Transform |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 256 | static netdutils::Status addTransportModeTransform(const XfrmSaInfo& record); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 257 | static int removeTransportModeTransform(const XfrmSaInfo& record); |
| 258 | |
| 259 | // TODO(messagerefactor): FACTOR OUT ALL MESSAGE BUILDING CODE BELOW HERE |
| 260 | // Shared between SA and SP |
ludi | 771b800 | 2017-11-20 15:09:05 -0800 | [diff] [blame^] | 261 | static void fillXfrmSelector(const XfrmSaInfo& record, xfrm_selector* selector); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 262 | |
| 263 | // Shared between Transport and Tunnel Mode |
| 264 | static int fillNlAttrXfrmAlgoEnc(const XfrmAlgo& in_algo, nlattr_algo_crypt* algo); |
| 265 | static int fillNlAttrXfrmAlgoAuth(const XfrmAlgo& in_algo, nlattr_algo_auth* algo); |
Benedict Wong | be65b43 | 2017-08-22 21:43:14 -0700 | [diff] [blame] | 266 | static int fillNlAttrXfrmAlgoAead(const XfrmAlgo& in_algo, nlattr_algo_aead* algo); |
Nathan Harold | 420ceac | 2017-04-05 19:36:59 -0700 | [diff] [blame] | 267 | static int fillNlAttrXfrmEncapTmpl(const XfrmSaInfo& record, nlattr_encap_tmpl* tmpl); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 268 | |
Di Lu | 0e16b5e | 2018-01-12 10:37:53 -0800 | [diff] [blame] | 269 | // Functions for updating a Transport Mode SA |
| 270 | static netdutils::Status updateSecurityAssociation(const XfrmSaInfo& record, |
manojboopathi | 4d2d6f1 | 2017-12-06 11:11:31 -0800 | [diff] [blame] | 271 | const XfrmSocket& sock); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 272 | static int fillUserSaInfo(const XfrmSaInfo& record, xfrm_usersa_info* usersa); |
| 273 | |
| 274 | // Functions for deleting a Transport Mode SA |
Nathan Harold | 7441c69 | 2017-12-12 21:25:01 -0800 | [diff] [blame] | 275 | static netdutils::Status deleteSecurityAssociation(const XfrmId& record, |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 276 | const XfrmSocket& sock); |
Nathan Harold | 7441c69 | 2017-12-12 21:25:01 -0800 | [diff] [blame] | 277 | static int fillUserSaId(const XfrmId& record, xfrm_usersa_id* said); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 278 | static int fillUserTemplate(const XfrmSaInfo& record, xfrm_user_tmpl* tmpl); |
ludi | 771b800 | 2017-11-20 15:09:05 -0800 | [diff] [blame^] | 279 | |
Nathan Harold | da54f12 | 2018-01-09 16:42:57 -0800 | [diff] [blame] | 280 | static int fillTransportModeUserSpInfo(const XfrmSaInfo& record, XfrmDirection direction, |
| 281 | xfrm_userpolicy_info* usersp); |
ludi | 771b800 | 2017-11-20 15:09:05 -0800 | [diff] [blame^] | 282 | static int fillNlAttrUserTemplate(const XfrmSaInfo& record, nlattr_user_tmpl* tmpl); |
| 283 | static int fillUserPolicyId(const XfrmSaInfo& record, XfrmDirection direction, |
| 284 | xfrm_userpolicy_id* policy_id); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 285 | |
ludi | 6e8eccd | 2017-08-14 14:40:37 -0700 | [diff] [blame] | 286 | static netdutils::Status allocateSpi(const XfrmSaInfo& record, uint32_t minSpi, uint32_t maxSpi, |
| 287 | uint32_t* outSpi, const XfrmSocket& sock); |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 288 | |
ludi | 771b800 | 2017-11-20 15:09:05 -0800 | [diff] [blame^] | 289 | static netdutils::Status processSecurityPolicy(int32_t transformId, int32_t direction, |
| 290 | const std::string& localAddress, |
| 291 | const std::string& remoteAddress, |
| 292 | int32_t spi, int32_t msgType); |
| 293 | static netdutils::Status updateTunnelModeSecurityPolicy(const XfrmSaInfo& record, |
| 294 | const XfrmSocket& sock, |
| 295 | XfrmDirection direction, |
| 296 | uint16_t msgType); |
| 297 | static netdutils::Status deleteTunnelModeSecurityPolicy(const XfrmSaInfo& record, |
| 298 | const XfrmSocket& sock, |
| 299 | XfrmDirection direction); |
| 300 | |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame] | 301 | // END TODO(messagerefactor) |
| 302 | }; |
| 303 | |
| 304 | } // namespace net |
| 305 | } // namespace android |
| 306 | |
| 307 | #endif /* !defined(XFRM_CONTROLLER_H) */ |