diff options
Diffstat (limited to 'net/ipv6/xfrm6_state.c')
-rw-r--r-- | net/ipv6/xfrm6_state.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c index e0b8f3c5caa2..6269584e610e 100644 --- a/net/ipv6/xfrm6_state.c +++ b/net/ipv6/xfrm6_state.c | |||
@@ -173,7 +173,19 @@ __xfrm6_state_sort(struct xfrm_state **dst, struct xfrm_state **src, int n) | |||
173 | if (j == n) | 173 | if (j == n) |
174 | goto end; | 174 | goto end; |
175 | 175 | ||
176 | /* XXX: Rule 2: select MIPv6 RO or inbound trigger */ | 176 | /* Rule 2: select MIPv6 RO or inbound trigger */ |
177 | #ifdef CONFIG_IPV6_MIP6 | ||
178 | for (i = 0; i < n; i++) { | ||
179 | if (src[i] && | ||
180 | (src[i]->props.mode == XFRM_MODE_ROUTEOPTIMIZATION || | ||
181 | src[i]->props.mode == XFRM_MODE_IN_TRIGGER)) { | ||
182 | dst[j++] = src[i]; | ||
183 | src[i] = NULL; | ||
184 | } | ||
185 | } | ||
186 | if (j == n) | ||
187 | goto end; | ||
188 | #endif | ||
177 | 189 | ||
178 | /* Rule 3: select IPsec transport AH */ | 190 | /* Rule 3: select IPsec transport AH */ |
179 | for (i = 0; i < n; i++) { | 191 | for (i = 0; i < n; i++) { |
@@ -226,7 +238,19 @@ __xfrm6_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n) | |||
226 | if (j == n) | 238 | if (j == n) |
227 | goto end; | 239 | goto end; |
228 | 240 | ||
229 | /* XXX: Rule 2: select MIPv6 RO or inbound trigger */ | 241 | /* Rule 2: select MIPv6 RO or inbound trigger */ |
242 | #ifdef CONFIG_IPV6_MIP6 | ||
243 | for (i = 0; i < n; i++) { | ||
244 | if (src[i] && | ||
245 | (src[i]->mode == XFRM_MODE_ROUTEOPTIMIZATION || | ||
246 | src[i]->mode == XFRM_MODE_IN_TRIGGER)) { | ||
247 | dst[j++] = src[i]; | ||
248 | src[i] = NULL; | ||
249 | } | ||
250 | } | ||
251 | if (j == n) | ||
252 | goto end; | ||
253 | #endif | ||
230 | 254 | ||
231 | /* Rule 3: select IPsec tunnel */ | 255 | /* Rule 3: select IPsec tunnel */ |
232 | for (i = 0; i < n; i++) { | 256 | for (i = 0; i < n; i++) { |