aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 6f01fe122abd..3c8834bc822d 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -62,6 +62,7 @@
62#include <net/lwtunnel.h> 62#include <net/lwtunnel.h>
63#include <net/ip_tunnels.h> 63#include <net/ip_tunnels.h>
64#include <net/l3mdev.h> 64#include <net/l3mdev.h>
65#include <trace/events/fib6.h>
65 66
66#include <asm/uaccess.h> 67#include <asm/uaccess.h>
67 68
@@ -523,7 +524,7 @@ static void rt6_probe_deferred(struct work_struct *w)
523 container_of(w, struct __rt6_probe_work, work); 524 container_of(w, struct __rt6_probe_work, work);
524 525
525 addrconf_addr_solict_mult(&work->target, &mcaddr); 526 addrconf_addr_solict_mult(&work->target, &mcaddr);
526 ndisc_send_ns(work->dev, &work->target, &mcaddr, NULL, NULL); 527 ndisc_send_ns(work->dev, &work->target, &mcaddr, NULL);
527 dev_put(work->dev); 528 dev_put(work->dev);
528 kfree(work); 529 kfree(work);
529} 530}
@@ -865,6 +866,9 @@ restart:
865 } 866 }
866 dst_use(&rt->dst, jiffies); 867 dst_use(&rt->dst, jiffies);
867 read_unlock_bh(&table->tb6_lock); 868 read_unlock_bh(&table->tb6_lock);
869
870 trace_fib6_table_lookup(net, rt, table->tb6_id, fl6);
871
868 return rt; 872 return rt;
869 873
870} 874}
@@ -1078,6 +1082,8 @@ redo_rt6_select:
1078 read_unlock_bh(&table->tb6_lock); 1082 read_unlock_bh(&table->tb6_lock);
1079 1083
1080 rt6_dst_from_metrics_check(rt); 1084 rt6_dst_from_metrics_check(rt);
1085
1086 trace_fib6_table_lookup(net, rt, table->tb6_id, fl6);
1081 return rt; 1087 return rt;
1082 } else if (unlikely((fl6->flowi6_flags & FLOWI_FLAG_KNOWN_NH) && 1088 } else if (unlikely((fl6->flowi6_flags & FLOWI_FLAG_KNOWN_NH) &&
1083 !(rt->rt6i_flags & RTF_GATEWAY))) { 1089 !(rt->rt6i_flags & RTF_GATEWAY))) {
@@ -1101,6 +1107,8 @@ redo_rt6_select:
1101 uncached_rt = net->ipv6.ip6_null_entry; 1107 uncached_rt = net->ipv6.ip6_null_entry;
1102 1108
1103 dst_hold(&uncached_rt->dst); 1109 dst_hold(&uncached_rt->dst);
1110
1111 trace_fib6_table_lookup(net, uncached_rt, table->tb6_id, fl6);
1104 return uncached_rt; 1112 return uncached_rt;
1105 1113
1106 } else { 1114 } else {
@@ -1125,6 +1133,7 @@ redo_rt6_select:
1125 dst_release(&rt->dst); 1133 dst_release(&rt->dst);
1126 } 1134 }
1127 1135
1136 trace_fib6_table_lookup(net, pcpu_rt, table->tb6_id, fl6);
1128 return pcpu_rt; 1137 return pcpu_rt;
1129 1138
1130 } 1139 }
@@ -1474,6 +1483,7 @@ out:
1474 1483
1475 read_unlock_bh(&table->tb6_lock); 1484 read_unlock_bh(&table->tb6_lock);
1476 1485
1486 trace_fib6_table_lookup(net, rt, table->tb6_id, fl6);
1477 return rt; 1487 return rt;
1478}; 1488};
1479 1489
@@ -2699,6 +2709,7 @@ static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = {
2699 [RTA_PREF] = { .type = NLA_U8 }, 2709 [RTA_PREF] = { .type = NLA_U8 },
2700 [RTA_ENCAP_TYPE] = { .type = NLA_U16 }, 2710 [RTA_ENCAP_TYPE] = { .type = NLA_U16 },
2701 [RTA_ENCAP] = { .type = NLA_NESTED }, 2711 [RTA_ENCAP] = { .type = NLA_NESTED },
2712 [RTA_EXPIRES] = { .type = NLA_U32 },
2702}; 2713};
2703 2714
2704static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh, 2715static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
@@ -2799,6 +2810,15 @@ static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
2799 if (tb[RTA_ENCAP_TYPE]) 2810 if (tb[RTA_ENCAP_TYPE])
2800 cfg->fc_encap_type = nla_get_u16(tb[RTA_ENCAP_TYPE]); 2811 cfg->fc_encap_type = nla_get_u16(tb[RTA_ENCAP_TYPE]);
2801 2812
2813 if (tb[RTA_EXPIRES]) {
2814 unsigned long timeout = addrconf_timeout_fixup(nla_get_u32(tb[RTA_EXPIRES]), HZ);
2815
2816 if (addrconf_finite_timeout(timeout)) {
2817 cfg->fc_expires = jiffies_to_clock_t(timeout * HZ);
2818 cfg->fc_flags |= RTF_EXPIRES;
2819 }
2820 }
2821
2802 err = 0; 2822 err = 0;
2803errout: 2823errout:
2804 return err; 2824 return err;