Date: Thu, 22 Jun 1995 05:40:30 +0400 (MSD) From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka "Andrey A. Chernov, Black Mage" <ache@astral.msk.su> To: hackers@freebsd.org Cc: David Greenman <davidg@freebsd.org>, "Garrett A. Wollman" <wollman@lcs.mit.edu> Subject: Fix NULL-encapsulated interfaces (lo & tun) handling (DLT_NULL) Message-ID: <OHEeCwlOZA@deep-thought.demos.su>
next in thread | raw e-mail | index | archive | help
Any comments? I plan to commit...
*** gencode.c.bak Tue Jun 13 02:01:05 1995
--- gencode.c Thu Jun 22 05:31:16 1995
***************
*** 471,478 ****
return;
case DLT_NULL:
! off_linktype = -1;
! off_nl = 0;
return;
case DLT_PPP:
--- 471,478 ----
return;
case DLT_NULL:
! off_linktype = 0;
! off_nl = 4;
return;
case DLT_PPP:
***************
*** 543,548 ****
--- 543,557 ----
if (proto == ETHERTYPE_IP)
proto = 0x0021; /* XXX - need ppp.h defs */
break;
+
+ case DLT_NULL:
+ if (proto == ETHERTYPE_IP) {
+ proto = htonl(AF_INET); /* loopback & tun put */
+ /* sa_family into */
+ /* prepended word */
+ return gen_cmp(off_linktype, BPF_W, (long)proto);
+ }
+ break;
}
return gen_cmp(off_linktype, BPF_H, (long)proto);
}
--
Andrey A. Chernov : And I rest so composedly, /Now, in my bed,
ache@astral.msk.su : That any beholder /Might fancy me dead -
FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead.
RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?OHEeCwlOZA>
