Deleted Added
full compact
if_gre.c (128580) if_gre.c (128583)
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 128580 2004-04-23 16:10:23Z andre $ */
2/* $FreeBSD: head/sys/net/if_gre.c 128583 2004-04-23 16:57:43Z 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 *

--- 369 unchanged lines hidden (view full) ---

380 ((struct ip*)gh)->ip_ttl = GRE_TTL;
381 ((struct ip*)gh)->ip_tos = ip->ip_tos;
382 ((struct ip*)gh)->ip_id = ip->ip_id;
383 gh->gi_len = m->m_pkthdr.len;
384 }
385
386 ifp->if_opackets++;
387 ifp->if_obytes += m->m_pkthdr.len;
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 *

--- 369 unchanged lines hidden (view full) ---

380 ((struct ip*)gh)->ip_ttl = GRE_TTL;
381 ((struct ip*)gh)->ip_tos = ip->ip_tos;
382 ((struct ip*)gh)->ip_id = ip->ip_id;
383 gh->gi_len = m->m_pkthdr.len;
384 }
385
386 ifp->if_opackets++;
387 ifp->if_obytes += m->m_pkthdr.len;
388 /* send it off */
388 /*
389 * Send it off and with IP_FORWARD flag to prevent it from
390 * overwriting the ip_id again. ip_id is already set to the
391 * ip_id of the encapsulated packet.
392 */
389 error = ip_output(m, NULL, &sc->route, IP_FORWARDING,
390 (struct ip_moptions *)NULL, (struct inpcb *)NULL);
391 end:
392 sc->called = 0;
393 if (error)
394 ifp->if_oerrors++;
395 return (error);
396}

--- 381 unchanged lines hidden ---
393 error = ip_output(m, NULL, &sc->route, IP_FORWARDING,
394 (struct ip_moptions *)NULL, (struct inpcb *)NULL);
395 end:
396 sc->called = 0;
397 if (error)
398 ifp->if_oerrors++;
399 return (error);
400}

--- 381 unchanged lines hidden ---