summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/ip_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index f37c993..2675385 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -246,7 +246,7 @@ again:
* Calculate MTU. If we have a route that is up, use that,
* otherwise use the interface's MTU.
*/
- if (ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST)) {
+ if (ro->ro_rt != NULL && (ro->ro_rt->rt_flags & (RTF_UP|RTF_HOST))) {
/*
* This case can happen if the user changed the MTU
* of an interface after enabling IP on it. Because
OpenPOWER on IntegriCloud