diff options
| author | thorpej <thorpej@NetBSD.org> | 2000-07-05 21:01:38 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2000-07-05 21:01:38 +0000 |
| commit | 434860386265a4e38276ea8656d729d27b02c007 (patch) | |
| tree | bd274cc2e2b9998c886fce93ccf93b6e05f19cb2 /sys | |
| parent | 7ca7a7f6589e684287bfb56c23b879380eccab7f (diff) | |
RFCs 1853, 2003, 2401 -- copy the DF bit.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/netinet/in_gif.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c index 215d6862271..389ba8a705d 100644 --- a/sys/netinet/in_gif.c +++ b/sys/netinet/in_gif.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_gif.c,v 1.14 2000/04/26 05:36:41 itojun Exp $ */ +/* $NetBSD: in_gif.c,v 1.15 2000/07/05 21:01:38 thorpej Exp $ */ /* $KAME: in_gif.c,v 1.39 2000/04/26 05:33:31 itojun Exp $ */ /* @@ -122,6 +122,8 @@ in_gif_output(ifp, family, m, rt) return EAFNOSUPPORT; } + bzero(&iphdr, sizeof(iphdr)); + switch (family) { #ifdef INET case AF_INET: @@ -136,6 +138,9 @@ in_gif_output(ifp, family, m, rt) } ip = mtod(m, struct ip *); tos = ip->ip_tos; + + /* RFCs 1853, 2003, 2401 -- copy the DF bit. */ + iphdr.ip_off |= (ntohs(ip->ip_off) & IP_DF); break; } #endif /*INET*/ @@ -163,7 +168,6 @@ in_gif_output(ifp, family, m, rt) return EAFNOSUPPORT; } - bzero(&iphdr, sizeof(iphdr)); iphdr.ip_src = sin_src->sin_addr; if (ifp->if_flags & IFF_LINK0) { /* multi-destination mode */ |
