diff options
author | Thomas Haller <thaller@redhat.com> | 2020-04-21 08:37:33 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-21 08:37:48 +0200 |
commit | ad5fdd9d62df3188f2b5e4af0804e073a207be2c (patch) | |
tree | 61daf4dad367b7d73e80dc3da74730bf73d13a60 /src | |
parent | a88be01da2c06203defd1b63b7f74f117daea401 (diff) | |
download | NetworkManager-ad5fdd9d62df3188f2b5e4af0804e073a207be2c.tar.gz |
Revert "IPv6 SLAAC: Clamp received PIO and RIO Lifetime Values"
This reverts commit 0cbd9193cd0d6d5c18641c20c7e3bd08642208ce.
This reverts commit a5290915d5e04a8f2277756d93a9857694f16029.
Diffstat (limited to 'src')
-rw-r--r-- | src/ndisc/nm-lndp-ndisc.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/src/ndisc/nm-lndp-ndisc.c b/src/ndisc/nm-lndp-ndisc.c index b698489c0d..b10adc91f3 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)), }; |