summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2007-08-14 16:03:48 +0000
committerjoerg <joerg@NetBSD.org>2007-08-14 16:03:48 +0000
commitb2dde09db15b51a37ce41fa0fd2bdb46d616534f (patch)
tree0bbffe1dafecdb7ff89a2c6a88ddf8fc0348be4b /sys
parentc360a79960d82f00d4aeb6f17f1595bff22e7e35 (diff)
Explicitly assert that the protocol out pr_ctloutput before calling it.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_gre.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index dcc2f91b51f..15ae9446662 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gre.c,v 1.99 2007/08/14 13:36:50 seanb Exp $ */
+/* $NetBSD: if_gre.c,v 1.100 2007/08/14 16:03:48 joerg Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.99 2007/08/14 13:36:50 seanb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.100 2007/08/14 16:03:48 joerg Exp $");
#include "opt_gre.h"
#include "opt_inet.h"
@@ -338,6 +338,7 @@ gre_socreate1(struct gre_softc *sc, struct lwp *l, struct gre_soparm *sp,
*mtod(m, int *) = ip_gre_ttl;
m->m_len = sizeof(int);
+ KASSERT(so->so_proto && so->so_proto->pr_ctloutput);
rc = (*so->so_proto->pr_ctloutput)(PRCO_SETOPT, so, IPPROTO_IP, IP_TTL,
&m);
m = NULL;