diff options
| author | Roy Marples <roy@marples.name> | 2018-03-19 15:39:05 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2018-03-19 15:39:05 +0000 |
| commit | a15bffa6a0ac58a5f13747525d5f0f420140c82c (patch) | |
| tree | decb2c14336f00dff8f505e394e099ec8a2c40ba /src/if.h | |
| parent | 07b28b41e12717e5ee4b9755a2ce0dc3e2ce1f81 (diff) | |
| download | dhcpcd-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 *); |
