Lines Matching refs:mrt
58 struct mr_table *mrt; member
83 static void ip6mr_free_table(struct mr_table *mrt);
85 static void ip6_mr_forward(struct net *net, struct mr_table *mrt,
88 static int ip6mr_cache_report(struct mr_table *mrt, struct sk_buff *pkt,
90 static void mr6_netlink_event(struct mr_table *mrt, struct mfc6_cache *mfc,
92 static void mrt6msg_netlink_event(struct mr_table *mrt, struct sk_buff *pkt);
95 static void mroute_clean_tables(struct mr_table *mrt, int flags);
99 #define ip6mr_for_each_table(mrt, net) \ argument
100 list_for_each_entry_rcu(mrt, &net->ipv6.mr6_tables, list, \
105 struct mr_table *mrt) in ip6mr_mr_table_iter() argument
109 if (!mrt) in ip6mr_mr_table_iter()
113 ret = list_entry_rcu(mrt->list.next, in ip6mr_mr_table_iter()
123 struct mr_table *mrt; in ip6mr_get_table() local
125 ip6mr_for_each_table(mrt, net) { in ip6mr_get_table()
126 if (mrt->id == id) in ip6mr_get_table()
127 return mrt; in ip6mr_get_table()
133 struct mr_table **mrt) in ip6mr_fib_lookup() argument
149 *mrt = res.mrt; in ip6mr_fib_lookup()
157 struct mr_table *mrt; in ip6mr_rule_action() local
173 mrt = ip6mr_get_table(rule->fr_net, arg->table); in ip6mr_rule_action()
174 if (!mrt) in ip6mr_rule_action()
176 res->mrt = mrt; in ip6mr_rule_action()
228 struct mr_table *mrt; in ip6mr_rules_init() local
237 mrt = ip6mr_new_table(net, RT6_TABLE_DFLT); in ip6mr_rules_init()
238 if (IS_ERR(mrt)) { in ip6mr_rules_init()
239 err = PTR_ERR(mrt); in ip6mr_rules_init()
252 ip6mr_free_table(mrt); in ip6mr_rules_init()
261 struct mr_table *mrt, *next; in ip6mr_rules_exit() local
264 list_for_each_entry_safe(mrt, next, &net->ipv6.mr6_tables, list) { in ip6mr_rules_exit()
265 list_del(&mrt->list); in ip6mr_rules_exit()
266 ip6mr_free_table(mrt); in ip6mr_rules_exit()
290 #define ip6mr_for_each_table(mrt, net) \ argument
291 for (mrt = net->ipv6.mrt6; mrt; mrt = NULL)
294 struct mr_table *mrt) in ip6mr_mr_table_iter() argument
296 if (!mrt) in ip6mr_mr_table_iter()
307 struct mr_table **mrt) in ip6mr_fib_lookup() argument
309 *mrt = net->ipv6.mrt6; in ip6mr_fib_lookup()
315 struct mr_table *mrt; in ip6mr_rules_init() local
317 mrt = ip6mr_new_table(net, RT6_TABLE_DFLT); in ip6mr_rules_init()
318 if (IS_ERR(mrt)) in ip6mr_rules_init()
319 return PTR_ERR(mrt); in ip6mr_rules_init()
320 net->ipv6.mrt6 = mrt; in ip6mr_rules_init()
363 static void ip6mr_new_table_set(struct mr_table *mrt, in ip6mr_new_table_set() argument
367 list_add_tail_rcu(&mrt->list, &net->ipv6.mr6_tables); in ip6mr_new_table_set()
383 struct mr_table *mrt; in ip6mr_new_table() local
385 mrt = ip6mr_get_table(net, id); in ip6mr_new_table()
386 if (mrt) in ip6mr_new_table()
387 return mrt; in ip6mr_new_table()
393 static void ip6mr_free_table(struct mr_table *mrt) in ip6mr_free_table() argument
395 del_timer_sync(&mrt->ipmr_expire_timer); in ip6mr_free_table()
396 mroute_clean_tables(mrt, MRT6_FLUSH_MIFS | MRT6_FLUSH_MIFS_STATIC | in ip6mr_free_table()
398 rhltable_destroy(&mrt->mfc_hash); in ip6mr_free_table()
399 kfree(mrt); in ip6mr_free_table()
412 struct mr_table *mrt; in ip6mr_vif_seq_start() local
414 mrt = ip6mr_get_table(net, RT6_TABLE_DFLT); in ip6mr_vif_seq_start()
415 if (!mrt) in ip6mr_vif_seq_start()
418 iter->mrt = mrt; in ip6mr_vif_seq_start()
433 struct mr_table *mrt = iter->mrt; in ip6mr_vif_seq_show() local
444 vif - mrt->vif_table, in ip6mr_vif_seq_show()
462 struct mr_table *mrt; in ipmr_mfc_seq_start() local
464 mrt = ip6mr_get_table(net, RT6_TABLE_DFLT); in ipmr_mfc_seq_start()
465 if (!mrt) in ipmr_mfc_seq_start()
468 return mr_mfc_seq_start(seq, pos, mrt, &mfc_unres_lock); in ipmr_mfc_seq_start()
483 struct mr_table *mrt = it->mrt; in ipmr_mfc_seq_show() local
489 if (it->cache != &mrt->mfc_unres_queue) { in ipmr_mfc_seq_show()
496 if (VIF_EXISTS(mrt, n) && in ipmr_mfc_seq_show()
529 struct mr_table *mrt; in pim6_rcv() local
557 if (ip6mr_fib_lookup(net, &fl6, &mrt) < 0) in pim6_rcv()
559 reg_vif_num = mrt->mroute_reg_vif_num; in pim6_rcv()
563 reg_dev = mrt->vif_table[reg_vif_num].dev; in pim6_rcv()
598 struct mr_table *mrt; in reg_vif_xmit() local
608 if (ip6mr_fib_lookup(net, &fl6, &mrt) < 0) in reg_vif_xmit()
614 ip6mr_cache_report(mrt, skb, mrt->mroute_reg_vif_num, MRT6MSG_WHOLEPKT); in reg_vif_xmit()
645 static struct net_device *ip6mr_reg_vif(struct net *net, struct mr_table *mrt) in ip6mr_reg_vif() argument
650 if (mrt->id == RT6_TABLE_DFLT) in ip6mr_reg_vif()
653 sprintf(name, "pim6reg%u", mrt->id); in ip6mr_reg_vif()
697 static int mif6_delete(struct mr_table *mrt, int vifi, int notify, in mif6_delete() argument
704 if (vifi < 0 || vifi >= mrt->maxvif) in mif6_delete()
707 v = &mrt->vif_table[vifi]; in mif6_delete()
709 if (VIF_EXISTS(mrt, vifi)) in mif6_delete()
710 call_ip6mr_vif_entry_notifiers(read_pnet(&mrt->net), in mif6_delete()
712 mrt->id); in mif6_delete()
724 if (vifi == mrt->mroute_reg_vif_num) in mif6_delete()
725 mrt->mroute_reg_vif_num = -1; in mif6_delete()
728 if (vifi + 1 == mrt->maxvif) { in mif6_delete()
731 if (VIF_EXISTS(mrt, tmp)) in mif6_delete()
734 mrt->maxvif = tmp + 1; in mif6_delete()
772 static void ip6mr_destroy_unres(struct mr_table *mrt, struct mfc6_cache *c) in ip6mr_destroy_unres() argument
774 struct net *net = read_pnet(&mrt->net); in ip6mr_destroy_unres()
777 atomic_dec(&mrt->cache_resolve_queue_len); in ip6mr_destroy_unres()
798 static void ipmr_do_expire_process(struct mr_table *mrt) in ipmr_do_expire_process() argument
804 list_for_each_entry_safe(c, next, &mrt->mfc_unres_queue, list) { in ipmr_do_expire_process()
814 mr6_netlink_event(mrt, (struct mfc6_cache *)c, RTM_DELROUTE); in ipmr_do_expire_process()
815 ip6mr_destroy_unres(mrt, (struct mfc6_cache *)c); in ipmr_do_expire_process()
818 if (!list_empty(&mrt->mfc_unres_queue)) in ipmr_do_expire_process()
819 mod_timer(&mrt->ipmr_expire_timer, jiffies + expires); in ipmr_do_expire_process()
824 struct mr_table *mrt = from_timer(mrt, t, ipmr_expire_timer); in ipmr_expire_process() local
827 mod_timer(&mrt->ipmr_expire_timer, jiffies + 1); in ipmr_expire_process()
831 if (!list_empty(&mrt->mfc_unres_queue)) in ipmr_expire_process()
832 ipmr_do_expire_process(mrt); in ipmr_expire_process()
839 static void ip6mr_update_thresholds(struct mr_table *mrt, in ip6mr_update_thresholds() argument
849 for (vifi = 0; vifi < mrt->maxvif; vifi++) { in ip6mr_update_thresholds()
850 if (VIF_EXISTS(mrt, vifi) && in ip6mr_update_thresholds()
862 static int mif6_add(struct net *net, struct mr_table *mrt, in mif6_add() argument
866 struct vif_device *v = &mrt->vif_table[vifi]; in mif6_add()
872 if (VIF_EXISTS(mrt, vifi)) in mif6_add()
882 if (mrt->mroute_reg_vif_num >= 0) in mif6_add()
884 dev = ip6mr_reg_vif(net, mrt); in mif6_add()
927 mrt->mroute_reg_vif_num = vifi; in mif6_add()
929 if (vifi + 1 > mrt->maxvif) in mif6_add()
930 mrt->maxvif = vifi + 1; in mif6_add()
933 v, vifi, mrt->id); in mif6_add()
937 static struct mfc6_cache *ip6mr_cache_find(struct mr_table *mrt, in ip6mr_cache_find() argument
946 return mr_mfc_find(mrt, &arg); in ip6mr_cache_find()
950 static struct mfc6_cache *ip6mr_cache_find_any(struct mr_table *mrt, in ip6mr_cache_find_any() argument
960 return mr_mfc_find_any_parent(mrt, mifi); in ip6mr_cache_find_any()
961 return mr_mfc_find_any(mrt, mifi, &arg); in ip6mr_cache_find_any()
966 ip6mr_cache_find_parent(struct mr_table *mrt, in ip6mr_cache_find_parent() argument
976 return mr_mfc_find_parent(mrt, &arg, parent); in ip6mr_cache_find_parent()
1006 static void ip6mr_cache_resolve(struct net *net, struct mr_table *mrt, in ip6mr_cache_resolve() argument
1020 if (mr_fill_mroute(mrt, skb, &c->_c, in ip6mr_cache_resolve()
1031 ip6_mr_forward(net, mrt, skb->dev, skb, c); in ip6mr_cache_resolve()
1041 static int ip6mr_cache_report(struct mr_table *mrt, struct sk_buff *pkt, in ip6mr_cache_report() argument
1079 msg->im6_mif = mrt->mroute_reg_vif_num; in ip6mr_cache_report()
1115 mroute6_sk = rcu_dereference(mrt->mroute_sk); in ip6mr_cache_report()
1122 mrt6msg_netlink_event(mrt, skb); in ip6mr_cache_report()
1136 static int ip6mr_cache_unresolved(struct mr_table *mrt, mifi_t mifi, in ip6mr_cache_unresolved() argument
1144 list_for_each_entry(c, &mrt->mfc_unres_queue, _c.list) { in ip6mr_cache_unresolved()
1173 err = ip6mr_cache_report(mrt, skb, mifi, MRT6MSG_NOCACHE); in ip6mr_cache_unresolved()
1185 atomic_inc(&mrt->cache_resolve_queue_len); in ip6mr_cache_unresolved()
1186 list_add(&c->_c.list, &mrt->mfc_unres_queue); in ip6mr_cache_unresolved()
1187 mr6_netlink_event(mrt, c, RTM_NEWROUTE); in ip6mr_cache_unresolved()
1189 ipmr_do_expire_process(mrt); in ip6mr_cache_unresolved()
1213 static int ip6mr_mfc_delete(struct mr_table *mrt, struct mf6cctl *mfc, in ip6mr_mfc_delete() argument
1220 c = ip6mr_cache_find_parent(mrt, &mfc->mf6cc_origin.sin6_addr, in ip6mr_mfc_delete()
1225 rhltable_remove(&mrt->mfc_hash, &c->_c.mnode, ip6mr_rht_params); in ip6mr_mfc_delete()
1228 call_ip6mr_mfc_entry_notifiers(read_pnet(&mrt->net), in ip6mr_mfc_delete()
1229 FIB_EVENT_ENTRY_DEL, c, mrt->id); in ip6mr_mfc_delete()
1230 mr6_netlink_event(mrt, c, RTM_DELROUTE); in ip6mr_mfc_delete()
1240 struct mr_table *mrt; in ip6mr_device_event() local
1247 ip6mr_for_each_table(mrt, net) { in ip6mr_device_event()
1248 v = &mrt->vif_table[0]; in ip6mr_device_event()
1249 for (ct = 0; ct < mrt->maxvif; ct++, v++) { in ip6mr_device_event()
1251 mif6_delete(mrt, ct, 1, NULL); in ip6mr_device_event()
1408 static int ip6mr_mfc_add(struct net *net, struct mr_table *mrt, in ip6mr_mfc_add() argument
1428 c = ip6mr_cache_find_parent(mrt, &mfc->mf6cc_origin.sin6_addr, in ip6mr_mfc_add()
1434 ip6mr_update_thresholds(mrt, &c->_c, ttls); in ip6mr_mfc_add()
1439 c, mrt->id); in ip6mr_mfc_add()
1440 mr6_netlink_event(mrt, c, RTM_NEWROUTE); in ip6mr_mfc_add()
1455 ip6mr_update_thresholds(mrt, &c->_c, ttls); in ip6mr_mfc_add()
1459 err = rhltable_insert_key(&mrt->mfc_hash, &c->cmparg, &c->_c.mnode, in ip6mr_mfc_add()
1466 list_add_tail_rcu(&c->_c.list, &mrt->mfc_cache_list); in ip6mr_mfc_add()
1473 list_for_each_entry(_uc, &mrt->mfc_unres_queue, list) { in ip6mr_mfc_add()
1478 atomic_dec(&mrt->cache_resolve_queue_len); in ip6mr_mfc_add()
1483 if (list_empty(&mrt->mfc_unres_queue)) in ip6mr_mfc_add()
1484 del_timer(&mrt->ipmr_expire_timer); in ip6mr_mfc_add()
1488 ip6mr_cache_resolve(net, mrt, uc, c); in ip6mr_mfc_add()
1492 c, mrt->id); in ip6mr_mfc_add()
1493 mr6_netlink_event(mrt, c, RTM_NEWROUTE); in ip6mr_mfc_add()
1501 static void mroute_clean_tables(struct mr_table *mrt, int flags) in mroute_clean_tables() argument
1509 for (i = 0; i < mrt->maxvif; i++) { in mroute_clean_tables()
1510 if (((mrt->vif_table[i].flags & VIFF_STATIC) && in mroute_clean_tables()
1512 (!(mrt->vif_table[i].flags & VIFF_STATIC) && !(flags & MRT6_FLUSH_MIFS))) in mroute_clean_tables()
1514 mif6_delete(mrt, i, 0, &list); in mroute_clean_tables()
1521 list_for_each_entry_safe(c, tmp, &mrt->mfc_cache_list, list) { in mroute_clean_tables()
1525 rhltable_remove(&mrt->mfc_hash, &c->mnode, ip6mr_rht_params); in mroute_clean_tables()
1527 call_ip6mr_mfc_entry_notifiers(read_pnet(&mrt->net), in mroute_clean_tables()
1529 (struct mfc6_cache *)c, mrt->id); in mroute_clean_tables()
1530 mr6_netlink_event(mrt, (struct mfc6_cache *)c, RTM_DELROUTE); in mroute_clean_tables()
1536 if (atomic_read(&mrt->cache_resolve_queue_len) != 0) { in mroute_clean_tables()
1538 list_for_each_entry_safe(c, tmp, &mrt->mfc_unres_queue, list) { in mroute_clean_tables()
1540 mr6_netlink_event(mrt, (struct mfc6_cache *)c, in mroute_clean_tables()
1542 ip6mr_destroy_unres(mrt, (struct mfc6_cache *)c); in mroute_clean_tables()
1549 static int ip6mr_sk_init(struct mr_table *mrt, struct sock *sk) in ip6mr_sk_init() argument
1556 if (rtnl_dereference(mrt->mroute_sk)) { in ip6mr_sk_init()
1559 rcu_assign_pointer(mrt->mroute_sk, sk); in ip6mr_sk_init()
1579 struct mr_table *mrt; in ip6mr_sk_done() local
1586 ip6mr_for_each_table(mrt, net) { in ip6mr_sk_done()
1587 if (sk == rtnl_dereference(mrt->mroute_sk)) { in ip6mr_sk_done()
1589 RCU_INIT_POINTER(mrt->mroute_sk, NULL); in ip6mr_sk_done()
1601 mroute_clean_tables(mrt, MRT6_FLUSH_MIFS | MRT6_FLUSH_MFC); in ip6mr_sk_done()
1613 struct mr_table *mrt; in mroute6_is_socket() local
1620 if (ip6mr_fib_lookup(net, &fl6, &mrt) < 0) in mroute6_is_socket()
1623 return rcu_access_pointer(mrt->mroute_sk); in mroute6_is_socket()
1642 struct mr_table *mrt; in ip6_mroute_setsockopt() local
1648 mrt = ip6mr_get_table(net, raw6_sk(sk)->ip6mr_table ? : RT6_TABLE_DFLT); in ip6_mroute_setsockopt()
1649 if (!mrt) in ip6_mroute_setsockopt()
1653 if (sk != rcu_access_pointer(mrt->mroute_sk) && in ip6_mroute_setsockopt()
1663 return ip6mr_sk_init(mrt, sk); in ip6_mroute_setsockopt()
1676 ret = mif6_add(net, mrt, &vif, in ip6_mroute_setsockopt()
1677 sk == rtnl_dereference(mrt->mroute_sk)); in ip6_mroute_setsockopt()
1687 ret = mif6_delete(mrt, mifi, 0, NULL); in ip6_mroute_setsockopt()
1709 ret = ip6mr_mfc_delete(mrt, &mfc, parent); in ip6_mroute_setsockopt()
1711 ret = ip6mr_mfc_add(net, mrt, &mfc, in ip6_mroute_setsockopt()
1713 rtnl_dereference(mrt->mroute_sk), in ip6_mroute_setsockopt()
1727 mroute_clean_tables(mrt, flags); in ip6_mroute_setsockopt()
1743 mrt->mroute_do_assert = v; in ip6_mroute_setsockopt()
1759 if (v != mrt->mroute_do_pim) { in ip6_mroute_setsockopt()
1760 mrt->mroute_do_pim = v; in ip6_mroute_setsockopt()
1761 mrt->mroute_do_assert = v; in ip6_mroute_setsockopt()
1780 if (sk == rcu_access_pointer(mrt->mroute_sk)) in ip6_mroute_setsockopt()
1785 mrt = ip6mr_new_table(net, v); in ip6_mroute_setsockopt()
1786 if (IS_ERR(mrt)) in ip6_mroute_setsockopt()
1787 ret = PTR_ERR(mrt); in ip6_mroute_setsockopt()
1813 struct mr_table *mrt; in ip6_mroute_getsockopt() local
1819 mrt = ip6mr_get_table(net, raw6_sk(sk)->ip6mr_table ? : RT6_TABLE_DFLT); in ip6_mroute_getsockopt()
1820 if (!mrt) in ip6_mroute_getsockopt()
1829 val = mrt->mroute_do_pim; in ip6_mroute_getsockopt()
1833 val = mrt->mroute_do_assert; in ip6_mroute_getsockopt()
1864 struct mr_table *mrt; in ip6mr_ioctl() local
1866 mrt = ip6mr_get_table(net, raw6_sk(sk)->ip6mr_table ? : RT6_TABLE_DFLT); in ip6mr_ioctl()
1867 if (!mrt) in ip6mr_ioctl()
1874 if (vr.mifi >= mrt->maxvif) in ip6mr_ioctl()
1876 vr.mifi = array_index_nospec(vr.mifi, mrt->maxvif); in ip6mr_ioctl()
1878 vif = &mrt->vif_table[vr.mifi]; in ip6mr_ioctl()
1879 if (VIF_EXISTS(mrt, vr.mifi)) { in ip6mr_ioctl()
1897 c = ip6mr_cache_find(mrt, &sr.src.sin6_addr, &sr.grp.sin6_addr); in ip6mr_ioctl()
1939 struct mr_table *mrt; in ip6mr_compat_ioctl() local
1941 mrt = ip6mr_get_table(net, raw6_sk(sk)->ip6mr_table ? : RT6_TABLE_DFLT); in ip6mr_compat_ioctl()
1942 if (!mrt) in ip6mr_compat_ioctl()
1949 if (vr.mifi >= mrt->maxvif) in ip6mr_compat_ioctl()
1951 vr.mifi = array_index_nospec(vr.mifi, mrt->maxvif); in ip6mr_compat_ioctl()
1953 vif = &mrt->vif_table[vr.mifi]; in ip6mr_compat_ioctl()
1954 if (VIF_EXISTS(mrt, vr.mifi)) { in ip6mr_compat_ioctl()
1972 c = ip6mr_cache_find(mrt, &sr.src.sin6_addr, &sr.grp.sin6_addr); in ip6mr_compat_ioctl()
2004 static int ip6mr_forward2(struct net *net, struct mr_table *mrt, in ip6mr_forward2() argument
2008 struct vif_device *vif = &mrt->vif_table[vifi]; in ip6mr_forward2()
2022 ip6mr_cache_report(mrt, skb, vifi, MRT6MSG_WHOLEPKT); in ip6mr_forward2()
2078 static int ip6mr_find_vif(struct mr_table *mrt, struct net_device *dev) in ip6mr_find_vif() argument
2082 for (ct = mrt->maxvif - 1; ct >= 0; ct--) { in ip6mr_find_vif()
2083 if (mrt->vif_table[ct].dev == dev) in ip6mr_find_vif()
2089 static void ip6_mr_forward(struct net *net, struct mr_table *mrt, in ip6_mr_forward() argument
2095 int true_vifi = ip6mr_find_vif(mrt, dev); in ip6_mr_forward()
2109 cache_proxy = mr_mfc_find_any_parent(mrt, vif); in ip6_mr_forward()
2121 if (mrt->vif_table[vif].dev != dev) { in ip6_mr_forward()
2124 if (true_vifi >= 0 && mrt->mroute_do_assert && in ip6_mr_forward()
2130 (mrt->mroute_do_pim || in ip6_mr_forward()
2136 ip6mr_cache_report(mrt, skb, true_vifi, MRT6MSG_WRONGMIF); in ip6_mr_forward()
2142 mrt->vif_table[vif].pkt_in++; in ip6_mr_forward()
2143 mrt->vif_table[vif].bytes_in += skb->len; in ip6_mr_forward()
2171 ip6mr_forward2(net, mrt, skb2, psend); in ip6_mr_forward()
2178 ip6mr_forward2(net, mrt, skb, psend); in ip6_mr_forward()
2195 struct mr_table *mrt; in ip6_mr_input() local
2215 err = ip6mr_fib_lookup(net, &fl6, &mrt); in ip6_mr_input()
2222 cache = ip6mr_cache_find(mrt, in ip6_mr_input()
2225 int vif = ip6mr_find_vif(mrt, dev); in ip6_mr_input()
2228 cache = ip6mr_cache_find_any(mrt, in ip6_mr_input()
2239 vif = ip6mr_find_vif(mrt, dev); in ip6_mr_input()
2241 int err = ip6mr_cache_unresolved(mrt, vif, skb, dev); in ip6_mr_input()
2251 ip6_mr_forward(net, mrt, dev, skb, cache); in ip6_mr_input()
2262 struct mr_table *mrt; in ip6mr_get_route() local
2266 mrt = ip6mr_get_table(net, RT6_TABLE_DFLT); in ip6mr_get_route()
2267 if (!mrt) in ip6mr_get_route()
2271 cache = ip6mr_cache_find(mrt, &rt->rt6i_src.addr, &rt->rt6i_dst.addr); in ip6mr_get_route()
2273 int vif = ip6mr_find_vif(mrt, skb->dev); in ip6mr_get_route()
2276 cache = ip6mr_cache_find_any(mrt, &rt->rt6i_dst.addr, in ip6mr_get_route()
2287 if (!dev || (vif = ip6mr_find_vif(mrt, dev)) < 0) { in ip6mr_get_route()
2317 err = ip6mr_cache_unresolved(mrt, vif, skb2, dev); in ip6mr_get_route()
2323 err = mr_fill_mroute(mrt, skb, &cache->_c, rtm); in ip6mr_get_route()
2328 static int ip6mr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb, in ip6mr_fill_mroute() argument
2345 rtm->rtm_table = mrt->id; in ip6mr_fill_mroute()
2346 if (nla_put_u32(skb, RTA_TABLE, mrt->id)) in ip6mr_fill_mroute()
2359 err = mr_fill_mroute(mrt, skb, &c->_c, rtm); in ip6mr_fill_mroute()
2372 static int _ip6mr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb, in _ip6mr_fill_mroute() argument
2376 return ip6mr_fill_mroute(mrt, skb, portid, seq, (struct mfc6_cache *)c, in _ip6mr_fill_mroute()
2401 static void mr6_netlink_event(struct mr_table *mrt, struct mfc6_cache *mfc, in mr6_netlink_event() argument
2404 struct net *net = read_pnet(&mrt->net); in mr6_netlink_event()
2408 skb = nlmsg_new(mr6_msgsize(mfc->_c.mfc_parent >= MAXMIFS, mrt->maxvif), in mr6_netlink_event()
2413 err = ip6mr_fill_mroute(mrt, skb, 0, 0, mfc, cmd, 0); in mr6_netlink_event()
2443 static void mrt6msg_netlink_event(struct mr_table *mrt, struct sk_buff *pkt) in mrt6msg_netlink_event() argument
2445 struct net *net = read_pnet(&mrt->net); in mrt6msg_netlink_event()
2505 struct mr_table *mrt; in ip6mr_rtm_dumproute() local
2507 mrt = ip6mr_get_table(sock_net(skb->sk), filter.table_id); in ip6mr_rtm_dumproute()
2508 if (!mrt) { in ip6mr_rtm_dumproute()
2515 err = mr_table_dump(mrt, skb, cb, _ip6mr_fill_mroute, in ip6mr_rtm_dumproute()