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.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 5f0043c30b70..f4fda80a41a2 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2040,7 +2040,7 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
2040 2040
2041 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*rtm), flags); 2041 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*rtm), flags);
2042 if (nlh == NULL) 2042 if (nlh == NULL)
2043 return -ENOBUFS; 2043 return -EMSGSIZE;
2044 2044
2045 rtm = nlmsg_data(nlh); 2045 rtm = nlmsg_data(nlh);
2046 rtm->rtm_family = AF_INET6; 2046 rtm->rtm_family = AF_INET6;
@@ -2111,7 +2111,8 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
2111 return nlmsg_end(skb, nlh); 2111 return nlmsg_end(skb, nlh);
2112 2112
2113nla_put_failure: 2113nla_put_failure:
2114 return nlmsg_cancel(skb, nlh); 2114 nlmsg_cancel(skb, nlh);
2115 return -EMSGSIZE;
2115} 2116}
2116 2117
2117int rt6_dump_route(struct rt6_info *rt, void *p_arg) 2118int rt6_dump_route(struct rt6_info *rt, void *p_arg)
@@ -2222,9 +2223,12 @@ void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info)
2222 goto errout; 2223 goto errout;
2223 2224
2224 err = rt6_fill_node(skb, rt, NULL, NULL, 0, event, pid, seq, 0, 0); 2225 err = rt6_fill_node(skb, rt, NULL, NULL, 0, event, pid, seq, 0, 0);
2225 /* failure implies BUG in rt6_nlmsg_size() */ 2226 if (err < 0) {
2226 BUG_ON(err < 0); 2227 /* -EMSGSIZE implies BUG in rt6_nlmsg_size() */
2227 2228 WARN_ON(err == -EMSGSIZE);
2229 kfree_skb(skb);
2230 goto errout;
2231 }
2228 err = rtnl_notify(skb, pid, RTNLGRP_IPV6_ROUTE, nlh, gfp_any()); 2232 err = rtnl_notify(skb, pid, RTNLGRP_IPV6_ROUTE, nlh, gfp_any());
2229errout: 2233errout:
2230 if (err < 0) 2234 if (err < 0)