]> Git Repo - u-boot.git/blobdiff - net/net6.c
arm: tegra: Remove <common.h> and add needed includes
[u-boot.git] / net / net6.c
index fdea0787885e48e1a7ccdee97743df43620a8aeb..4cff98df15cf15df21957c50419a77e8e6d12492 100644 (file)
@@ -9,12 +9,12 @@
 
 /* Simple IPv6 network layer implementation */
 
-#include <common.h>
 #include <env_internal.h>
 #include <malloc.h>
 #include <net.h>
 #include <net6.h>
 #include <ndisc.h>
+#include <vsprintf.h>
 
 /* NULL IPv6 address */
 struct in6_addr const net_null_addr_ip6 = ZERO_IPV6_ADDR;
@@ -47,10 +47,13 @@ static int on_ip6addr(const char *name, const char *value, enum env_op op,
        }
 
        mask = strchr(value, '/');
-       len = strlen(value);
 
-       if (mask)
-               net_prefix_length = simple_strtoul(value + len, NULL, 10);
+       if (mask) {
+               net_prefix_length = simple_strtoul(mask + 1, NULL, 10);
+               len = mask - value;
+       } else {
+               len = strlen(value);
+       }
 
        return string_to_ip6(value, len, &net_ip6);
 }
@@ -410,6 +413,7 @@ int net_ip6_handler(struct ethernet_hdr *et, struct ip6_hdr *ip6, int len)
                        break;
                case IPV6_NDISC_NEIGHBOUR_SOLICITATION:
                case IPV6_NDISC_NEIGHBOUR_ADVERTISEMENT:
+               case IPV6_NDISC_ROUTER_ADVERTISEMENT:
                        ndisc_receive(et, ip6, len);
                        break;
                default:
This page took 0.027059 seconds and 4 git commands to generate.