projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
date and time created 85/07/26 13:37:37 by sam
[unix-history]
/
usr
/
src
/
sys
/
netns
/
ns_ip.c
diff --git
a/usr/src/sys/netns/ns_ip.c
b/usr/src/sys/netns/ns_ip.c
index
58a6da8
..
b91cfea
100644
(file)
--- a/
usr/src/sys/netns/ns_ip.c
+++ b/
usr/src/sys/netns/ns_ip.c
@@
-1,4
+1,10
@@
-/* ns_ip.c 6.1 85/05/30 */
+/*
+ * Copyright (c) 1982 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ * @(#)ns_ip.c 6.3 (Berkeley) %G%
+ */
/*
* Software interface driver for encapsulating ns in ip.
/*
* Software interface driver for encapsulating ns in ip.
@@
-138,6
+144,7
@@
idpip_input(m0)
m->m_len -= sizeof (struct ip);
idp = mtod(m, struct idp *);
len = ntohs(idp->idp_len);
m->m_len -= sizeof (struct ip);
idp = mtod(m, struct idp *);
len = ntohs(idp->idp_len);
+ if (len & 1) len++; /* Preserve Garbage Byte */
if (ip->ip_len != len) {
if (len > ip->ip_len) {
nsipif.if_ierrors++;
if (ip->ip_len != len) {
if (len > ip->ip_len) {
nsipif.if_ierrors++;
@@
-194,6
+201,7
@@
nsipoutput(ifn, m0, dst)
* for IP header.
*/
len = ntohs(idp->idp_len);
* for IP header.
*/
len = ntohs(idp->idp_len);
+ if (len & 1) len++; /* Preserve Garbage Byte */
m = m0;
if(m->m_off < MMINOFF + sizeof (struct ip)) {
m = m_get(M_DONTWAIT, MT_HEADER);
m = m0;
if(m->m_off < MMINOFF + sizeof (struct ip)) {
m = m_get(M_DONTWAIT, MT_HEADER);