cls_route.c (e049d1ca3094f3d1d94617f456a9961202f96e3a) cls_route.c (27a884dc3cb63b93c2b3b643f5b31eed5f8a4d26)
1/*
2 * net/sched/cls_route.c ROUTE4 classifier.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 548 unchanged lines hidden (view full) ---

557 }
558 }
559}
560
561static int route4_dump(struct tcf_proto *tp, unsigned long fh,
562 struct sk_buff *skb, struct tcmsg *t)
563{
564 struct route4_filter *f = (struct route4_filter*)fh;
1/*
2 * net/sched/cls_route.c ROUTE4 classifier.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 548 unchanged lines hidden (view full) ---

557 }
558 }
559}
560
561static int route4_dump(struct tcf_proto *tp, unsigned long fh,
562 struct sk_buff *skb, struct tcmsg *t)
563{
564 struct route4_filter *f = (struct route4_filter*)fh;
565 unsigned char *b = skb->tail;
565 unsigned char *b = skb_tail_pointer(skb);
566 struct rtattr *rta;
567 u32 id;
568
569 if (f == NULL)
570 return skb->len;
571
572 t->tcm_handle = f->handle;
573

--- 12 unchanged lines hidden (view full) ---

586 RTA_PUT(skb, TCA_ROUTE4_FROM, sizeof(id), &id);
587 }
588 if (f->res.classid)
589 RTA_PUT(skb, TCA_ROUTE4_CLASSID, 4, &f->res.classid);
590
591 if (tcf_exts_dump(skb, &f->exts, &route_ext_map) < 0)
592 goto rtattr_failure;
593
566 struct rtattr *rta;
567 u32 id;
568
569 if (f == NULL)
570 return skb->len;
571
572 t->tcm_handle = f->handle;
573

--- 12 unchanged lines hidden (view full) ---

586 RTA_PUT(skb, TCA_ROUTE4_FROM, sizeof(id), &id);
587 }
588 if (f->res.classid)
589 RTA_PUT(skb, TCA_ROUTE4_CLASSID, 4, &f->res.classid);
590
591 if (tcf_exts_dump(skb, &f->exts, &route_ext_map) < 0)
592 goto rtattr_failure;
593
594 rta->rta_len = skb->tail - b;
594 rta->rta_len = skb_tail_pointer(skb) - b;
595
596 if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0)
597 goto rtattr_failure;
598
599 return skb->len;
600
601rtattr_failure:
602 skb_trim(skb, b - skb->data);

--- 31 unchanged lines hidden ---
595
596 if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0)
597 goto rtattr_failure;
598
599 return skb->len;
600
601rtattr_failure:
602 skb_trim(skb, b - skb->data);

--- 31 unchanged lines hidden ---