]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
OpenBSD: add some asserts
authorRoy Marples <roy@marples.name>
Mon, 4 Mar 2019 01:11:58 +0000 (01:11 +0000)
committerRoy Marples <roy@marples.name>
Mon, 4 Mar 2019 01:11:58 +0000 (01:11 +0000)
src/if-bsd.c

index f638c641840a914509114c7ba0c899fc7867b69f..8d281b4269048fe2eaa5559701e7acedffab3013 100644 (file)
@@ -469,6 +469,8 @@ if_route(unsigned char cmd, const struct rt *rt)
        bool gateway_unspec;
 
        assert(rt != NULL);
+       assert(rt->rt_ifp != NULL);
+       assert(rt->rt_ifp->ctx != NULL);
        ctx = rt->rt_ifp->ctx;
 
 #define ADDSA(sa) do {                                                       \