diff options
| author | Roy Marples <roy@marples.name> | 2012-11-14 10:30:50 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2012-11-14 10:30:50 +0000 |
| commit | 27ac6d558ade98bc0ef7a14b15ac35ed83d83d95 (patch) | |
| tree | 7c2b436312705e6a950dc5fcbf88246993c2c3b1 | |
| parent | 560c572f2b53a84a73005d350862f1d376db0557 (diff) | |
| download | dhcpcd-27ac6d558ade98bc0ef7a14b15ac35ed83d83d95.tar.xz | |
Expire RDNSS and DNSSL options if the RA expires.
| -rw-r--r-- | ipv6rs.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -937,6 +937,21 @@ ipv6rs_expire(void *arg) } TAILQ_FOREACH_SAFE(rao, &rap->options, next, raon) { + if (rap->expired) { + switch(rao->type) { + case ND_OPT_RDNSS: /* FALLTHROUGH */ + case ND_OPT_DNSSL: + /* RFC6018 end of section 5.2 states + * that if tha RA has a lifetime of 0 + * then we should expire these + * options */ + TAILQ_REMOVE(&rap->options, rao, next); + expired = 1; + free(rao->option); + free(rao); + continue; + } + } if (!timerisset(&rao->expire)) continue; if (timercmp(&now, &rao->expire, >)) { |
