summaryrefslogtreecommitdiff
path: root/proto/radv/radv.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-08-12 00:41:36 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-08-12 00:43:19 +0200
commit70a4320bdd44122d7a93bc71c77a9d684b3c9adc (patch)
tree01e1d376a979ca0e71ebd016f89439c1f3dbd68c /proto/radv/radv.c
parent9f3e09832081bc029dc98ae6dda49ee86d138fde (diff)
RAdv: Allow solicited RAs to be sent as unicast
Add option to send solicited router advertisements as unicast directly to soliciting nodes instead of as multicast to all-nodes group.
Diffstat (limited to 'proto/radv/radv.c')
-rw-r--r--proto/radv/radv.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/proto/radv/radv.c b/proto/radv/radv.c
index 990b6024..622b3c3c 100644
--- a/proto/radv/radv.c
+++ b/proto/radv/radv.c
@@ -1,6 +1,8 @@
/*
* BIRD -- Router Advertisement
*
+ * (c) 2011--2019 Ondrej Zajicek <santiago@crfreenet.org>
+ * (c) 2011--2019 CZ.NIC z.s.p.o.
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
@@ -35,18 +37,14 @@
* case of the specified trigger prefix was changed.
*
* Supported standards:
- * - RFC 4861 - main RA standard
- * - RFC 4191 - Default Router Preferences and More-Specific Routes
- * - RFC 6106 - DNS extensions (RDDNS, DNSSL)
+ * RFC 4861 - main RA standard
+ * RFC 4191 - Default Router Preferences and More-Specific Routes
+ * RFC 6106 - DNS extensions (RDDNS, DNSSL)
*/
static void radv_prune_prefixes(struct radv_iface *ifa);
static void radv_prune_routes(struct radv_proto *p);
-/* Invalidate cached RA packet */
-static inline void radv_invalidate(struct radv_iface *ifa)
-{ ifa->plen = 0; }
-
static void
radv_timer(timer *tm)
{
@@ -56,16 +54,13 @@ radv_timer(timer *tm)
RADV_TRACE(D_EVENTS, "Timer fired on %s", ifa->iface->name);
- if (ifa->valid_time <= now)
- radv_invalidate(ifa);
-
if (ifa->prune_time <= now)
radv_prune_prefixes(ifa);
if (p->prune_time <= now)
radv_prune_routes(p);
- radv_send_ra(ifa);
+ radv_send_ra(ifa, IPA_NONE);
/* Update timer */
ifa->last = now;
@@ -627,7 +622,7 @@ radv_iface_shutdown(struct radv_iface *ifa)
if (ifa->sk)
{
radv_invalidate(ifa);
- radv_send_ra(ifa);
+ radv_send_ra(ifa, IPA_NONE);
}
}