]> git.hungrycats.org Git - linux/commitdiff
[IPV6]: Build fix and dst entry leak in neighbour discovery.
authorStephen Hemminger <shemminger@osdl.org>
Sun, 21 Dec 2003 16:18:26 +0000 (08:18 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 21 Dec 2003 16:18:26 +0000 (08:18 -0800)
- 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

index 7ce6138bdd130c1769a2dad062800f234296c3cc..151add4d77d268cce30374388270def3b1603970 100644 (file)
@@ -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;
        }