diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index e08d84063c1f..843c5509fced 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1859,7 +1859,8 @@ int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
1859 | 1859 | ||
1860 | if (inet6_rtm_to_rtmsg(r, arg, &rtmsg)) | 1860 | if (inet6_rtm_to_rtmsg(r, arg, &rtmsg)) |
1861 | return -EINVAL; | 1861 | return -EINVAL; |
1862 | return ip6_route_del(&rtmsg, nlh, arg, &NETLINK_CB(skb), r->rtm_table); | 1862 | return ip6_route_del(&rtmsg, nlh, arg, &NETLINK_CB(skb), |
1863 | rtm_get_table(arg, r->rtm_table)); | ||
1863 | } | 1864 | } |
1864 | 1865 | ||
1865 | int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | 1866 | int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) |
@@ -1869,7 +1870,8 @@ int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
1869 | 1870 | ||
1870 | if (inet6_rtm_to_rtmsg(r, arg, &rtmsg)) | 1871 | if (inet6_rtm_to_rtmsg(r, arg, &rtmsg)) |
1871 | return -EINVAL; | 1872 | return -EINVAL; |
1872 | return ip6_route_add(&rtmsg, nlh, arg, &NETLINK_CB(skb), r->rtm_table); | 1873 | return ip6_route_add(&rtmsg, nlh, arg, &NETLINK_CB(skb), |
1874 | rtm_get_table(arg, r->rtm_table)); | ||
1873 | } | 1875 | } |
1874 | 1876 | ||
1875 | struct rt6_rtnl_dump_arg | 1877 | struct rt6_rtnl_dump_arg |
@@ -1887,6 +1889,7 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, | |||
1887 | struct nlmsghdr *nlh; | 1889 | struct nlmsghdr *nlh; |
1888 | unsigned char *b = skb->tail; | 1890 | unsigned char *b = skb->tail; |
1889 | struct rta_cacheinfo ci; | 1891 | struct rta_cacheinfo ci; |
1892 | u32 table; | ||
1890 | 1893 | ||
1891 | if (prefix) { /* user wants prefix routes only */ | 1894 | if (prefix) { /* user wants prefix routes only */ |
1892 | if (!(rt->rt6i_flags & RTF_PREFIX_RT)) { | 1895 | if (!(rt->rt6i_flags & RTF_PREFIX_RT)) { |
@@ -1902,9 +1905,11 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, | |||
1902 | rtm->rtm_src_len = rt->rt6i_src.plen; | 1905 | rtm->rtm_src_len = rt->rt6i_src.plen; |
1903 | rtm->rtm_tos = 0; | 1906 | rtm->rtm_tos = 0; |
1904 | if (rt->rt6i_table) | 1907 | if (rt->rt6i_table) |
1905 | rtm->rtm_table = rt->rt6i_table->tb6_id; | 1908 | table = rt->rt6i_table->tb6_id; |
1906 | else | 1909 | else |
1907 | rtm->rtm_table = RT6_TABLE_UNSPEC; | 1910 | table = RT6_TABLE_UNSPEC; |
1911 | rtm->rtm_table = table; | ||
1912 | RTA_PUT_U32(skb, RTA_TABLE, table); | ||
1908 | if (rt->rt6i_flags&RTF_REJECT) | 1913 | if (rt->rt6i_flags&RTF_REJECT) |
1909 | rtm->rtm_type = RTN_UNREACHABLE; | 1914 | rtm->rtm_type = RTN_UNREACHABLE; |
1910 | else if (rt->rt6i_dev && (rt->rt6i_dev->flags&IFF_LOOPBACK)) | 1915 | else if (rt->rt6i_dev && (rt->rt6i_dev->flags&IFF_LOOPBACK)) |