~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to net/ipv6/mip6.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
 
127
127
static int mip6_destopt_input(struct xfrm_state *x, struct sk_buff *skb)
128
128
{
129
 
        struct ipv6hdr *iph = ipv6_hdr(skb);
 
129
        const struct ipv6hdr *iph = ipv6_hdr(skb);
130
130
        struct ipv6_destopt_hdr *destopt = (struct ipv6_destopt_hdr *)skb->data;
131
131
        int err = destopt->nexthdr;
132
132
 
181
181
}
182
182
 
183
183
static inline int mip6_report_rl_allow(struct timeval *stamp,
184
 
                                       struct in6_addr *dst,
185
 
                                       struct in6_addr *src, int iif)
 
184
                                       const struct in6_addr *dst,
 
185
                                       const struct in6_addr *src, int iif)
186
186
{
187
187
        int allow = 0;
188
188
 
203
203
        return allow;
204
204
}
205
205
 
206
 
static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb, struct flowi *fl)
 
206
static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb,
 
207
                               const struct flowi *fl)
207
208
{
208
209
        struct net *net = xs_net(x);
209
210
        struct inet6_skb_parm *opt = (struct inet6_skb_parm *)skb->cb;
 
211
        const struct flowi6 *fl6 = &fl->u.ip6;
210
212
        struct ipv6_destopt_hao *hao = NULL;
211
213
        struct xfrm_selector sel;
212
214
        int offset;
213
215
        struct timeval stamp;
214
216
        int err = 0;
215
217
 
216
 
        if (unlikely(fl->proto == IPPROTO_MH &&
217
 
                     fl->fl_mh_type <= IP6_MH_TYPE_MAX))
 
218
        if (unlikely(fl6->flowi6_proto == IPPROTO_MH &&
 
219
                     fl6->fl6_mh_type <= IP6_MH_TYPE_MAX))
218
220
                goto out;
219
221
 
220
222
        if (likely(opt->dsthao)) {
239
241
               sizeof(sel.saddr));
240
242
        sel.prefixlen_s = 128;
241
243
        sel.family = AF_INET6;
242
 
        sel.proto = fl->proto;
243
 
        sel.dport = xfrm_flowi_dport(fl);
 
244
        sel.proto = fl6->flowi6_proto;
 
245
        sel.dport = xfrm_flowi_dport(fl, &fl6->uli);
244
246
        if (sel.dport)
245
247
                sel.dport_mask = htons(~0);
246
 
        sel.sport = xfrm_flowi_sport(fl);
 
248
        sel.sport = xfrm_flowi_sport(fl, &fl6->uli);
247
249
        if (sel.sport)
248
250
                sel.sport_mask = htons(~0);
249
 
        sel.ifindex = fl->oif;
 
251
        sel.ifindex = fl6->flowi6_oif;
250
252
 
251
253
        err = km_report(net, IPPROTO_DSTOPTS, &sel,
252
254
                        (hao ? (xfrm_address_t *)&hao->addr : NULL));
347
349
 
348
350
static int mip6_rthdr_input(struct xfrm_state *x, struct sk_buff *skb)
349
351
{
350
 
        struct ipv6hdr *iph = ipv6_hdr(skb);
 
352
        const struct ipv6hdr *iph = ipv6_hdr(skb);
351
353
        struct rt2_hdr *rt2 = (struct rt2_hdr *)skb->data;
352
354
        int err = rt2->rt_hdr.nexthdr;
353
355