From 8a1a312196d279ccc0547e6f7cb30c1960d27a91 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 21 Dec 2003 08:18:26 -0800 Subject: [PATCH] [IPV6]: Build fix and dst entry leak in neighbour discovery. - NPRINTK2 will not compile if ND_DEBUG set to 3 - Missing dst_release in ndisc_send_rs if skb allocation fails. --- net/ipv6/ndisc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 7ce6138bdd130..151add4d77d26 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -207,9 +207,8 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, case ND_OPT_MTU: case ND_OPT_REDIRECT_HDR: if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) { - ND_PRINTK2((KERN_WARNING - "ndisc_parse_options(): duplicated ND6 option found: type=%d\n", - nd_opt->nd_opt_type)); + ND_PRINTK2("ndisc_parse_options(): duplicated ND6 option found: type=%d\n", + nd_opt->nd_opt_type); } else { ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt; } @@ -619,6 +618,7 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, 1, &err); if (skb == NULL) { ND_PRINTK1("send_ns: alloc skb failed\n"); + dst_release(dst); return; } -- 2.53.0