itohy
344f9b7b00
Set the default line discipline to t_linesw, rather than just NULL it.
2000-11-02 12:00:49 +00:00
itohy
486a58959c
Adapt to the new line discipline scheme.
2000-11-02 11:00:53 +00:00
onoe
226930604b
Add new numbers from IANA: 0x83 - 0xbd
2000-10-26 06:51:31 +00:00
wiz
75311ca708
Fix typo (thinko?), which didn't allow MRU to be set below the default
...
value (instead of the minimum value). Patch supplied by Stephen Degler
in PR #9945 , and reviewed by Ignatios Souvatzis.
2000-10-26 01:26:15 +00:00
itojun
27fcf101a1
prevent stack overwrite due to bzero() arg mistake. from msaitoh.
2000-10-19 01:07:42 +00:00
matt
cf67b6ff59
When discarding oversized frame, say how long it was.
2000-10-15 19:49:55 +00:00
itojun
d7a216bb96
suppress warning on nd6_storelladdr failure. the failure could happen
...
easily when we have routing table with too many entries. sync with kame.
2000-10-15 15:39:11 +00:00
bouyer
29fdeefaff
Don't try to handle SIOCSIFADDR/SIOCADDMULTI/SIOCDELMULTI if a vlan/vlanif
...
hasn't been configured (prevent a panic in arp_ifinit when setting an
IP addr with no vlan/vlanif).
2000-10-15 11:58:26 +00:00
thorpej
fabbb33a60
Implement ether_ioctl(), ioctl operations common to all Ethernet
...
interfaces.
2000-10-11 16:53:41 +00:00
thorpej
7e2259325b
Change the if_reset vector to if_init, and add an if_stop. if_stop
...
also takes an argument indicating whether or not the interface should
also be disabled (i.e. power removed, resources freed, etc.)
2000-10-11 16:52:34 +00:00
itojun
014e2a97b5
fix comment (s/IPv6/IP/)
2000-10-10 11:43:51 +00:00
ad
04e67112d6
Remove defunct bpfdetach()/ether_ifdetach() calls.
2000-10-10 10:07:35 +00:00
itojun
4eb5250694
fix operator precedence (& and &&). do not transmit too much message
...
from LCP layer to NCP layer. PR 11161.
2000-10-08 02:37:42 +00:00
itojun
08af3d2f82
validate args to SIOC[SG]IFPHY* better.
2000-10-07 04:18:04 +00:00
itojun
ff01d6f0b1
repair SIOCGIFP{DST,SRC}ADDR.
2000-10-07 03:41:38 +00:00
onoe
3ec2a62f74
unique #include opt_inet.h
2000-10-06 04:49:53 +00:00
itojun
bb4b4d9e39
ifp->if_ioctl may be NULL, so check it for SIOCSIFPHY*.
2000-10-04 22:37:41 +00:00
thorpej
3ba709aec7
Make sure we're super-user for SIOCSIFPHYADDR, SIOCDIFPHYADDR,
...
and SIOCSIFPHYADDR_IN6.
2000-10-04 21:12:40 +00:00
enami
d86752997f
Free mbuf when dropping VLAN frame due to no configured vlan interface.
2000-10-04 07:01:52 +00:00
enami
b817ce40cb
Cosmetic changes.
2000-10-04 06:51:12 +00:00
enami
bc50cb2cae
Remove redundant assignment.
2000-10-04 06:20:05 +00:00
itojun
6b9793517d
need opt_inet.h for #ifdef INET
2000-10-04 02:51:18 +00:00
thorpej
9f76a74e1e
Pop one off the TODO list.
2000-10-03 23:52:39 +00:00
thorpej
efbead5055
When an Ethernet interface detaches, unconfigure any VLANs associated
...
with it.
2000-10-03 23:50:52 +00:00
thorpej
96375e93ea
Improve the VLAN support, in particular, handling of MTU:
...
- Add a macro to compute the max frame length based on Ethertype
and presence of FCS, and use it to validate the packet size
in ether_input().
- Add capabilites to struct ethercom, and allow hardware drivers
to specify that they can handle the larger hardware MTU that
VLANs require in order to strictly conform to 802.1Q.
- Make ether_ifdetach() clear out the link address and free all of
the Ethernet multicast structures.
Also, rearrange the VLAN driver itself in preparation to supporting
other hardware types, including FDDI (which has 802.1Q VLAN capability).
2000-10-03 23:33:38 +00:00
itojun
2fe73fd967
typo
2000-10-03 22:46:21 +00:00
itojun
6653c1a74d
forgot to update maximum number of algorithms
2000-10-03 22:43:52 +00:00
itojun
553ce2a5e7
add official # for AES (12), and make it equal to rijndael.
...
Note that:
- IANA assignment was made for AES
- we still have some time window till AES gets finalized, so until it gets
finalized, we are not certain if AES == rijndael
but it should now be okay.
2000-10-03 21:45:44 +00:00
itojun
05d1b41473
get rid of RC5 algorithm # completely (#if 0'ed for a long time)
...
sync with kame.
2000-10-03 06:36:31 +00:00
ad
3a739b04a0
htons -> ntohs. From Alan Barrett <apb@cequrux.com>.
2000-10-02 14:41:26 +00:00
itojun
dcfe05e7c1
fix compilation without INET. fix confusion between ipsecstat and ipsec6stat.
...
sync with kame.
2000-10-02 03:55:41 +00:00
itojun
dd859d3462
enable VJC only with INET
2000-10-02 03:54:10 +00:00
itojun
b8453a0291
fix compilation without INET
2000-10-02 03:53:47 +00:00
itojun
1af3d80bce
fix compilation without INET.
2000-10-02 03:53:07 +00:00
itojun
412b3abb5f
fix IPv6 packet manipulation. (use ip6intrq)
2000-10-02 03:52:10 +00:00
itojun
253515cca1
cosmetic; repair indentation
2000-10-02 03:51:18 +00:00
thorpej
4a66a476e9
Make the previous code path simpler (and possible easier for the
...
compiler to optimize), based on fddi_input().
2000-10-01 23:43:44 +00:00
thorpej
7ca3fb9ef0
Move the check for "promisc + unicast + not for us" into ether_input(),
...
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
thorpej
8dc841aa19
Change the behavior of ifpromisc() slightly. If interface is not IFF_UP,
...
attempting to enable promisc would result in ENETDOWN. Change this to
allow the interface to always be placed in promiscuous mode, regardless
of IFF_UP. When the interface does come up, the IFF_PROMISC flag will
be consulted, and this matches the behavior that disabling promiscuous
mode has.
2000-10-01 23:16:07 +00:00
mellon
b58f5e5835
- Figure out how long if list buffer needs to be if it's too short (fixes
...
PR#10968).
2000-09-29 00:37:37 +00:00
ad
d74621ea64
Add an item to the TODO list.
2000-09-28 10:02:09 +00:00
enami
a5028df36d
Don't unconfigure if it is already unconfigured.
2000-09-28 08:28:56 +00:00
enami
177a258793
Fix think-o in previous; don't do the same test twice.
2000-09-28 07:35:36 +00:00
enami
8e1cd4f341
Port the multicast handling to NetBSD correctly.
2000-09-28 07:20:56 +00:00
enami
bf888fcd19
Factor out and give a name to the common functionality to translate
...
sockaddr which represents a multicast address into an Ethernet address
or range of Etherenet addresses.
2000-09-28 07:15:27 +00:00
enami
dcf72a770a
s/6/ETHER_ADDR_LEN/
2000-09-28 07:01:41 +00:00
enami
63b56285cd
Remove unnecessary test.
2000-09-28 07:00:53 +00:00
enami
2c4a718932
Remove unnecessary function decl.
2000-09-28 06:13:35 +00:00
enami
b531012315
Install if_vlanvar.h.
2000-09-28 06:06:50 +00:00
erh
d921f48d7a
When grabbing address structures out of a character array make sure that the number of addresses and length of each match up with the size of the data we're handed. Fixes arp on the alpha.
2000-09-28 01:14:06 +00:00
thorpej
77efca7976
Glue VLANs into ether_input().
2000-09-27 22:58:21 +00:00
thorpej
00746cb0d6
Support for 802.1Q Virtual LANs. Derived and cleaned up by
...
Andy Doran <ad@netbsd.org> from the FreeBSD/OpenBSD implementation.
A few minor changes to how it all hooks into the system by me.
2000-09-27 22:40:54 +00:00
thorpej
5bd1b19b29
Don't use MALLOC() for variable-sized allocations.
2000-08-25 21:22:16 +00:00
mjl
8358c07048
Add bpf tap to gre interface.
2000-08-25 00:51:20 +00:00
itojun
cabceaa265
- icmp6 nodeinfo: remove possibility of unaligned pointer access.
...
- jumbo payload output: fix incorrect mbuf manipulation
- pedant: align issues, mbuf assumption
(sync with kame)
2000-08-19 08:15:53 +00:00
jhawk
b70721109d
Add kernel counters for arp events, displayable with netstat -s -f arp
2000-08-15 20:24:57 +00:00
ad
19fd9da968
Define SIOC[SG]IFGENERIC in <sys/sockio.h>, as FreeBSD and OpenBSD do.
2000-08-10 11:48:41 +00:00
kleink
079b94ad72
Avoid recursion with traditional cpp.
2000-07-28 12:13:32 +00:00
matt
5aba2fd87f
Add a missing include when using this in user space.
2000-07-22 05:11:27 +00:00
onoe
f4aa4a560c
add following two ioctls to handle WEP key for IEEE 802.11 wireless
...
LAN drivers: SIOCS80211NWKEY and SIOCG80211NWKEY.
2000-07-21 04:47:40 +00:00
pk
43b49b2283
Missing increment on ifp->if_pcount.
2000-07-20 22:00:48 +00:00
thorpej
9c881e00cb
Add a SIOCGIFCLONERS ioctl, which fetches a list of network
...
interface cloners from the kernel.
2000-07-20 18:40:26 +00:00
onoe
0ab524f389
moved the check priviledge for SIOCS80211NWID from each driver to ifioctl().
...
it also fixes the problem that non-priviledged user can change nwid
for wi and ray drivers.
2000-07-19 06:00:39 +00:00
itojun
65d37eff7f
correct RFC2367 PF_KEY conformance (SADB_[AE]ALG_xx values and namespaces).
...
sync from kame.
WARNING: need recompilation of setkey(8) and pkgsrc/security/racoon.
(no ipsec-ready netbsd was released as official release)
2000-07-18 14:56:42 +00:00
thorpej
5cae63e123
NetBSD -> __NetBSD__ in an #ifdef, and nuke sc_bpf; there's one in
...
the ifnet already.
2000-07-12 23:02:38 +00:00
itojun
29251eb71f
remove #ifdef __FreeBSD__ or __bsdi__, as netbsd if_gif.c diverged a little
...
from kame tree
2000-07-06 12:56:26 +00:00
thorpej
9c86b65a92
Fix an omission in the gre cloning changes.
2000-07-05 22:45:25 +00:00
thorpej
4ec021cecf
Make gre(4) a cloning network pseudo-device.
2000-07-05 18:14:13 +00:00
thorpej
7f86d18846
stf(4) is now a cloning network interface (although, only one is allowed
...
to be created).
2000-07-05 17:08:18 +00:00
thorpej
f7e579e2f7
Fix a memory leak in the gif_clone_create() error path.
2000-07-05 16:54:19 +00:00
onoe
807a12c8cd
change the argument of SIOCS80211NWID and SIOCG80211NWID ioctls from
...
u_int8_t array to struct ieee80211_nwid to prepend length field.
The length field is necessary because IEEE 802.11 spec doesn't prohibit
even '\0' for SSID.
Though the name and the value of SIOC... macro is unchanged, this change
breaks binary compatibility. The only affected userland program on the
tree is ifconfig(8).
As Jason suggested on tech-net, it is better than live with problems
since there are no releases for this ioctls yet.
2000-07-05 02:35:53 +00:00
thorpej
83e31f15b2
faith(4) is now a cloning pseudo-device.
2000-07-04 20:02:46 +00:00
thorpej
920e0d4a44
Don't allow IFF_PROMISC to be changed directly by userspace. It
...
interferes with the reference counting done by ifpromisc(), and is
essentially impossible to get the semantics correct if we allow this
flag to be directly toggled.
No programs should really be affected by this; IFF_PROMISC is basically
useless without bpf, anyway, and bpf still provides a way to set
promiscuous mode on an interface (which uses ifpromisc()).
2000-07-04 19:09:17 +00:00
thorpej
445487c8f3
Move ifpromimsc() to if.c
2000-07-04 18:46:49 +00:00
thorpej
464c773f27
Oops, restrict SIOCIF{CREATE,DESTROY} to super-user.
2000-07-04 01:51:22 +00:00
cgd
116f7a6983
don't include the config-generated headers if _LKM defined
2000-07-03 02:16:07 +00:00
cgd
ca8479389a
oops! include arp.h and ppp.h even if _LOCORE defined
2000-07-02 19:58:31 +00:00
sommerfeld
4cc38b65e0
Reduce namespace pollution from netcciitt-land
2000-07-02 17:40:18 +00:00
sommerfeld
c93db19567
Merge if_spppsubr.c PPP protocol declarations list with the one found
...
in ppp_defs.h, and have if_spppsubr.c include ppp_defs.h rather than
duplicate its definitions.
[This is a stopgap measure to clean up build lossage.]
2000-07-02 17:38:09 +00:00
cgd
a5c13f9ad4
Kwality control:
...
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.
2000-07-02 04:40:33 +00:00
thorpej
b36ce94c6b
Convert `gif' to be a cloning interface.
2000-07-02 00:21:42 +00:00
thorpej
1e58f22342
Add the notion of "cloning" of network pseudo-interface (e.g. `gif').
...
This allows them to be created and destroyed on the fly via ifconfig(8),
rather than specifying the count in the kernel configuration file.
2000-07-02 00:20:48 +00:00
itojun
d407c7e3ec
nuke sadb_x_ident_id, wihich violates pfkey standard.
...
correct get/set SA handling.
(from kame)
2000-07-01 01:01:34 +00:00
mrg
8e3207b69a
<vm/vm.h> -> <uvm/uvm_extern.h>
2000-06-28 02:53:49 +00:00
kleink
5de786e04a
Define sa_family_t and use it for sdl_family.
2000-06-26 15:59:20 +00:00
itojun
948e11b707
allow IPv[46]-over-IPv6 setting properly. sync with kame.
2000-06-20 15:59:35 +00:00
matt
215470b24c
Ansify before committing my next change.
2000-06-17 20:57:20 +00:00
mycroft
fbb147f69b
Check the multicast bit in the header mbuf while interrupts are still blocked.
...
Otherwise we can run off into space if the packet was sent immediately and the
mbuf freed.
Pointed out by Boris Popov (not on our lists).
2000-06-14 05:10:27 +00:00
itojun
92e64a4a0d
sync with almost-latest KAME IPsec. full changelog would be too big
...
to mention here. notable changes are like below.
kernel:
- make PF_KEY kernel interface more robust against broken input stream.
it includes complete internal structure change in sys/netkey/key.c.
- remove non-RFC compliant change in PF_KEY API, in particular,
in struct sadb_msg. we cannot just change these standard structs.
sadb_x_sa2 is introduced instead.
- remove prototypes for pfkey_xx functions from /usr/include/net/pfkeyv2.h.
these functions are not supplied in /usr/lib.
setkey(8):
- get/delete does not require "-m mode" (ignored with warning, if you
specify it)
- spddelete takes direction specification
2000-06-12 10:40:37 +00:00
itojun
3fff705c2a
update i-d #. (sync with kame)
2000-06-10 08:02:20 +00:00
onoe
4da3935bae
cleanup haeders.
...
add opt_awi.h to define AWI_DEBUG, AWI_WEP_ARC4.
show the firmware version at attach.
create a framework to support WEP (encryption code is not included for now).
a new wiconfig compatible ioctl interface replaced the awictl interface.
fix memory leak in selecting AP
fix bugs in ESSID selection
changes from FreeBSD-current by Warner Losh:
revision 1.2
date: 2000/04/17 22:58:15; author: imp; state: Exp; lines: +16 -1
Provide mem* for compat with NetBSD to fix LINT
fixes from FreeBSD-current by Guido van Rooij:
revision 1.4
date: 2000/05/29 19:58:10; author: guido; state: Exp; lines: +5 -2
Fix a panic resulting from an obvious null pointer deref.
Apparently some other panics still exist in this driver, but with
this fix, it was at least possible to run the Nokia card at SANE 2000.
2000-06-09 05:31:15 +00:00
jhawk
8a49d6bd31
Ensure that all callers of pfind() can deal with pfind(0) returning
...
a real procp* rather than NULL.
2000-05-28 18:17:07 +00:00
matt
5108d90ce5
Fix bpf output on fddi to actually work. Make it compatible with ULTRIX
...
and Tru64.
2000-05-28 02:49:35 +00:00
itojun
4631e5d720
improve duplicated 'gifconfig" check (fatal typo was there). sync with kame.
2000-05-17 01:14:04 +00:00
itojun
3c67584219
propose better IPv6 ifid alternative to the peer, when ifid collides
...
during IPv6CP negotiation. it is very rare to see collision.
2000-05-16 05:45:27 +00:00
itojun
3a44ebc43c
backout previous (packed attribute to struct ifreq)
2000-05-15 16:59:37 +00:00
itojun
3df6dbc4c7
add packed attribute to struct ifreq. this should avoid unaligned access
...
while parsing SIOCGIFCONF, on alignment-picky archs.
2000-05-15 16:45:50 +00:00
itojun
2e9df64fa3
sync IPv4 rogue address filter with RFC1122. (sync with kame)
2000-05-14 03:44:02 +00:00
thorpej
5e6bec6a7e
- Fix a bug in the double-loop version of ether_crc32_le() -- we're not't
...
supposed to bubble carry through.
- Disable the double-loop version of ether_crc32_le() and add a
table-driven version of ether_crc32_le() -- the table-driven
version is faster.
2000-05-12 16:22:36 +00:00
jonathan
c35d2c43a6
Make BPF_BUFSIZE overridable: 8192 is smaller than MTU of some devices.
...
TODO: defopt, or make sysctl'able (c.f. FreeBSD).
2000-05-12 05:58:01 +00:00