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
commit1437db1d25f09c5235ed792bd278ee3f0f17dd65 (patch)
treedecb2c14336f00dff8f505e394e099ec8a2c40ba /src/if.h
parent81edfe77f1ab8c5e9d5761fda73506d2a28710fb (diff)
downloaddhcpcd-1437db1d25f09c5235ed792bd278ee3f0f17dd65.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 *);