diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-05-03 01:43:08 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-05-03 01:43:08 +0000 |
commit | ee6dfba4cfdef1995bcc85ac8f44a5dd8a74d3b9 (patch) | |
tree | d05315dcfa23ed54328e1fff3357b6e1bcd80879 /sys/net | |
parent | 3895590e9d9536eb3bfbc13cc22ffd02c6f97234 (diff) |
just as a safety measure, set m_flags to 0 for mbufs allocated on stack.
dhartmei ok
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_faith.c | 3 | ||||
-rw-r--r-- | sys/net/if_gif.c | 3 | ||||
-rw-r--r-- | sys/net/if_loop.c | 3 | ||||
-rw-r--r-- | sys/net/if_vlan.c | 4 |
4 files changed, 9 insertions, 4 deletions
diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c index f9096d9a3a6..45d6d7a5192 100644 --- a/sys/net/if_faith.c +++ b/sys/net/if_faith.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_faith.c,v 1.12 2002/06/30 13:04:36 itojun Exp $ */ +/* $OpenBSD: if_faith.c,v 1.13 2003/05/03 01:43:07 itojun Exp $ */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -141,6 +141,7 @@ faithoutput(ifp, m, dst, rt) struct mbuf m0; u_int32_t af = dst->sa_family; + m0.m_flags = 0; m0.m_next = m; m0.m_len = 4; m0.m_data = (char *)⁡ diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 1ffbeb66212..d7bc71ed518 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.26 2003/01/20 01:34:26 itojun Exp $ */ +/* $OpenBSD: if_gif.c,v 1.27 2003/05/03 01:43:07 itojun Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -199,6 +199,7 @@ gif_output(ifp, m, dst, rt) struct mbuf m0; u_int32_t af = dst->sa_family; + m0.m_flags = 0; m0.m_next = m; m0.m_len = 4; m0.m_data = (char *)⁡ diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index e9007158fd5..76a971badb6 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_loop.c,v 1.26 2003/01/07 09:00:33 kjc Exp $ */ +/* $OpenBSD: if_loop.c,v 1.27 2003/05/03 01:43:07 itojun Exp $ */ /* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */ /* @@ -241,6 +241,7 @@ looutput(ifp, m, dst, rt) struct mbuf m0; u_int32_t af = htonl(dst->sa_family); + m0.m_flags = 0; m0.m_next = m; m0.m_len = sizeof(af); m0.m_data = (char *)⁡ diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 4ff6f3b3613..22ee8975afe 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.35 2003/03/24 17:59:48 jason Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.36 2003/05/03 01:43:07 itojun Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology * @@ -351,6 +351,8 @@ vlan_input(eh, m) * that yet. */ struct mbuf m0; + + m0.m_flags = 0; m0.m_next = m; m0.m_len = sizeof(struct ether_header); m0.m_data = (char *)eh; |