diff options
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index fa7ce060b454..a24f38510719 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * xfrm_policy.c | 2 | * xfrm_policy.c |
3 | * | 3 | * |
4 | * Changes: | 4 | * Changes: |
@@ -151,7 +151,7 @@ retry: | |||
151 | return type; | 151 | return type; |
152 | } | 152 | } |
153 | 153 | ||
154 | int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, | 154 | int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, |
155 | unsigned short family) | 155 | unsigned short family) |
156 | { | 156 | { |
157 | struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); | 157 | struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); |
@@ -262,7 +262,7 @@ static inline unsigned long make_jiffies(long secs) | |||
262 | if (secs >= (MAX_SCHEDULE_TIMEOUT-1)/HZ) | 262 | if (secs >= (MAX_SCHEDULE_TIMEOUT-1)/HZ) |
263 | return MAX_SCHEDULE_TIMEOUT-1; | 263 | return MAX_SCHEDULE_TIMEOUT-1; |
264 | else | 264 | else |
265 | return secs*HZ; | 265 | return secs*HZ; |
266 | } | 266 | } |
267 | 267 | ||
268 | static void xfrm_policy_timer(unsigned long data) | 268 | static void xfrm_policy_timer(unsigned long data) |
@@ -1024,17 +1024,17 @@ end: | |||
1024 | static inline int policy_to_flow_dir(int dir) | 1024 | static inline int policy_to_flow_dir(int dir) |
1025 | { | 1025 | { |
1026 | if (XFRM_POLICY_IN == FLOW_DIR_IN && | 1026 | if (XFRM_POLICY_IN == FLOW_DIR_IN && |
1027 | XFRM_POLICY_OUT == FLOW_DIR_OUT && | 1027 | XFRM_POLICY_OUT == FLOW_DIR_OUT && |
1028 | XFRM_POLICY_FWD == FLOW_DIR_FWD) | 1028 | XFRM_POLICY_FWD == FLOW_DIR_FWD) |
1029 | return dir; | 1029 | return dir; |
1030 | switch (dir) { | 1030 | switch (dir) { |
1031 | default: | 1031 | default: |
1032 | case XFRM_POLICY_IN: | 1032 | case XFRM_POLICY_IN: |
1033 | return FLOW_DIR_IN; | 1033 | return FLOW_DIR_IN; |
1034 | case XFRM_POLICY_OUT: | 1034 | case XFRM_POLICY_OUT: |
1035 | return FLOW_DIR_OUT; | 1035 | return FLOW_DIR_OUT; |
1036 | case XFRM_POLICY_FWD: | 1036 | case XFRM_POLICY_FWD: |
1037 | return FLOW_DIR_FWD; | 1037 | return FLOW_DIR_FWD; |
1038 | }; | 1038 | }; |
1039 | } | 1039 | } |
1040 | 1040 | ||
@@ -1044,9 +1044,9 @@ static struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struc | |||
1044 | 1044 | ||
1045 | read_lock_bh(&xfrm_policy_lock); | 1045 | read_lock_bh(&xfrm_policy_lock); |
1046 | if ((pol = sk->sk_policy[dir]) != NULL) { | 1046 | if ((pol = sk->sk_policy[dir]) != NULL) { |
1047 | int match = xfrm_selector_match(&pol->selector, fl, | 1047 | int match = xfrm_selector_match(&pol->selector, fl, |
1048 | sk->sk_family); | 1048 | sk->sk_family); |
1049 | int err = 0; | 1049 | int err = 0; |
1050 | 1050 | ||
1051 | if (match) { | 1051 | if (match) { |
1052 | err = security_xfrm_policy_lookup(pol, fl->secid, | 1052 | err = security_xfrm_policy_lookup(pol, fl->secid, |
@@ -1511,7 +1511,7 @@ restart: | |||
1511 | } | 1511 | } |
1512 | *dst_p = dst; | 1512 | *dst_p = dst; |
1513 | dst_release(dst_orig); | 1513 | dst_release(dst_orig); |
1514 | xfrm_pols_put(pols, npols); | 1514 | xfrm_pols_put(pols, npols); |
1515 | return 0; | 1515 | return 0; |
1516 | 1516 | ||
1517 | error: | 1517 | error: |
@@ -1546,7 +1546,7 @@ xfrm_secpath_reject(int idx, struct sk_buff *skb, struct flowi *fl) | |||
1546 | */ | 1546 | */ |
1547 | 1547 | ||
1548 | static inline int | 1548 | static inline int |
1549 | xfrm_state_ok(struct xfrm_tmpl *tmpl, struct xfrm_state *x, | 1549 | xfrm_state_ok(struct xfrm_tmpl *tmpl, struct xfrm_state *x, |
1550 | unsigned short family) | 1550 | unsigned short family) |
1551 | { | 1551 | { |
1552 | if (xfrm_state_kern(x)) | 1552 | if (xfrm_state_kern(x)) |
@@ -1619,7 +1619,7 @@ static inline int secpath_has_nontransport(struct sec_path *sp, int k, int *idxp | |||
1619 | return 0; | 1619 | return 0; |
1620 | } | 1620 | } |
1621 | 1621 | ||
1622 | int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, | 1622 | int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, |
1623 | unsigned short family) | 1623 | unsigned short family) |
1624 | { | 1624 | { |
1625 | struct xfrm_policy *pol; | 1625 | struct xfrm_policy *pol; |
@@ -2243,7 +2243,7 @@ static int xfrm_migrate_selector_match(struct xfrm_selector *sel_cmp, | |||
2243 | if (sel_cmp->proto == IPSEC_ULPROTO_ANY) { | 2243 | if (sel_cmp->proto == IPSEC_ULPROTO_ANY) { |
2244 | if (sel_tgt->family == sel_cmp->family && | 2244 | if (sel_tgt->family == sel_cmp->family && |
2245 | xfrm_addr_cmp(&sel_tgt->daddr, &sel_cmp->daddr, | 2245 | xfrm_addr_cmp(&sel_tgt->daddr, &sel_cmp->daddr, |
2246 | sel_cmp->family) == 0 && | 2246 | sel_cmp->family) == 0 && |
2247 | xfrm_addr_cmp(&sel_tgt->saddr, &sel_cmp->saddr, | 2247 | xfrm_addr_cmp(&sel_tgt->saddr, &sel_cmp->saddr, |
2248 | sel_cmp->family) == 0 && | 2248 | sel_cmp->family) == 0 && |
2249 | sel_tgt->prefixlen_d == sel_cmp->prefixlen_d && | 2249 | sel_tgt->prefixlen_d == sel_cmp->prefixlen_d && |