about summary refs log tree commit diff
path: root/src/ndisc/nm-lndp-ndisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ndisc/nm-lndp-ndisc.c')
-rw-r--r--src/ndisc/nm-lndp-ndisc.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/ndisc/nm-lndp-ndisc.c b/src/ndisc/nm-lndp-ndisc.c
index b698489c..b10adc91 100644
--- a/src/ndisc/nm-lndp-ndisc.c
+++ b/src/ndisc/nm-lndp-ndisc.c
@@ -101,8 +101,6 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
 	int offset;
 	int hop_limit;
 	guint32 val;
-	guint32 clamp_pltime;
-	guint32 clamp_vltime;
 
 	/* Router discovery is subject to the following RFC documents:
 	 *
@@ -167,22 +165,7 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
 			changed |= NM_NDISC_CONFIG_GATEWAYS;
 	}
 
-	/* Addresses & Routes
-	 *
-	 * The Preferred Lifetime and Valid Lifetime of PIOs are capped to Router Lifetime
-	 * and NM_NDISC_VLTIME_MULT * Preferred Lifetime, respectively.
-	 *
-	 * The Lifetime of RIOs is capped to the Router Lifetime (there is no point in
-	 * maintaining a route if it employs a dead router).
-	 *
-	 * See draft-gont-6man-slaac-renum
-	 */
-	#define NM_NDISC_VLTIME_MULT ((guint32) 48)
-	clamp_pltime = ndp_msgra_router_lifetime (msgra);
-	clamp_vltime =   (clamp_pltime < G_MAXUINT32 / NM_NDISC_VLTIME_MULT)
-	               ? clamp_pltime * NM_NDISC_VLTIME_MULT
-	               : G_MAXUINT32;
-
+	/* Addresses & Routes */
 	ndp_msg_opt_for_each_offset (offset, msg, NDP_MSG_OPT_PREFIX) {
 		guint8 r_plen;
 		struct in6_addr r_network;
@@ -203,7 +186,7 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
 				.network = r_network,
 				.plen = r_plen,
 				.timestamp = now,
-				.lifetime = NM_MIN (ndp_msg_opt_prefix_valid_time (msg, offset), clamp_vltime),
+				.lifetime = ndp_msg_opt_prefix_valid_time (msg, offset),
 			};
 
 			if (nm_ndisc_add_route (ndisc, &route))
@@ -216,8 +199,8 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
 			NMNDiscAddress address = {
 				.address = r_network,
 				.timestamp = now,
-				.lifetime = NM_MIN (ndp_msg_opt_prefix_valid_time (msg, offset), clamp_vltime),
-				.preferred = NM_MIN (ndp_msg_opt_prefix_preferred_time (msg, offset), clamp_pltime),
+				.lifetime = ndp_msg_opt_prefix_valid_time (msg, offset),
+				.preferred = ndp_msg_opt_prefix_preferred_time (msg, offset),
 			};
 
 			if (address.preferred <= address.lifetime) {
@@ -231,7 +214,7 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
 			.gateway = gateway_addr,
 			.plen = ndp_msg_opt_route_prefix_len (msg, offset),
 			.timestamp = now,
-			.lifetime = NM_MIN (ndp_msg_opt_route_lifetime (msg, offset), clamp_pltime),
+			.lifetime = ndp_msg_opt_route_lifetime (msg, offset),
 			.preference = _route_preference_coerce (ndp_msg_opt_route_preference (msg, offset)),
 		};