File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 2525 * Default: 0.33 * MaxRtrAdvInterval If MaxRtrAdvInterval >= 9 seconds; otherwise, the Default is
2626 * MaxRtrAdvInterval (Note, this should be a typo. We use 0.75 * MaxRtrAdvInterval). */
2727#define RADV_DEFAULT_MIN_TIMEOUT_USEC (RADV_DEFAULT_MAX_TIMEOUT_USEC / 3)
28+ /* RFC 4861 section 6.2.4.
29+ * AdvDefaultLifetime
30+ * The value to be placed in the Router Lifetime field of Router Advertisements sent from the interface,
31+ * in seconds. MUST be either zero or between MaxRtrAdvInterval and 9000 seconds. A value of zero
32+ * indicates that the router is not to be used as a default router. These limits may be overridden by
33+ * specific documents that describe how IPv6 operates over different link layers. For instance, in a
34+ * point-to-point link the peers may have enough information about the number and status of devices at
35+ * the other end so that advertisements are needed less frequently.
36+ * Default: 3 * MaxRtrAdvInterval */
37+ #define RADV_DEFAULT_ROUTER_LIFETIME_USEC (3 * RADV_DEFAULT_MAX_TIMEOUT_USEC)
2838/* RFC 4861 section 10.
2939 * MAX_INITIAL_RTR_ADVERT_INTERVAL 16 seconds
3040 * MAX_INITIAL_RTR_ADVERTISEMENTS 3 transmissions
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ _public_ int sd_radv_new(sd_radv **ret) {
3838 * ra = (sd_radv ) {
3939 .n_ref = 1 ,
4040 .fd = -1 ,
41+ .lifetime_usec = RADV_DEFAULT_ROUTER_LIFETIME_USEC ,
4142 };
4243
4344 * ret = TAKE_PTR (ra );
You can’t perform that action at this time.
0 commit comments