summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2019-03-21 09:19:00 +0100
committerHans Dedecker <dedeckeh@gmail.com>2019-03-21 15:41:39 +0100
commit4ca7f7e12118ece6aa589f9c45e1cec5404ff415 (patch)
treea56f732ea1eeac99c66d1892a3bf393107cd31b3 /src
parent8318e937244ea97ea3e91db15c39e4a17577934f (diff)
router: add extra syslog tracing
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/router.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/router.c b/src/router.c
index a3456a8..ec0bee0 100644
--- a/src/router.c
+++ b/src/router.c
@@ -292,7 +292,6 @@ static bool parse_routes(struct odhcpd_ipaddr *n, ssize_t len)
break;
}
}
-
}
}
@@ -456,9 +455,13 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add
}
if (odhcpd_bmemcmp(&addr->addr, &iface->pio_filter_addr,
- iface->pio_filter_length) != 0 ||
- addr->prefix < iface->pio_filter_length)
- continue; // PIO filtered out of this RA
+ iface->pio_filter_length) != 0 ||
+ addr->prefix < iface->pio_filter_length) {
+ syslog(LOG_INFO, "Address %s filtered out as RA prefix on %s",
+ inet_ntop(AF_INET6, &addr->addr.in6, buf, sizeof(buf)),
+ iface->name);
+ continue; /* PIO filtered out of this RA */
+ }
struct nd_opt_prefix_info *p = NULL;
for (size_t i = 0; i < pfxs_cnt; ++i) {
@@ -605,8 +608,12 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add
if (odhcpd_bmemcmp(&addr->addr, &iface->pio_filter_addr,
iface->pio_filter_length) != 0 ||
- addr->prefix < iface->pio_filter_length)
- continue; /* RIO filtered out of this RA */
+ addr->prefix < iface->pio_filter_length) {
+ syslog(LOG_INFO, "Address %s filtered out as RA route on %s",
+ inet_ntop(AF_INET6, &addr->addr.in6, buf, sizeof(buf)),
+ iface->name);
+ continue; /* PIO filtered out of this RA */
+ }
if (addr->dprefix > 32) {
addr->addr.in6.s6_addr32[1] &= htonl(~((1U << (64 - addr->dprefix)) - 1));
@@ -668,6 +675,8 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add
else
inet_pton(AF_INET6, ALL_IPV6_NODES, &dest.sin6_addr);
+ syslog(LOG_INFO, "Sending a RA on %s", iface->name);
+
odhcpd_send(router_event.uloop.fd,
&dest, iov, ARRAY_SIZE(iov), iface);
@@ -795,6 +804,8 @@ static void forward_router_advertisement(const struct interface *iface, uint8_t
}
}
+ syslog(LOG_NOTICE, "Forward a RA on %s", c->name);
+
odhcpd_send(router_event.uloop.fd, &all_nodes, &iov, 1, c);
}
}