ip_gre.c (125024) | ip_gre.c (125226) |
---|---|
1/* $NetBSD: ip_gre.c,v 1.29 2003/09/05 23:02:43 itojun Exp $ */ | 1/* $NetBSD: ip_gre.c,v 1.29 2003/09/05 23:02:43 itojun Exp $ */ |
2/* $FreeBSD: head/sys/netinet/ip_gre.c 125024 2004-01-26 12:33:56Z sobomax $ */ | 2/* $FreeBSD: head/sys/netinet/ip_gre.c 125226 2004-01-30 09:03:01Z sobomax $ */ |
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 * --- 188 unchanged lines hidden (view full) --- 199 /* others not yet supported */ 200 return (0); 201 } 202 203 if (hlen > m->m_pkthdr.len) { 204 m_freem(m); 205 return (EINVAL); 206 } | 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 * --- 188 unchanged lines hidden (view full) --- 199 /* others not yet supported */ 200 return (0); 201 } 202 203 if (hlen > m->m_pkthdr.len) { 204 m_freem(m); 205 return (EINVAL); 206 } |
207 /* Unlike NetBSD, in FreeBSD m_adj() adjusts m->m_pkthdr.len as well */ |
|
207 m_adj(m, hlen); | 208 m_adj(m, hlen); |
208 m->m_pkthdr.len -= hlen; | |
209 210 if (sc->sc_if.if_bpf) { 211 u_int32_t af = AF_INET; 212 bpf_mtap2(sc->sc_if.if_bpf, &af, sizeof(af), m); 213 } 214 215 m->m_pkthdr.rcvif = &sc->sc_if; 216 --- 120 unchanged lines hidden --- | 209 210 if (sc->sc_if.if_bpf) { 211 u_int32_t af = AF_INET; 212 bpf_mtap2(sc->sc_if.if_bpf, &af, sizeof(af), m); 213 } 214 215 m->m_pkthdr.rcvif = &sc->sc_if; 216 --- 120 unchanged lines hidden --- |