rpaulo
0dcbc9b794
Implement TUN_IFHEAD, the missing piece that was breaking old applications.
2006-04-03 23:29:39 +00:00
rpaulo
782e550804
Add missing break tunwrite() which was causing EAFNOSUPPORT to be
...
returned, thus making IPv6 support broken.
!@#$%^...
2006-03-29 19:29:00 +00:00
thorpej
2be6494fc9
Use device_cfdata().
2006-03-29 04:16:44 +00:00
thorpej
39cd836ee1
Use device_unit().
2006-03-28 17:38:24 +00:00
christos
cbff0fb84a
Add a new function called ether_snprintf() which takes an external buffer
...
and a length. The buffer should be 3 * addrlen.
Remove local tap_ether_sprintf(), and use ether_snprintf() instead.
2006-03-16 15:57:59 +00:00
christos
cbf41b4afc
Remove duplicate and slightly different declaration of ether_sprintf, which
...
really should be in if_ether.h like all the other ether_ functions.
2006-03-16 15:56:28 +00:00
lukem
a1f606d3fd
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
...
Add a space between numbers and Hz unit.
2006-03-08 23:46:22 +00:00
msaitoh
1e5874b3c2
fix memory leak when resetting the source address and destination address.
2006-03-08 03:09:33 +00:00
rpaulo
d5648da4c6
Some minor KNF.
2006-03-03 19:57:37 +00:00
rpaulo
ece0242b47
Fix typo in comment.
2006-03-03 19:46:35 +00:00
christos
02b2f1b2b5
Provide ppp like statistics instead of grovelling through the kernel
...
symbols.
2006-03-02 17:20:07 +00:00
rpaulo
a0814a3043
Add full support for IPv6 tunnels. From DEGROOTE Arnaud in PR 32944.
...
The PR submitter and the PR handler were unable to test this code
using Teredo userland clients such as Miredo. However, the PR handler
dumped and analyzed some of the packets produced by Miredo and they
seemed fine.
(On a side note: I was unable to setup Teredo in Windows XP and the
problem seemed similar to what I currently see in NetBSD: lack of
replies from the Teredo relay).
2006-02-28 00:38:35 +00:00
drochner
be8cb1f8b9
add missing DLTs from the libpcap-0.9.4 distribution
2006-02-27 14:22:26 +00:00
drochner
4cf9c4d0dc
fix bpf_validate():
...
a missing "break" caused any bpf filter containing
a division to be rejected
2006-02-27 11:42:58 +00:00
wiz
1ad8067cb3
Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
...
forwarded by jmc@openbsd.
2006-02-25 00:58:34 +00:00
pooka
833be9a435
comment police: p_dupfd is now known as l_dupfd and lives in struct lwp
2006-02-24 12:54:48 +00:00
rpaulo
08d09ff6c5
In sysctl_iflist() don't assume TAILQ_FIRST() will never be NULL.
...
Prevents crash found by Uwe and fix confirmed working by Jeff Ito (all
on tech-net).
2006-02-21 22:01:17 +00:00
perry
fbae48b901
Change "inline" back to "__inline" in .h files -- C99 is still too
...
new, and some apps compile things in C89 mode. C89 keywords stay.
As per core@.
2006-02-16 20:17:12 +00:00
bjh21
24b46da494
Make Econet code compile again.
2006-02-12 10:32:46 +00:00
wiz
9037345f22
Add a /* CONSTCOND */ for lint.
2006-02-07 20:10:48 +00:00
rpaulo
be72809857
Add preliminary/not tested support for IPv6.
2006-02-05 16:44:55 +00:00
cube
97047d48dd
Properly dispose of cfdata memory when unloading the tap(4) LKM.
2006-02-01 05:51:58 +00:00
martin
0975a4b449
Make sure error messages (received from the access concentrator) are
...
zero terminated.
2006-01-31 23:50:15 +00:00
rpaulo
219ca2b318
Replace the comment that came from if_loop.c many years ago by
...
something that matches reality.
2006-01-31 22:27:15 +00:00
christos
f0551e03f4
PR/32676: Yves-Emmanuel JUTARD: faithprefix should only be defined with INET6
2006-01-31 17:15:20 +00:00
jdolecek
8ce024013a
fix VLAN_ATTACHED() macro, it was always true due to condition bug
...
Fixes PR kern/32645 by Pavel Cahyna
2006-01-29 09:57:59 +00:00
rpaulo
e4a54dec0a
Reflect reality (ktrace-lwp).
2006-01-28 01:49:58 +00:00
rpaulo
78678b130a
Better support of IPv6 scoped addresses.
...
- most of the kernel code will not care about the actual encoding of
scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
scoped addresses as a special case.
- scope boundary check will be stricter. For example, the current
*BSD code allows a packet with src=::1 and dst=(some global IPv6
address) to be sent outside of the node, if the application do:
s = socket(AF_INET6);
bind(s, "::1");
sendto(s, some_global_IPv6_addr);
This is clearly wrong, since ::1 is only meaningful within a single
node, but the current implementation of the *BSD kernel cannot
reject this attempt.
- and, while there, don't try to remove the ff02::/32 interface route
entry in in6_ifdetach() as it's already gone.
This also includes some level of support for the standard source
address selection algorithm defined in RFC3484, which will be
completed on in the future.
From the KAME project via JINMEI Tatuya.
Approved by core@.
2006-01-21 00:15:35 +00:00
christos
4dde6a6d1b
Make sure that breq is also cleared (from Xin LI)
2006-01-17 13:23:02 +00:00
christos
a94f0325fe
zlib 1.2.3 changed the include protection variable names; adjust.
2006-01-14 20:17:12 +00:00
christos
81a0859118
prepare for userland compilation.
2006-01-14 18:58:05 +00:00
christos
1482d7ce1c
Make sure we initialize all structs to 0; from Xin LI
2006-01-09 13:04:38 +00:00
perry
23917a5e48
#ifdef _KERNEL some function prototypes and an inline function
...
definition.
XXX It may be that this file needs more namespace cleaning (or the
files that include it, like if.h, might need it.)
2006-01-04 21:10:09 +00:00
yamt
95b350ea52
ppp_dequeue: fix a mbuf leak/packet loss introduced by rev.1.104.
2006-01-02 01:42:36 +00:00
christos
fffd2322a9
make this compile with no INET option
2005-12-28 09:08:20 +00:00
christos
cab48fd783
PR/5901: Felix A. Croes: PPP fast queue blocks traffic at normal priority.
...
Applied fix, similar to the one suggested in the PR. We use a counter to
limit the number of consecutive packets accepted from the fast queue. This
number can be set via ioctl, but this has not been implemented. Since there
are only 2 queues other proposed solutions such as ALTQ are overkill and
they have not been implemented in the past 7 years. Now LCP echos can be
used to detect that the line is up.
2005-12-28 08:13:24 +00:00
rpaulo
7eace3f40d
Kill BPF_KERN_FILTER. Seems like it died with the new pppd import.
...
No replies from tech-kern@, but who introduced this option 8 years ago
(Christos) said it's ok to remove it.
2005-12-26 15:45:48 +00:00
perry
0f0296d88a
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
2005-12-24 20:45:08 +00:00
rpaulo
08ac963d6f
Correct typo in comments.
2005-12-14 22:46:52 +00:00
rpaulo
43bb9c133c
Fix previous commit: ABS, IND and MSH are valid codes.
2005-12-14 20:33:46 +00:00
christos
49743c0da1
argument type conflict.
2005-12-14 00:28:08 +00:00
rpaulo
7174b22dd3
In bpf_validate(), get rid of bpf_maxbufsize test as there are other
...
clients of bpf_filter(), like if_ppp, that are not limited by
bpf_maxbufsize. The same check is done at the run time, so there is no
problem created.
Noticed by Guy Harris in private email.
2005-12-13 23:53:49 +00:00
thorpej
63eac52bac
ANSI function decls and application of static.
2005-12-11 23:05:24 +00:00
christos
b41db3f2c3
Protect zlib.h with the same symbol as userland.
...
XXX: We should either not install this, or have only one copy.
2005-12-11 19:15:38 +00:00
christos
95e1ffb156
merge ktrace-lwp.
2005-12-11 12:16:03 +00:00
elad
976bf6cfdd
Multiple inclusion protection, as suggested by christos@ on tech-kern@
...
few days ago.
2005-12-10 23:21:38 +00:00
christos
a8ffde9f61
make the ALTQ macros statement-line, by wrapping them in do {} while (0)
2005-12-06 02:56:25 +00:00
rpaulo
5eb6226d2b
Oops, the previous revision had a wrong pre-processor #if clause.
2005-12-05 22:38:40 +00:00
rpaulo
7246666eed
Make the bpf_maxbufsize a constant when bpfilter pseudo-device is not
...
present in the kernel config, thus fixing the build. Problem reported
by Havard Eidnes. Solution proposed by Christos, thanks.
2005-12-05 21:46:00 +00:00
rpaulo
fe7fedbe4c
PR 32198: bpf_validate() needs to do more checks, from Otto Moerbeek/OpenBSD
...
via Guy Harris.
Problems like out-of-bounds read/write in filter machine operations
were fixed.
2005-11-30 23:14:38 +00:00