cls_fw.c (5a84d159061d914c8dd4aa372ac6e9529c2be453) | cls_fw.c (27a884dc3cb63b93c2b3b643f5b31eed5f8a4d26) |
---|---|
1/* 2 * net/sched/cls_fw.c Classifier mapping ipchains' fwmark to traffic class. 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 * --- 334 unchanged lines hidden (view full) --- 343 } 344} 345 346static int fw_dump(struct tcf_proto *tp, unsigned long fh, 347 struct sk_buff *skb, struct tcmsg *t) 348{ 349 struct fw_head *head = (struct fw_head *)tp->root; 350 struct fw_filter *f = (struct fw_filter*)fh; | 1/* 2 * net/sched/cls_fw.c Classifier mapping ipchains' fwmark to traffic class. 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 * --- 334 unchanged lines hidden (view full) --- 343 } 344} 345 346static int fw_dump(struct tcf_proto *tp, unsigned long fh, 347 struct sk_buff *skb, struct tcmsg *t) 348{ 349 struct fw_head *head = (struct fw_head *)tp->root; 350 struct fw_filter *f = (struct fw_filter*)fh; |
351 unsigned char *b = skb->tail; | 351 unsigned char *b = skb_tail_pointer(skb); |
352 struct rtattr *rta; 353 354 if (f == NULL) 355 return skb->len; 356 357 t->tcm_handle = f->id; 358 359 if (!f->res.classid && !tcf_exts_is_available(&f->exts)) --- 9 unchanged lines hidden (view full) --- 369 RTA_PUT(skb, TCA_FW_INDEV, IFNAMSIZ, f->indev); 370#endif /* CONFIG_NET_CLS_IND */ 371 if (head->mask != 0xFFFFFFFF) 372 RTA_PUT(skb, TCA_FW_MASK, 4, &head->mask); 373 374 if (tcf_exts_dump(skb, &f->exts, &fw_ext_map) < 0) 375 goto rtattr_failure; 376 | 352 struct rtattr *rta; 353 354 if (f == NULL) 355 return skb->len; 356 357 t->tcm_handle = f->id; 358 359 if (!f->res.classid && !tcf_exts_is_available(&f->exts)) --- 9 unchanged lines hidden (view full) --- 369 RTA_PUT(skb, TCA_FW_INDEV, IFNAMSIZ, f->indev); 370#endif /* CONFIG_NET_CLS_IND */ 371 if (head->mask != 0xFFFFFFFF) 372 RTA_PUT(skb, TCA_FW_MASK, 4, &head->mask); 373 374 if (tcf_exts_dump(skb, &f->exts, &fw_ext_map) < 0) 375 goto rtattr_failure; 376 |
377 rta->rta_len = skb->tail - b; | 377 rta->rta_len = skb_tail_pointer(skb) - b; |
378 379 if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0) 380 goto rtattr_failure; 381 382 return skb->len; 383 384rtattr_failure: 385 skb_trim(skb, b - skb->data); --- 31 unchanged lines hidden --- | 378 379 if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0) 380 goto rtattr_failure; 381 382 return skb->len; 383 384rtattr_failure: 385 skb_trim(skb, b - skb->data); --- 31 unchanged lines hidden --- |