summaryrefslogtreecommitdiffstats
path: root/sys/net/if_gre.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-04-23 16:10:23 +0000
committerandre <andre@FreeBSD.org>2004-04-23 16:10:23 +0000
commit6207069c8cfb402a6b8a2f768835817a791a6c0d (patch)
tree2640025f77b01b1e7ac0ef025870b6f82e782573 /sys/net/if_gre.c
parent541bfdc704176641eb9f10379e0a53dc0aa75bee (diff)
downloadFreeBSD-src-6207069c8cfb402a6b8a2f768835817a791a6c0d.zip
FreeBSD-src-6207069c8cfb402a6b8a2f768835817a791a6c0d.tar.gz
Call ip_output() with IP_FORWARD flag to prevent it from overwriting the
ip_id again. ip_id is already set to the ip_id of the encapsulated packet. Make a comment about mbuf allocation failures more realistic. Reviewed by: sobomax
Diffstat (limited to 'sys/net/if_gre.c')
-rw-r--r--sys/net/if_gre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index a2f731e..89c4b63 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -359,7 +359,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
goto end;
}
- if (m == NULL) { /* impossible */
+ if (m == NULL) { /* mbuf allocation failed */
_IF_DROP(&ifp->if_snd);
error = ENOBUFS;
goto end;
@@ -386,7 +386,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
/* send it off */
- error = ip_output(m, NULL, &sc->route, 0,
+ error = ip_output(m, NULL, &sc->route, IP_FORWARDING,
(struct ip_moptions *)NULL, (struct inpcb *)NULL);
end:
sc->called = 0;
OpenPOWER on IntegriCloud