diff options
| author | Florian Westphal <fw@strlen.de> | 2019-04-16 10:44:37 -0400 |
|---|---|---|
| committer | Steffen Klassert <steffen.klassert@secunet.com> | 2019-04-23 01:42:20 -0400 |
| commit | f24ea52873c726bf7b54318f00ec45050222b367 (patch) | |
| tree | 79cd31108550a875fc9311fc07f291150e1fe1c4 /net/xfrm | |
| parent | e54d1527658f2226c1f63d6fb76fa9b97d1c3947 (diff) | |
xfrm: remove tos indirection from afinfo_policy
Only used by ipv4, we can read the fl4 tos value directly instead.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm')
| -rw-r--r-- | net/xfrm/xfrm_policy.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 16e70fc547b1..1d1335eab76c 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
| @@ -2450,18 +2450,10 @@ xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, const struct flowi *fl, | |||
| 2450 | 2450 | ||
| 2451 | static int xfrm_get_tos(const struct flowi *fl, int family) | 2451 | static int xfrm_get_tos(const struct flowi *fl, int family) |
| 2452 | { | 2452 | { |
| 2453 | const struct xfrm_policy_afinfo *afinfo; | 2453 | if (family == AF_INET) |
| 2454 | int tos; | 2454 | return IPTOS_RT_MASK & fl->u.ip4.flowi4_tos; |
| 2455 | |||
| 2456 | afinfo = xfrm_policy_get_afinfo(family); | ||
| 2457 | if (!afinfo) | ||
| 2458 | return 0; | ||
| 2459 | |||
| 2460 | tos = afinfo->get_tos(fl); | ||
| 2461 | 2455 | ||
| 2462 | rcu_read_unlock(); | 2456 | return 0; |
| 2463 | |||
| 2464 | return tos; | ||
| 2465 | } | 2457 | } |
| 2466 | 2458 | ||
| 2467 | static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family) | 2459 | static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family) |
