diff options
Diffstat (limited to 'net/decnet/dn_route.c')
-rw-r--r-- | net/decnet/dn_route.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 743e9fcf7c5a..dd0761e3d280 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -80,6 +80,7 @@ | |||
80 | #include <net/neighbour.h> | 80 | #include <net/neighbour.h> |
81 | #include <net/dst.h> | 81 | #include <net/dst.h> |
82 | #include <net/flow.h> | 82 | #include <net/flow.h> |
83 | #include <net/fib_rules.h> | ||
83 | #include <net/dn.h> | 84 | #include <net/dn.h> |
84 | #include <net/dn_dev.h> | 85 | #include <net/dn_dev.h> |
85 | #include <net/dn_nsp.h> | 86 | #include <net/dn_nsp.h> |
@@ -1284,7 +1285,7 @@ static int dn_route_input_slow(struct sk_buff *skb) | |||
1284 | dev_hold(out_dev); | 1285 | dev_hold(out_dev); |
1285 | 1286 | ||
1286 | if (res.r) | 1287 | if (res.r) |
1287 | src_map = dn_fib_rules_policy(fl.fld_src, &res, &flags); | 1288 | src_map = fl.fld_src; /* no NAT support for now */ |
1288 | 1289 | ||
1289 | gateway = DN_FIB_RES_GW(res); | 1290 | gateway = DN_FIB_RES_GW(res); |
1290 | if (res.type == RTN_NAT) { | 1291 | if (res.type == RTN_NAT) { |
@@ -1485,6 +1486,7 @@ static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, | |||
1485 | r->rtm_src_len = 0; | 1486 | r->rtm_src_len = 0; |
1486 | r->rtm_tos = 0; | 1487 | r->rtm_tos = 0; |
1487 | r->rtm_table = RT_TABLE_MAIN; | 1488 | r->rtm_table = RT_TABLE_MAIN; |
1489 | RTA_PUT_U32(skb, RTA_TABLE, RT_TABLE_MAIN); | ||
1488 | r->rtm_type = rt->rt_type; | 1490 | r->rtm_type = rt->rt_type; |
1489 | r->rtm_flags = (rt->rt_flags & ~0xFFFF) | RTM_F_CLONED; | 1491 | r->rtm_flags = (rt->rt_flags & ~0xFFFF) | RTM_F_CLONED; |
1490 | r->rtm_scope = RT_SCOPE_UNIVERSE; | 1492 | r->rtm_scope = RT_SCOPE_UNIVERSE; |
@@ -1609,9 +1611,7 @@ int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void *arg) | |||
1609 | goto out_free; | 1611 | goto out_free; |
1610 | } | 1612 | } |
1611 | 1613 | ||
1612 | err = netlink_unicast(rtnl, skb, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); | 1614 | return rtnl_unicast(skb, NETLINK_CB(in_skb).pid); |
1613 | |||
1614 | return err; | ||
1615 | 1615 | ||
1616 | out_free: | 1616 | out_free: |
1617 | kfree_skb(skb); | 1617 | kfree_skb(skb); |
@@ -1781,14 +1781,9 @@ void __init dn_route_init(void) | |||
1781 | { | 1781 | { |
1782 | int i, goal, order; | 1782 | int i, goal, order; |
1783 | 1783 | ||
1784 | dn_dst_ops.kmem_cachep = kmem_cache_create("dn_dst_cache", | 1784 | dn_dst_ops.kmem_cachep = |
1785 | sizeof(struct dn_route), | 1785 | kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0, |
1786 | 0, SLAB_HWCACHE_ALIGN, | 1786 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); |
1787 | NULL, NULL); | ||
1788 | |||
1789 | if (!dn_dst_ops.kmem_cachep) | ||
1790 | panic("DECnet: Failed to allocate dn_dst_cache\n"); | ||
1791 | |||
1792 | init_timer(&dn_route_timer); | 1787 | init_timer(&dn_route_timer); |
1793 | dn_route_timer.function = dn_dst_check_expire; | 1788 | dn_route_timer.function = dn_dst_check_expire; |
1794 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; | 1789 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; |