diff options
author | andre <andre@FreeBSD.org> | 2004-04-23 16:10:23 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2004-04-23 16:10:23 +0000 |
commit | 6207069c8cfb402a6b8a2f768835817a791a6c0d (patch) | |
tree | 2640025f77b01b1e7ac0ef025870b6f82e782573 | |
parent | 541bfdc704176641eb9f10379e0a53dc0aa75bee (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/net/if_gre.c | 4 |
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; |