aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 79a287181025..9841543c468d 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1818,12 +1818,10 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
1818 1818
1819static struct rtable *rt_dst_alloc(bool nopolicy, bool noxfrm) 1819static struct rtable *rt_dst_alloc(bool nopolicy, bool noxfrm)
1820{ 1820{
1821 struct rtable *rt = dst_alloc(&ipv4_dst_ops); 1821 struct rtable *rt = dst_alloc(&ipv4_dst_ops, 1);
1822 if (rt) { 1822 if (rt) {
1823 rt->dst.obsolete = -1; 1823 rt->dst.obsolete = -1;
1824 1824
1825 atomic_set(&rt->dst.__refcnt, 1);
1826
1827 rt->dst.flags = DST_HOST | 1825 rt->dst.flags = DST_HOST |
1828 (nopolicy ? DST_NOPOLICY : 0) | 1826 (nopolicy ? DST_NOPOLICY : 0) |
1829 (noxfrm ? DST_NOXFRM : 0); 1827 (noxfrm ? DST_NOXFRM : 0);
@@ -2679,12 +2677,11 @@ static int ipv4_dst_blackhole(struct net *net, struct rtable **rp, struct flowi
2679{ 2677{
2680 struct rtable *ort = *rp; 2678 struct rtable *ort = *rp;
2681 struct rtable *rt = (struct rtable *) 2679 struct rtable *rt = (struct rtable *)
2682 dst_alloc(&ipv4_dst_blackhole_ops); 2680 dst_alloc(&ipv4_dst_blackhole_ops, 1);
2683 2681
2684 if (rt) { 2682 if (rt) {
2685 struct dst_entry *new = &rt->dst; 2683 struct dst_entry *new = &rt->dst;
2686 2684
2687 atomic_set(&new->__refcnt, 1);
2688 new->__use = 1; 2685 new->__use = 1;
2689 new->input = dst_discard; 2686 new->input = dst_discard;
2690 new->output = dst_discard; 2687 new->output = dst_discard;