Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

in prelist_update(), made sure to keep the current stored lifetime

when not updating.
  • Loading branch information...
commit c7b2e10cad79e3e272312db863d9b9ad65e03226 1 parent 6fa0ea2
jinmei authored

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. +5 2 kame/sys/netinet6/nd6_rtr.c
7 kame/sys/netinet6/nd6_rtr.c
... ... @@ -1,4 +1,4 @@
1   -/* $KAME: nd6_rtr.c,v 1.227 2003/02/07 15:09:28 suz Exp $ */
  1 +/* $KAME: nd6_rtr.c,v 1.228 2003/03/22 09:03:15 jinmei Exp $ */
2 2
3 3 /*
4 4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -1506,6 +1506,10 @@ prelist_update(new, dr, m)
1506 1506 } else
1507 1507 storedlifetime = lt6_tmp.ia6t_vltime -
1508 1508 (time_second - ifa6->ia6_updatetime);
  1509 +
  1510 + /* when not updating, keep the current stored lifetime. */
  1511 + lt6_tmp.ia6t_vltime = storedlifetime;
  1512 +
1509 1513 if (TWOHOUR < new->ndpr_vltime ||
1510 1514 storedlifetime < new->ndpr_vltime) {
1511 1515 lt6_tmp.ia6t_vltime = new->ndpr_vltime;
@@ -2323,7 +2327,6 @@ in6_init_address_ltimes(struct nd_prefix *new, struct in6_addrlifetime *lt6)
2323 2327 long time_second = time.tv_sec;
2324 2328 #endif
2325 2329
2326   - /* Valid lifetime must not be updated unless explicitly specified. */
2327 2330 /* init ia6t_expire */
2328 2331 if (lt6->ia6t_vltime == ND6_INFINITE_LIFETIME)
2329 2332 lt6->ia6t_expire = 0;

0 comments on commit c7b2e10

Please sign in to comment.
Something went wrong with that request. Please try again.