keysock.c (105197) | keysock.c (108107) |
---|---|
1/* $FreeBSD: head/sys/netipsec/keysock.c 105197 2002-10-16 02:10:08Z sam $ */ | 1/* $FreeBSD: head/sys/netipsec/keysock.c 108107 2002-12-19 22:58:27Z bmilekic $ */ |
2/* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 137 unchanged lines hidden (view full) --- 147 struct mbuf *m; 148 int promisc; 149{ 150 int error; 151 152 if (promisc) { 153 struct sadb_msg *pmsg; 154 | 2/* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 137 unchanged lines hidden (view full) --- 147 struct mbuf *m; 148 int promisc; 149{ 150 int error; 151 152 if (promisc) { 153 struct sadb_msg *pmsg; 154 |
155 M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT); | 155 M_PREPEND(m, sizeof(struct sadb_msg), M_DONTWAIT); |
156 if (m && m->m_len < sizeof(struct sadb_msg)) 157 m = m_pullup(m, sizeof(struct sadb_msg)); 158 if (!m) { 159 pfkeystat.in_nomem++; 160 m_freem(m); 161 return ENOBUFS; 162 } 163 m->m_pkthdr.len += sizeof(*pmsg); --- 440 unchanged lines hidden --- | 156 if (m && m->m_len < sizeof(struct sadb_msg)) 157 m = m_pullup(m, sizeof(struct sadb_msg)); 158 if (!m) { 159 pfkeystat.in_nomem++; 160 m_freem(m); 161 return ENOBUFS; 162 } 163 m->m_pkthdr.len += sizeof(*pmsg); --- 440 unchanged lines hidden --- |