diff options
| author | Srinivasarao P <spathi@codeaurora.org> | 2019-09-16 17:23:35 +0530 |
|---|---|---|
| committer | Srinivasarao P <spathi@codeaurora.org> | 2019-09-16 17:24:36 +0530 |
| commit | 869c392a217ba62afb53a5609563f97d4d8b92f5 (patch) | |
| tree | dac38885ff368343e5efb96e0a29e31cd0a4ad3e /include | |
| parent | 6e94fb15c868d3599ea8cad7f0aa81786b79baaf (diff) | |
| parent | 3edc5af3e74c297c6803bc84cbd3f7c81f3f78e6 (diff) | |
Merge android-4.4.193 (3edc5af) into msm-4.4
* refs/heads/tmp-3edc5af
Linux 4.4.193
vhost: make sure log_num < in_num
af_packet: tone down the Tx-ring unsupported spew.
x86, boot: Remove multiple copy of static function sanitize_boot_params()
clk: s2mps11: Add used attribute to s2mps11_dt_match
scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
vhost/test: fix build for vhost test
xfrm: clean up xfrm protocol checks
ALSA: hda/realtek - Fix overridden device-specific initialization
ALSA: hda - Fix potential endless loop at applying quirks
ANDROID: regression introduced override_creds=off
Change-Id: I2a9b4c63e3572bbfe461ace3ccc41451a6ef700c
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/xfrm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 9e1325e36415..c5c03fa47f8c 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1304,6 +1304,23 @@ static inline int xfrm_state_kern(const struct xfrm_state *x) return atomic_read(&x->tunnel_users); } +static inline bool xfrm_id_proto_valid(u8 proto) +{ + switch (proto) { + case IPPROTO_AH: + case IPPROTO_ESP: + case IPPROTO_COMP: +#if IS_ENABLED(CONFIG_IPV6) + case IPPROTO_ROUTING: + case IPPROTO_DSTOPTS: +#endif + return true; + default: + return false; + } +} + +/* IPSEC_PROTO_ANY only matches 3 IPsec protocols, 0 could match all. */ static inline int xfrm_id_proto_match(u8 proto, u8 userproto) { return (!userproto || proto == userproto || |
