aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/mip6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/mip6.c')
-rw-r--r--net/ipv6/mip6.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c
index d6e9599d0705..9b210482fb05 100644
--- a/net/ipv6/mip6.c
+++ b/net/ipv6/mip6.c
@@ -203,18 +203,20 @@ static inline int mip6_report_rl_allow(struct timeval *stamp,
203 return allow; 203 return allow;
204} 204}
205 205
206static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb, struct flowi *fl) 206static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb,
207 const struct flowi *fl)
207{ 208{
208 struct net *net = xs_net(x); 209 struct net *net = xs_net(x);
209 struct inet6_skb_parm *opt = (struct inet6_skb_parm *)skb->cb; 210 struct inet6_skb_parm *opt = (struct inet6_skb_parm *)skb->cb;
211 const struct flowi6 *fl6 = &fl->u.ip6;
210 struct ipv6_destopt_hao *hao = NULL; 212 struct ipv6_destopt_hao *hao = NULL;
211 struct xfrm_selector sel; 213 struct xfrm_selector sel;
212 int offset; 214 int offset;
213 struct timeval stamp; 215 struct timeval stamp;
214 int err = 0; 216 int err = 0;
215 217
216 if (unlikely(fl->proto == IPPROTO_MH && 218 if (unlikely(fl6->flowi6_proto == IPPROTO_MH &&
217 fl->fl_mh_type <= IP6_MH_TYPE_MAX)) 219 fl6->fl6_mh_type <= IP6_MH_TYPE_MAX))
218 goto out; 220 goto out;
219 221
220 if (likely(opt->dsthao)) { 222 if (likely(opt->dsthao)) {
@@ -239,14 +241,14 @@ static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb, struct
239 sizeof(sel.saddr)); 241 sizeof(sel.saddr));
240 sel.prefixlen_s = 128; 242 sel.prefixlen_s = 128;
241 sel.family = AF_INET6; 243 sel.family = AF_INET6;
242 sel.proto = fl->proto; 244 sel.proto = fl6->flowi6_proto;
243 sel.dport = xfrm_flowi_dport(fl); 245 sel.dport = xfrm_flowi_dport(fl, &fl6->uli);
244 if (sel.dport) 246 if (sel.dport)
245 sel.dport_mask = htons(~0); 247 sel.dport_mask = htons(~0);
246 sel.sport = xfrm_flowi_sport(fl); 248 sel.sport = xfrm_flowi_sport(fl, &fl6->uli);
247 if (sel.sport) 249 if (sel.sport)
248 sel.sport_mask = htons(~0); 250 sel.sport_mask = htons(~0);
249 sel.ifindex = fl->oif; 251 sel.ifindex = fl6->flowi6_oif;
250 252
251 err = km_report(net, IPPROTO_DSTOPTS, &sel, 253 err = km_report(net, IPPROTO_DSTOPTS, &sel,
252 (hao ? (xfrm_address_t *)&hao->addr : NULL)); 254 (hao ? (xfrm_address_t *)&hao->addr : NULL));