summaryrefslogtreecommitdiffstats
path: root/route.h
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2011-08-16 20:05:13 +0200
committerDavid Sommerseth <davids@redhat.com>2011-08-24 14:24:56 +0200
commitf0257abb14423de5ee24444360fbb474555ef3cf (patch)
tree8462fbd8a4f2126ecb3507a9f250466c469b44bd /route.h
parentca18a638aa7cf316611f893127ba44131e57083c (diff)
downloadopenvpn-f0257abb14423de5ee24444360fbb474555ef3cf.tar.gz
openvpn-f0257abb14423de5ee24444360fbb474555ef3cf.tar.xz
openvpn-f0257abb14423de5ee24444360fbb474555ef3cf.zip
For all accesses to "struct route_list * rl", check first that rl is non-NULL
In IPv4-only mode, this cannot happen, but if IPv6 is enabled and a servers pushes IPv6 routes and no IPv4 routes -> crash boom. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-By: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'route.h')
-rw-r--r--route.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/route.h b/route.h
index f900d3e..9953478 100644
--- a/route.h
+++ b/route.h
@@ -328,7 +328,7 @@ route_list_vpn_gateway_needed (const struct route_list *rl)
static inline int
route_did_redirect_default_gateway(const struct route_list *rl)
{
- return BOOL_CAST(rl->iflags & RL_DID_REDIRECT_DEFAULT_GATEWAY);
+ return rl && BOOL_CAST(rl->iflags & RL_DID_REDIRECT_DEFAULT_GATEWAY);
}
#endif