summaryrefslogtreecommitdiff
path: root/src/rdisc
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-04-01 22:46:46 +0200
committerThomas Haller <thaller@redhat.com>2014-06-06 20:01:37 +0200
commit84cfd06d6a7df892615f107190848c078e0e6705 (patch)
treeba911f784557a9274c7174a5facc68b3ee4144d6 /src/rdisc
parent8310a039d81e3a316cf657aa9f28edabb9be125c (diff)
downloadNetworkManager-84cfd06d6a7df892615f107190848c078e0e6705.tar.gz
core/platform: limit the preferred time to address lifetime
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1082041 Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/rdisc')
-rw-r--r--src/rdisc/nm-lndp-rdisc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rdisc/nm-lndp-rdisc.c b/src/rdisc/nm-lndp-rdisc.c
index f5efa1ec7f..cf0267d1c6 100644
--- a/src/rdisc/nm-lndp-rdisc.c
+++ b/src/rdisc/nm-lndp-rdisc.c
@@ -547,6 +547,8 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
address.timestamp = now;
address.lifetime = ndp_msg_opt_prefix_valid_time (msg, offset);
address.preferred = ndp_msg_opt_prefix_preferred_time (msg, offset);
+ if (address.preferred > address.lifetime)
+ address.preferred = address.lifetime;
fill_address_from_mac (&address.address, lladdr);