summaryrefslogtreecommitdiffstats
path: root/src/if.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-03-19 15:39:05 +0000
committerRoy Marples <roy@marples.name>2018-03-19 15:39:05 +0000
commita15bffa6a0ac58a5f13747525d5f0f420140c82c (patch)
treedecb2c14336f00dff8f505e394e099ec8a2c40ba /src/if.h
parent07b28b41e12717e5ee4b9755a2ce0dc3e2ce1f81 (diff)
downloaddhcpcd-a15bffa6a0ac58a5f13747525d5f0f420140c82c.tar.xz
link: detect buffer overflow / desync and relearn interface state
It's possible for the internal kernel buffer that reports network events to overflow. On Linux and NetBSD* this is handled by ENOBUFS being returned by recv(2). On OpenBSD there is a special route(4) message RTM_DESYNC. All other OS's don't seem to report this error, so dhcpcd cannot detect it. * I will commit a patch to NetBSD soon for this and will request a pullup to NetBSD-8.
Diffstat (limited to 'src/if.h')
-rw-r--r--src/if.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/if.h b/src/if.h
index 602f8e83..4f6c6fb6 100644
--- a/src/if.h
+++ b/src/if.h
@@ -116,7 +116,9 @@ int if_setflag(struct interface *ifp, short flag);
bool if_valid_hwaddr(const uint8_t *, size_t);
struct if_head *if_discover(struct dhcpcd_ctx *, struct ifaddrs **,
int, char * const *);
+void if_markaddrsstale(struct if_head *);
void if_learnaddrs(struct dhcpcd_ctx *, struct if_head *, struct ifaddrs **);
+void if_deletestaleaddrs(struct if_head *);
struct interface *if_find(struct if_head *, const char *);
struct interface *if_findindex(struct if_head *, unsigned int);
struct interface *if_loopback(struct dhcpcd_ctx *);