From 33f672908de6779756f54d87892f62fe76ce38ad Mon Sep 17 00:00:00 2001 From: dyoung Date: Thu, 16 Nov 2006 22:58:00 +0000 Subject: [PATCH] Correct the length of the TTL argument to setsockopt(IPPROTO_IP, IP_TTL). --- sys/net/if_gre.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index d56adc3630ec..df26cc2de56f 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gre.c,v 1.75 2006/11/16 22:26:35 dyoung Exp $ */ +/* $NetBSD: if_gre.c,v 1.76 2006/11/16 22:58:00 dyoung Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.75 2006/11/16 22:26:35 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.76 2006/11/16 22:58:00 dyoung Exp $"); #include "opt_gre.h" #include "opt_inet.h" @@ -328,6 +328,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); rc = (*so->so_proto->pr_ctloutput)(PRCO_SETOPT, so, IPPROTO_IP, IP_TTL, &m); m = NULL;