if_gre.c (151266) | if_gre.c (151967) |
---|---|
1/* $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */ | 1/* $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */ |
2/* $FreeBSD: head/sys/net/if_gre.c 151266 2005-10-12 19:52:16Z thompsa $ */ | 2/* $FreeBSD: head/sys/net/if_gre.c 151967 2005-11-02 13:46:32Z andre $ */ |
3 4/*- 5 * Copyright (c) 1998 The NetBSD Foundation, Inc. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to The NetBSD Foundation 9 * by Heiko W.Rupp <hwr@pilhuhn.de> 10 * --- 299 unchanged lines hidden (view full) --- 310 ip->ip_src.s_addr = sc->g_src.s_addr; 311 msiz = MOB_H_SIZ_L; 312 } 313 mob_h.proto = htons(mob_h.proto); 314 mob_h.hcrc = gre_in_cksum((u_int16_t *)&mob_h, msiz); 315 316 if ((m->m_data - msiz) < m->m_pktdat) { 317 /* need new mbuf */ | 3 4/*- 5 * Copyright (c) 1998 The NetBSD Foundation, Inc. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to The NetBSD Foundation 9 * by Heiko W.Rupp <hwr@pilhuhn.de> 10 * --- 299 unchanged lines hidden (view full) --- 310 ip->ip_src.s_addr = sc->g_src.s_addr; 311 msiz = MOB_H_SIZ_L; 312 } 313 mob_h.proto = htons(mob_h.proto); 314 mob_h.hcrc = gre_in_cksum((u_int16_t *)&mob_h, msiz); 315 316 if ((m->m_data - msiz) < m->m_pktdat) { 317 /* need new mbuf */ |
318 MGETHDR(m0, M_DONTWAIT, MT_HEADER); | 318 MGETHDR(m0, M_DONTWAIT, MT_DATA); |
319 if (m0 == NULL) { 320 _IF_DROP(&ifp->if_snd); 321 m_freem(m); 322 error = ENOBUFS; 323 goto end; 324 } 325 m0->m_next = m; 326 m->m_data += sizeof(struct ip); --- 482 unchanged lines hidden --- | 319 if (m0 == NULL) { 320 _IF_DROP(&ifp->if_snd); 321 m_freem(m); 322 error = ENOBUFS; 323 goto end; 324 } 325 m0->m_next = m; 326 m->m_data += sizeof(struct ip); --- 482 unchanged lines hidden --- |