Commit Graph

26 Commits

Author SHA1 Message Date
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
itojun 45e2b8d54b remove necessary global variable for eon processing. from chopps,
sync with kame
2001-02-21 00:17:09 +00:00
itojun 1e48b7fbb5 add SIOC[SG]LIFPHYADDR ioctl. greatly simplify tunnel address settings.
sync with kame.  old ioctls are supplied but not recommended for new code.
2001-02-20 15:35:19 +00:00
itojun 9968ae668d comment on dispatches (clearify inner/outer) 2001-02-20 08:48:27 +00:00
itojun 56ad92fd11 use u_int32_t, not u_int, for DLT_NULL encapsulation. 2001-02-20 08:33:02 +00:00
itojun ffc12ee678 explicitly use u_int32_t for DLT_NULL encapsulation.
correct gif address family.  from chopps, sync with kame.
2001-02-20 07:58:16 +00:00
itojun cda5e3eb96 cosmetic; do not use register variable declaration. sync with kame 2001-02-20 07:53:31 +00:00
thorpej fc5dafc79b Fix a rather annoying problem where the sockaddr_dl which holds
the link level name for the interface (ifp->if_sadl) is allocated
before ifp->if_addrlen is initialized, which could lead to allocating
too little space for the link level address.

Do this by splitting allocation of the link level name out of
if_attach() and into if_alloc_sadl(), which is normally called
by functions like ether_ifattach().  Network interfaces which
don't have a link-specific attach routine must call if_alloc_sadl()
themselves (example: gif).

Link level names are freed by if_free_sadl(), which can be called
from e.g. ether_ifdetach().  Drivers never need call if_free_sadl()
themselves as if_detach() will do it if it is not already done.

While here, add the ability to pass an AF_LINK address to
SIOCSIFADDR in ether_ioctl() (this is what caused me to notice
the problem that the above fixes).
2001-01-17 00:30:49 +00:00
thorpej ed7695a765 Fill in if_dlt. 2000-12-18 19:44:33 +00:00
thorpej c5293456da Adapt to bpfattach() changes, and further centralize the bpfattach()
and bpfdetach() calls into link-type subroutines where possible.
2000-12-12 18:00:22 +00:00
martin 4a0283d9f0 Allow changing of settings via ioctl only for the superuser.
Fixes PR security/11524.
2000-11-19 18:48:44 +00:00
itojun 08af3d2f82 validate args to SIOC[SG]IFPHY* better. 2000-10-07 04:18:04 +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 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 f7e579e2f7 Fix a memory leak in the gif_clone_create() error path. 2000-07-05 16:54:19 +00:00
thorpej b36ce94c6b Convert `gif' to be a cloning interface. 2000-07-02 00:21:42 +00:00
itojun 948e11b707 allow IPv[46]-over-IPv6 setting properly. sync with kame. 2000-06-20 15:59: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 3909133548 introduce sys/netinet/ip_encap.c, to dispatch inbound packets
to protocol handlers, based on src/dst (for ip proto #4/41).
see comment in ip_encap.c for details of the problem we have.
there are too many protocol specs for ip proto #4/41.
backward compatibility with MROUTING case is now provided in ip_encap.c.

fix ipip to work with gif (using ip_encap.c).  sorry for breakage.

gif now uses ip_encap.c.

introduce stf pseudo interface (implements 6to4, another IPv6-over-IPv4 code
with ip proto #41).
2000-04-19 06:30:51 +00:00
augustss c1ebd1929a Kill some more register declarations. 2000-03-30 09:45:33 +00:00
itojun 3867d18179 we don't need IFF_RUNNING for gif. 2000-01-17 06:29:07 +00:00
itojun 2042e749ad for gif interface, sync IFF_RUNNING with IFF_UP. it does not
make sense to leave IFF_RUNNING during !IFF_UP (it is pseudo interface
so we need to immitate - or is it okay if we don't raise IFF_RUNNING?)
2000-01-17 05:50:12 +00:00
itojun b3761abef8 remove extra portability #ifdef (like #ifdef __FreeBSD__) in KAME IPv6/IPsec
code, from netbsd-current repository.
#ifdef'ed version is always available from ftp.kame.net.

XXX please do not make too many diff-unfriendly changes, we'll need to take
bunch of diffs on upgrade...
2000-01-06 15:46:07 +00:00
itojun ea861f0183 sync IPv6 part with latest KAME tree. IPsec part is left unmodified
due to massive changes in KAME side.
- IPv6 output goes through nd6_output
- faith can capture IPv4 packets as well - you can run IPv4-to-IPv6 translator
  using heavily modified DNS servers
- per-interface statistics (required for IPv6 MIB)
- interface autoconfig is revisited
- udp input handling has a big change for mapped address support.
- introduce in4_cksum() for non-overwriting checksumming
- introduce m_pulldown()
- neighbor discovery cleanups/improvements
- netinet/in.h strictly conforms to RFC2553 (no extra defs visible to userland)
- IFA_STATS is fixed a bit (not tested)
- and more more more.

TODO:
- cleanup os-independency #ifdef
- avoid rcvif dual use (for IPsec) to help ifdetach

(sorry for jumbo commit, I can't separate this any more...)
1999-12-13 15:17:17 +00:00
itojun 8789e60098 rcsid police 1999-12-02 07:18:44 +00:00
itojun 74d3c214ec KAME/NetBSD 1.4 SNAP kit, dated 19990628.
NOTE: this branch (kame) is used just for refernce.  this may not compile
due to multiple reasons.
1999-06-28 06:36:47 +00:00