diff options
author | Tom Gundersen <teg@jklm.no> | 2015-11-18 13:43:49 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-11-18 14:26:36 +0100 |
commit | 23f186494cf041107896fc4bd7fc5b8f921fd79f (patch) | |
tree | 3cd02c86ff18ba060fa2984d9825ae58f686faf7 /src/network/networkd-ndisc.c | |
parent | Merge pull request #1940 from evverx/man-journald-syslog-forwarding (diff) | |
download | systemd-23f186494cf041107896fc4bd7fc5b8f921fd79f.tar.xz systemd-23f186494cf041107896fc4bd7fc5b8f921fd79f.zip |
networkd: ndisc - revert to letting the kernel handle NDisc
There is still a bug in the userspace version, so temporarily revert this.
This is a work-around for issue #1866.
Diffstat (limited to 'src/network/networkd-ndisc.c')
-rw-r--r-- | src/network/networkd-ndisc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index ce9e513ceb..966d729d85 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -26,7 +26,7 @@ #include "sd-ndisc.h" #include "networkd-link.h" - +/* static int ndisc_netlink_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) { _cleanup_link_unref_ Link *link = userdata; int r; @@ -77,7 +77,6 @@ static void ndisc_prefix_autonomous_handler(sd_ndisc *nd, const struct in6_addr if (in_addr_is_null(AF_INET6, (const union in_addr_union *) &link->network->ipv6_token) == 0) memcpy(((char *)&address->in_addr.in6) + 8, ((char *)&link->network->ipv6_token) + 8, 8); else { - /* see RFC4291 section 2.5.1 */ address->in_addr.in6.__in6_u.__u6_addr8[8] = link->mac.ether_addr_octet[0]; address->in_addr.in6.__in6_u.__u6_addr8[8] ^= 1 << 1; address->in_addr.in6.__in6_u.__u6_addr8[9] = link->mac.ether_addr_octet[1]; @@ -140,11 +139,12 @@ static void ndisc_prefix_onlink_handler(sd_ndisc *nd, const struct in6_addr *pre link->ndisc_messages ++; } +*/ static void ndisc_router_handler(sd_ndisc *nd, uint8_t flags, const struct in6_addr *gateway, unsigned lifetime, int pref, void *userdata) { _cleanup_route_free_ Route *route = NULL; Link *link = userdata; - usec_t time_now; + /* usec_t time_now; */ int r; assert(link); @@ -163,6 +163,8 @@ static void ndisc_router_handler(sd_ndisc *nd, uint8_t flags, const struct in6_a log_link_warning_errno(link, r, "Starting DHCPv6 client on NDisc request failed: %m"); } + return; +/* if (!gateway) return; @@ -189,6 +191,7 @@ static void ndisc_router_handler(sd_ndisc *nd, uint8_t flags, const struct in6_a } link->ndisc_messages ++; +*/ } static void ndisc_handler(sd_ndisc *nd, int event, void *userdata) { @@ -242,8 +245,8 @@ int ndisc_configure(Link *link) { r = sd_ndisc_set_callback(link->ndisc_router_discovery, ndisc_router_handler, - ndisc_prefix_onlink_handler, - ndisc_prefix_autonomous_handler, + NULL, + NULL, ndisc_handler, link); |