summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-ndisc.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-18 17:19:29 +0200
committerTom Gundersen <teg@jklm.no>2015-10-22 17:19:54 +0200
commit77b05fa9a7120f2acb94221ae42bc8bb681df347 (patch)
tree63dee3655d2afd74a0e903c814a6d5af097ea5de /src/libsystemd-network/sd-ndisc.c
parentc93578f54b02a162d48590b7b61191cae96e9c2b (diff)
downloadsystemd-77b05fa9a7120f2acb94221ae42bc8bb681df347.tar.gz
sd-ndisc: don't inform the caller of expired prefixes
The caller should push any lifetime information into the kernel and let the kernel handle prefix expiration.
Diffstat (limited to 'src/libsystemd-network/sd-ndisc.c')
-rw-r--r--src/libsystemd-network/sd-ndisc.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c
index 7921eb71a2..ceabd654ef 100644
--- a/src/libsystemd-network/sd-ndisc.c
+++ b/src/libsystemd-network/sd-ndisc.c
@@ -67,7 +67,6 @@ struct sd_ndisc {
int index;
struct ether_addr mac_addr;
uint32_t mtu;
- NDiscPrefix *expired_prefix;
LIST_HEAD(NDiscPrefix, prefixes);
int fd;
sd_event_source *recv;
@@ -283,11 +282,6 @@ static int ndisc_prefix_timeout(sd_event_source *s, uint64_t usec,
LIST_REMOVE(prefixes, nd->prefixes, prefix);
- nd->expired_prefix = prefix;
- ndisc_notify(nd,
- SD_NDISC_EVENT_ROUTER_ADVERTISMENT_PREFIX_EXPIRED);
- nd->expired_prefix = NULL;
-
prefix = ndisc_prefix_unref(prefix);
break;
@@ -390,20 +384,6 @@ int sd_ndisc_get_prefixlen(sd_ndisc *nd, const struct in6_addr *addr,
return 0;
}
-int sd_ndisc_get_expired_prefix(sd_ndisc *nd, struct in6_addr **addr, uint8_t *prefixlen) {
- assert_return(nd, -EINVAL);
- assert_return(addr, -EINVAL);
- assert_return(prefixlen, -EINVAL);
-
- if (!nd->expired_prefix)
- return -EADDRNOTAVAIL;
-
- *addr = &nd->expired_prefix->addr;
- *prefixlen = nd->expired_prefix->len;
-
- return 0;
-}
-
static int ndisc_prefix_update(sd_ndisc *nd, ssize_t len,
const struct nd_opt_prefix_info *prefix_opt) {
int r;