/[base]/head/sys/netinet6/in6.h
ViewVC logotype

Log of /head/sys/netinet6/in6.h

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 368353 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 4 21:51:47 2020 UTC (3 years, 6 months ago) by hselasky
File length: 27370 byte(s)
Diff to previous 366569
Expose nonstandard IPv6 kernel definitions to standalone builds.
No functional change.

Reviewed by:	bz@
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking


Revision 366569 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 9 12:06:43 2020 UTC (3 years, 8 months ago) by rscheff
File length: 27340 byte(s)
Diff to previous 360292
Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow.

This adds a new IP_PROTO / IPV6_PROTO setsockopt (getsockopt)
option IP(V6)_VLAN_PCP, which can be set to -1 (interface
default), or explicitly to any priority between 0 and 7.

Note that for untagged traffic, explicitly adding a
priority will insert a special 801.1Q vlan header with
vlan ID = 0 to carry the priority setting

Reviewed by:	gallatin, rrs
MFC after:	2 weeks
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D26409


Revision 360292 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 25 09:06:11 2020 UTC (4 years, 2 months ago) by melifaro
File length: 27150 byte(s)
Diff to previous 349369
Convert route caching to nexthop caching.

This change is build on top of nexthop objects introduced in r359823.

Nexthops are separate datastructures, containing all necessary information
 to perform packet forwarding such as gateway interface and mtu. Nexthops
 are shared among the routes, providing more pre-computed cache-efficient
 data while requiring less memory. Splitting the LPM code and the attached
 data solves multiple long-standing problems in the routing layer,
 drastically reduces the coupling with outher parts of the stack and allows
 to transparently introduce faster lookup algorithms.

Route caching was (re)introduced to minimise (slow) routing lookups, allowing
 for notably better performance for large TCP senders. Caching works by
 acquiring rtentry reference, which is protected by per-rtentry mutex.
 If the routing table is changed (checked by comparing the rtable generation id)
 or link goes down, cache record gets withdrawn.

Nexthops have the same reference counting interface, backed by refcount(9).
This change merely replaces rtentry with the actual forwarding nextop as a
 cached object, which is mostly mechanical. Other moving parts like cache
 cleanup on rtable change remains the same.

Differential Revision:	https://reviews.freebsd.org/D24340


Revision 349369 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 25 11:54:41 2019 UTC (5 years ago) by hselasky
File length: 27126 byte(s)
Diff to previous 337783
Convert all IPv4 and IPv6 multicast memberships into using a STAILQ
instead of a linear array.

The multicast memberships for the inpcb structure are protected by a
non-sleepable lock, INP_WLOCK(), which needs to be dropped when
calling the underlying possibly sleeping if_ioctl() method. When using
a linear array to keep track of multicast memberships, the computed
memory location of the multicast filter may suddenly change, due to
concurrent insertion or removal of elements in the linear array. This
in turn leads to various invalid memory access issues and kernel
panics.

To avoid this problem, put all multicast memberships on a STAILQ based
list. Then the memory location of the IPv4 and IPv6 multicast filters
become fixed during their lifetime and use after free and memory leak
issues are easier to track, for example by: vmstat -m | grep multi

All list manipulation has been factored into inline functions
including some macros, to easily allow for a future hash-list
implementation, if needed.

This patch has been tested by pho@ .

Differential Revision: https://reviews.freebsd.org/D20080
Reviewed by:	markj @
MFC after:	1 week
Sponsored by:	Mellanox Technologies


Revision 337783 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 14 17:27:41 2018 UTC (5 years, 10 months ago) by jtl
File length: 27311 byte(s)
Diff to previous 337782
Implement a limit on on the number of IPv6 reassembly queues per bucket.

There is a hashing algorithm which should distribute IPv6 reassembly
queues across the available buckets in a relatively even way. However,
if there is a flaw in the hashing algorithm which allows a large number
of IPv6 fragment reassembly queues to end up in a single bucket, a per-
bucket limit could help mitigate the performance impact of this flaw.

Implement such a limit, with a default of twice the maximum number of
reassembly queues divided by the number of buckets. Recalculate the
limit any time the maximum number of reassembly queues changes.
However, allow the user to override the value using a sysctl
(net.inet6.ip6.maxfragbucketsize).

Reviewed by:	jhb
Security:	FreeBSD-SA-18:10.ip
Security:	CVE-2018-6923


Revision 337782 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 14 17:26:07 2018 UTC (5 years, 10 months ago) by jtl
File length: 27235 byte(s)
Diff to previous 326876
Add a limit of the number of fragments per IPv6 packet.

The IPv4 fragment reassembly code supports a limit on the number of
fragments per packet. The default limit is currently 17 fragments.
Among other things, this limit serves to limit the number of fragments
the code must parse when trying to reassembly a packet.

Add a limit to the IPv6 reassembly code. By default, limit a packet
to 65 fragments (64 on the queue, plus one final fragment to complete
the packet). This allows an average fragment size of 1,008 bytes, which
should be sufficient to hold a fragment. (Recall that the IPv6 minimum
MTU is 1280 bytes. Therefore, this configuration allows a full-size
IPv6 packet to be fragmented on a link with the minimum MTU and still
carry approximately 272 bytes of headers before the fragmented portion
of the packet.)

Users can adjust this limit using the net.inet6.ip6.maxfragsperpacket
sysctl.

Reviewed by:	jhb
Security:	FreeBSD-SA-18:10.ip
Security:	CVE-2018-6923


Revision 326876 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 15 12:37:32 2017 UTC (6 years, 6 months ago) by ae
File length: 27167 byte(s)
Diff to previous 326023
Follow the RFC6980 and silently ignore following IPv6 NDP messages
that had the IPv6 fragmentation header:
 o  Neighbor Solicitation
 o  Neighbor Advertisement
 o  Router Solicitation
 o  Router Advertisement
 o  Redirect

Introduce M_FRAGMENTED mbuf flag, and set it after IPv6 fragment reassembly
is completed. Then check the presence of this flag in correspondig ND6
handling routines.

PR:		224247
MFC after:	2 weeks


Revision 326023 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 20 19:43:44 2017 UTC (6 years, 7 months ago) by pfg
File length: 27104 byte(s)
Diff to previous 314722
sys: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


Revision 314722 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 6 04:01:58 2017 UTC (7 years, 3 months ago) by eri
File length: 27060 byte(s)
Diff to previous 314436
The patch provides the same socket option as Linux IP_ORIGDSTADDR.
Unfortunately they will have different integer value due to Linux value being already assigned in FreeBSD.

The patch is similar to IP_RECVDSTADDR but also provides the destination port value to the application.

This allows/improves implementation of transparent proxies on UDP sockets due to having the whole information on forwarded packets.

Reviewed by:	adrian, aw
Approved by:	ae (mentor)
Sponsored by:	rsync.net
Differential Revision:	D9235


Revision 314436 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 28 23:42:47 2017 UTC (7 years, 4 months ago) by imp
File length: 26940 byte(s)
Diff to previous 313675
Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96


Revision 313675 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 12 06:56:33 2017 UTC (7 years, 4 months ago) by eri
File length: 26940 byte(s)
Diff to previous 313530
Committed without approval from mentor.

Reported by:	gnn


Revision 313530 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 10 06:20:27 2017 UTC (7 years, 4 months ago) by eri
File length: 27060 byte(s)
Diff to previous 313524
Use proper value for socket option on IPv6

  Reported-by: ohartmann@walstatt.org


Revision 313524 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 10 05:16:14 2017 UTC (7 years, 4 months ago) by eri
File length: 27060 byte(s)
Diff to previous 313330
The patch provides the same socket option as Linux IP_ORIGDSTADDR.
Unfortunately they will have different integer value due to Linux value being already assigned in FreeBSD.

The patch is similar to IP_RECVDSTADDR but also provides the destination port value to the application.

This allows/improves implementation of transparent proxies on UDP sockets due to having the whole information on forwarded packets.

Sponsored-by: rsync.net
Differential Revision: D9235
Reviewed-by: adrian


Revision 313330 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 6 08:49:57 2017 UTC (7 years, 4 months ago) by ae
File length: 26940 byte(s)
Diff to previous 302906
Merge projects/ipsec into head/.

 Small summary
 -------------

o Almost all IPsec releated code was moved into sys/netipsec.
o New kernel modules added: ipsec.ko and tcpmd5.ko. New kernel
  option IPSEC_SUPPORT added. It enables support for loading
  and unloading of ipsec.ko and tcpmd5.ko kernel modules.
o IPSEC_NAT_T option was removed. Now NAT-T support is enabled by
  default. The UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type
  support was removed. Added TCP/UDP checksum handling for
  inbound packets that were decapsulated by transport mode SAs.
  setkey(8) modified to show run-time NAT-T configuration of SA.
o New network pseudo interface if_ipsec(4) added. For now it is
  build as part of ipsec.ko module (or with IPSEC kernel).
  It implements IPsec virtual tunnels to create route-based VPNs.
o The network stack now invokes IPsec functions using special
  methods. The only one header file <netipsec/ipsec_support.h>
  should be included to declare all the needed things to work
  with IPsec.
o All IPsec protocols handlers (ESP/AH/IPCOMP protosw) were removed.
  Now these protocols are handled directly via IPsec methods.
o TCP_SIGNATURE support was reworked to be more close to RFC.
o PF_KEY SADB was reworked:
  - now all security associations stored in the single SPI namespace,
    and all SAs MUST have unique SPI.
  - several hash tables added to speed up lookups in SADB.
  - SADB now uses rmlock to protect access, and concurrent threads
    can do SA lookups in the same time.
  - many PF_KEY message handlers were reworked to reflect changes
    in SADB.
  - SADB_UPDATE message was extended to support new PF_KEY headers:
    SADB_X_EXT_NEW_ADDRESS_SRC and SADB_X_EXT_NEW_ADDRESS_DST. They
    can be used by IKE daemon to change SA addresses.
o ipsecrequest and secpolicy structures were cardinally changed to
  avoid locking protection for ipsecrequest. Now we support
  only limited number (4) of bundled SAs, but they are supported
  for both INET and INET6.
o INPCB security policy cache was introduced. Each PCB now caches
  used security policies to avoid SP lookup for each packet.
o For inbound security policies added the mode, when the kernel does
  check for full history of applied IPsec transforms.
o References counting rules for security policies and security
  associations were changed. The proper SA locking added into xform
  code.
o xform code was also changed. Now it is possible to unregister xforms.
  tdb_xxx structures were changed and renamed to reflect changes in
  SADB/SPDB, and changed rules for locking and refcounting.

Reviewed by:	gnn, wblock
Obtained from:	Yandex LLC
Relnotes:	yes
Sponsored by:	Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D9352


Revision 302906 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 15 17:09:30 2016 UTC (7 years, 11 months ago) by ae
File length: 26978 byte(s)
Diff to previous 301217
Add net.inet6.ip6.intr_queue_maxlen sysctl. It can be used to
change netisr queue limit for IPv6 at runtime.

Obtained from:	Yandex LLC
MFC after:	2 weeks
Sponsored by:	Yandex LLC


Revision 301217 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 2 17:51:29 2016 UTC (8 years, 1 month ago) by gnn
File length: 26824 byte(s)
Diff to previous 293098
This change re-adds L2 caching for TCP and UDP, as originally added in D4306
but removed due to other changes in the system. Restore the llentry pointer
to the "struct route", and use it to cache the L2 lookup (ARP or ND6) as
appropriate.

Submitted by:	Mike Karels
Differential Revision:	https://reviews.freebsd.org/D6262


Revision 293098 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 3 09:54:03 2016 UTC (8 years, 6 months ago) by melifaro
File length: 26681 byte(s)
Diff to previous 292978
Handle IPV6_PATHMTU option by spliting ip6_getpmtu_ctl() from ip6_getpmtu().
Add ro_mtu field to 'struct route' to be able to pass lookup MTU back to
  the caller.

Currently, ip6_getpmtu() has 2 totally different use cases:
1) control plane (IPV6_PATHMTU req), where we just need to calculate MTU
  and return it, w/o any reusability.
2) Actual ip6_output() data path where we (nearly) always use the provided
  route lookup data. If this data is not 'valid' we need to perform another
  lookup and save the result (which cannot be re-used by ip6_output()).

Given that, handle 1) by calling separate function doing rte lookup itself.
  Resulting MTU is calculated by (newly-added) ip6_calcmtu() used by both
  ip6_getpmtu_ctl() and ip6_getpmtu().
For 2) instead of storing ref'ed rte, store mtu (the only needed data
  from the lookup result) inside newly-added ro_mtu field.
  'struct route' was shrinked by 8(or 4 bytes) in r292978. Grow it again
  by 4 bytes. New ro_mtu field will be used in other places like
  ip/tcp_output (EMSGSIZE handling from output routines).

Reviewed by:	ae


Revision 292978 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 31 05:03:27 2015 UTC (8 years, 6 months ago) by melifaro
File length: 26624 byte(s)
Diff to previous 290471
Implement interface link header precomputation API.

Add if_requestencap() interface method which is capable of calculating
  various link headers for given interface. Right now there is support
  for INET/INET6/ARP llheader calculation (IFENCAP_LL type request).
  Other types are planned to support more complex calculation
  (L2 multipath lagg nexthops, tunnel encap nexthops, etc..).

Reshape 'struct route' to be able to pass additional data (with is length)
  to prepend to mbuf.

These two changes permits routing code to pass pre-calculated nexthop data
  (like L2 header for route w/gateway) down to the stack eliminating the
  need for other lookups. It also brings us closer to more complex scenarios
  like transparently handling MPLS nexthops and tunnel interfaces.
  Last, but not least, it removes layering violation introduced by flowtable
  code (ro_lle) and simplifies handling of existing if_output consumers.

ARP/ND changes:
Make arp/ndp stack pre-calculate link header upon installing/updating lle
  record. Interface link address change are handled by re-calculating
  headers for all lles based on if_lladdr event. After these changes,
  arpresolve()/nd6_resolve() returns full pre-calculated header for
  supported interfaces thus simplifying if_output().
Move these lookups to separate ether_resolve_addr() function which ether
  returs error or fully-prepared link header. Add <arp|nd6_>resolve_addr()
  compat versions to return link addresses instead of pre-calculated data.

BPF changes:
Raw bpf writes occupied _two_ cases: AF_UNSPEC and pseudo_AF_HDRCMPLT.
Despite the naming, both of there have ther header "complete". The only
  difference is that interface source mac has to be filled by OS for
  AF_UNSPEC (controlled via BIOCGHDRCMPLT). This logic has to stay inside
  BPF and not pollute if_output() routines. Convert BPF to pass prepend data
  via new 'struct route' mechanism. Note that it does not change
  non-optimized if_output(): ro_prepend handling is purely optional.
Side note: hackish pseudo_AF_HDRCMPLT is supported for ethernet and FDDI.
  It is not needed for ethernet anymore. The only remaining FDDI user is
  dev/pdq mostly untouched since 2007. FDDI support was eliminated from
  OpenBSD in 2013 (sys/net/if_fddisubr.c rev 1.65).

Flowtable changes:
  Flowtable violates layering by saving (and not correctly managing)
  rtes/lles. Instead of passing lle pointer, pass pointer to pre-calculated
  header data from that lle.

Differential Revision:	https://reviews.freebsd.org/D4102


Revision 290471 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 6 23:07:43 2015 UTC (8 years, 7 months ago) by adrian
File length: 26632 byte(s)
Diff to previous 287525
[netinet6]: Create a new IPv6 netisr which expects the frames to have been verified.

This is required for fragments and encapsulated data (eg tunneling) to be redistributed
to the RSS bucket based on the eventual IPv6 header and protocol (TCP, UDP, etc) header.

* Add an mbuf tag with the state of IPv6 options parsing before the frame is queued
  into the direct dispatch handler;
* Continue processing and complete the frame reception in the correct RSS bucket /
  netisr context.

Testing results are in the phabricator review.

Differential Revision:	https://reviews.freebsd.org/D3563
Submitted by:	Tiwei Bie <btw@mail.ustc.edu.cn>


Revision 287525 - (view) (download) (annotate) - [select for diffs]
Modified Sun Sep 6 20:57:57 2015 UTC (8 years, 9 months ago) by adrian
File length: 26491 byte(s)
Diff to previous 281649
Add support for receiving flowtype, flowid and RSS bucket information as part of recvmsg().

Submitted by:	Tiwei Bie <btw@mail.ustc.edu.cn>
Differential Revision:	https://reviews.freebsd.org/D3562


Revision 281649 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 17 11:57:06 2015 UTC (9 years, 2 months ago) by glebius
File length: 26329 byte(s)
Diff to previous 280444
Provide functions to determine presence of a given address
configured on a given interface.

Discussed with:	np
Sponsored by:	Nginx, Inc.


Revision 280444 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 24 16:45:50 2015 UTC (9 years, 3 months ago) by glebius
File length: 26275 byte(s)
Diff to previous 274363
Move ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple
function that works with in6_addr and it is not related to the INET6
stack implementation.

Sponsored by:	Nginx, Inc.


Revision 274363 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 11 02:52:40 2014 UTC (9 years, 7 months ago) by melifaro
File length: 26223 byte(s)
Diff to previous 274331
Kill custom in_matroute() radix mathing function removing one rte mutex lock.

Initially in_matrote() in_clsroute() in their current state was introduced by
r4105 20 years ago. Instead of deleting inactive routes immediately, we kept them
in route table, setting RTPRF_OURS flag and some expire time. After that, either
GC came or RTPRF_OURS got removed on first-packet. It was a good solution
in that days (and probably another decade after that) to keep TCP metrics.
However, after moving metrics to TCP hostcache in r122922, most of in_rmx
functionality became unused. It might had been used for flushing icmp-originated
routes before rte mutexes/refcounting, but I'm not sure about that.

So it looks like this is nearly impossible to make GC do its work nowadays:

in_rtkill() ignores non-RTPRF_OURS routes.
route can only become RTPRF_OURS after dropping last reference via rtfree()
which calls in_clsroute(), which, it turn, ignores UP and non-RTF_DYNAMIC routes.

Dynamic routes can still be installed via received redirect, but they
have default lifetime (no specific rt_expire) and no one has another trie walker
to call RTFREE() on them.

So, the changelist:
* remove custom rnh_match / rnh_close matching function.
* remove all GC functions
* partially revert r256695 (proto3 is no more used inside kernel,
  it is not possible to use rt_expire from user point of view, proto3 support
  is not complete)
* Finish r241884 (similar to this commit) and remove remaining IPv6 parts

MFC after:	1 month


Revision 274331 - (view) (download) (annotate) - [select for diffs]
Modified Sun Nov 9 21:33:01 2014 UTC (9 years, 7 months ago) by melifaro
File length: 26306 byte(s)
Diff to previous 272404
Renove faith(4) and faithd(8) from base. It looks like industry
have chosen different (and more traditional) stateless/statuful
NAT64 as translation mechanism. Last non-trivial commits to both
faith(4) and faithd(8) happened more than 12 years ago, so I assume
it is time to drop RFC3142 in FreeBSD.

No objections from:	net@


Revision 272404 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 2 10:32:24 2014 UTC (9 years, 9 months ago) by tuexen
File length: 26361 byte(s)
Diff to previous 271421
Fix the checksum computation for UDPLite/IPv6. This requires the
usage of a function computing the checksum only over a part of the function.
Therefore introduce in6_cksum_partial() and implement in6_cksum() based
on that.
While there, ensure that the UDPLite packet contains at least enough bytes
to contain the header.

Reviewed by: kevlo
MFC after: 3 days


Revision 271421 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 11 10:27:59 2014 UTC (9 years, 9 months ago) by ae
File length: 26275 byte(s)
Diff to previous 268560
* constify argument of in6_addrscope();
* use IN6_IS_ADDR_XXX() macro instead of hardcoded values;
* for multicast addresses just return scope value, the only exception
  is addresses with 0x0F scope value (RFC 4291 p2.7.0);

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC


Revision 268560 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jul 12 05:44:16 2014 UTC (9 years, 11 months ago) by adrian
File length: 26269 byte(s)
Diff to previous 263091
Add the IPv6 versions of the multi-bind, hash/hash type and RSS options.


Revision 263091 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 12 14:29:08 2014 UTC (10 years, 3 months ago) by glebius
File length: 25939 byte(s)
Diff to previous 253970
Since both netinet/ and netinet6/ call into netipsec/ and netpfil/,
the protocol specific mbuf flags are shared between them.

- Move all M_FOO definitions into a single place: netinet/in6.h, to
  avoid future  clashes.
- Resolve clash between M_DECRYPTED and M_SKIP_FIREWALL which resulted
  in a failure of operation of IPSEC and packet filters.

Thanks to Nicolas and Georgios for all the hard work on bisecting,
testing and finally finding the root of the problem.

PR:			kern/186755
PR:			kern/185876
In collaboration with:	Georgios Amanakis <gamanakis gmail.com>
In collaboration with:	Nicolas DEFFAYET <nicolas-ml deffayet.com>
Sponsored by:		Nginx, Inc.


Revision 253970 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 5 20:13:02 2013 UTC (10 years, 10 months ago) by hrs
File length: 25592 byte(s)
Diff to previous 241916
- Use time_uptime instead of time_second in data structures for
  PF_INET6 in kernel.  This fixes various malfunction when the wall time
  clock is changed.  Bump __FreeBSD_version to 1000041.

- Use clock_gettime(CLOCK_MONOTONIC_FAST) in userland utilities.

MFC after:	1 month


Revision 241916 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 22 21:49:56 2012 UTC (11 years, 8 months ago) by delphij
File length: 25592 byte(s)
Diff to previous 235924
Remove __P.

Submitted by:	kevlo
Reviewed by:	md5(1)
MFC after:	2 months


Revision 235924 - (view) (download) (annotate) - [select for diffs]
Modified Thu May 24 18:25:09 2012 UTC (12 years, 1 month ago) by bz
File length: 25814 byte(s)
Diff to previous 230584
MFp4 bz_ipv6_fast:

  Introduce a (for now copied stripped down) in6_cksum_pseudo()
  function.  We should be able to use this from in6_cksum() but
  we should also ponder possible MD specific improvements.
  It takes an extra csum argument to allow for easy checks as
  will be done by the upper layer protocol input paths.

  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems

Reviewed by:	gnn (as part of the whole)
MFC After:	3 days


Revision 230584 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 26 12:04:19 2012 UTC (12 years, 5 months ago) by glebius
File length: 25729 byte(s)
Diff to previous 225698
Remove casts from inet6 address testing macros, thus preserving
qualifier from original argument.

Obtained from:	NetBSD, r. 1.67
Submitted by:	maxim


Revision 225698 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 20 20:27:26 2011 UTC (12 years, 9 months ago) by kmacy
File length: 26133 byte(s)
Diff to previous 225521
Make KBI changes required for future MFCing of inpcb rtentry / llentry caching.

Reviewed by:	rwatson, bz
Approved by:	re (kib)


Revision 225521 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 13 00:06:11 2011 UTC (12 years, 9 months ago) by hrs
File length: 26091 byte(s)
Diff to previous 225043
Add $ipv6_cpe_wanif to enable functionality required for IPv6 CPE
(r225485).  When setting an interface name to it, the following
configurations will be enabled:

 1. "no_radr" is set to all IPv6 interfaces automatically.

 2. "-no_radr accept_rtadv" will be set only for $ipv6_cpe_wanif.  This is
    done just before evaluating $ifconfig_IF_ipv6 in the rc.d scripts (this
    means you can manually supersede this configuration if necessary).

 3. The node will add RA-sending routers to the default router list
    even if net.inet6.ip6.forwarding=1.

This mode is added to conform to RFC 6204 (a router which connects
the end-user network to a service provider network).  To enable
packet forwarding, you still need to set ipv6_gateway_enable=YES.

Note that accepting router entries into the default router list when
packet forwarding capability and a routing daemon are enabled can
result in messing up the routing table.  To minimize such unexpected
behaviors, "no_radr" is set on all interfaces but $ipv6_cpe_wanif.

Approved by:	re (bz)


Revision 225043 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 20 16:43:47 2011 UTC (12 years, 10 months ago) by bz
File length: 26003 byte(s)
Diff to previous 222728
Add an in6_localip() helper function as in6_localaddr() is not doing what
people think: returning true for an address in any connected subnet, not
necessarily on the local machine.

Sponsored by:	Sandvine Incorporated
MFC after:	2 weeks
Approved by:	re (kib)


Revision 222728 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 6 02:14:23 2011 UTC (13 years, 1 month ago) by hrs
File length: 25967 byte(s)
Diff to previous 221009
- Accept Router Advertisement messages even when net.inet6.ip6.forwarding=1.

- A new per-interface knob IFF_ND6_NO_RADR and sysctl IPV6CTL_NO_RADR.
  This controls if accepting a route in an RA message as the default route.
  The default value for each interface can be set by net.inet6.ip6.no_radr.
  The system wide default value is 0.

- A new sysctl: net.inet6.ip6.norbit_raif.  This controls if setting R-bit in
  NA on RA accepting interfaces.  The default is 0 (R-bit is set based on
  net.inet6.ip6.forwarding).

Background:

 IPv6 host/router model suggests a router sends an RA and a host accepts it for
 router discovery.  Because of that, KAME implementation does not allow
 accepting RAs when net.inet6.ip6.forwarding=1.  Accepting RAs on a router can
 make the routing table confused since it can change the default router
 unintentionally.

 However, in practice there are cases where we cannot distinguish a host from
 a router clearly.  For example, a customer edge router often works as a host
 against the ISP, and as a router against the LAN at the same time.  Another
 example is a complex network configurations like an L2TP tunnel for IPv6
 connection to Internet over an Ethernet link with another native IPv6 subnet.
 In this case, the physical interface for the native IPv6 subnet works as a
 host, and the pseudo-interface for L2TP works as the default IP forwarding
 route.

Problem:

 Disabling processing RA messages when net.inet6.ip6.forwarding=1 and
 accepting them when net.inet6.ip6.forward=0 cause the following practical
 issues:

 - A router cannot perform SLAAC.  It becomes a problem if a box has
   multiple interfaces and you want to use SLAAC on some of them, for
   example.  A customer edge router for IPv6 Internet access service
   using an IPv6-over-IPv6 tunnel sometimes needs SLAAC on the
   physical interface for administration purpose; updating firmware
   and so on (link-local addresses can be used there, but GUAs by
   SLAAC are often used for scalability).

 - When a host has multiple IPv6 interfaces and it receives multiple RAs on
   them, controlling the default route is difficult.  Router preferences
   defined in RFC 4191 works only when the routers on the links are
   under your control.

Details of Implementation Changes:

 Router Advertisement messages will be accepted even when
 net.inet6.ip6.forwarding=1.  More precisely, the conditions are as
 follow:

 (ACCEPT_RTADV && !NO_RADR && !ip6.forwarding)
	=> Normal RA processing on that interface. (as IPv6 host)

 (ACCEPT_RTADV && (NO_RADR || ip6.forwarding))
	=> Accept RA but add the router to the defroute list with
	   rtlifetime=0 unconditionally.  This effectively prevents
	   from setting the received router address as the box's
	   default route.

 (!ACCEPT_RTADV)
	=> No RA processing on that interface.

 ACCEPT_RTADV and NO_RADR are per-interface knob.  In short, all interface
 are classified as "RA-accepting" or not.  An RA-accepting interface always
 processes RA messages regardless of ip6.forwarding.  The difference caused by
 NO_RADR or ip6.forwarding is whether the RA source address is considered as
 the default router or not.

 R-bit in NA on the RA accepting interfaces is set based on
 net.inet6.ip6.forwarding.  While RFC 6204 W-1 rule (for CPE case) suggests
 a router should disable the R-bit completely even when the box has
 net.inet6.ip6.forwarding=1, I believe there is no technical reason with
 doing so.  This behavior can be set by a new sysctl net.inet6.ip6.norbit_raif
 (the default is 0).

Usage:

 # ifconfig fxp0 inet6 accept_rtadv
	=> accept RA on fxp0
 # ifconfig fxp0 inet6 accept_rtadv no_radr
	=> accept RA on fxp0 but ignore default route information in it.
 # sysctl net.inet6.ip6.norbit_no_radr=1
	=> R-bit in NAs on RA accepting interfaces will always be set to 0.


Revision 221009 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 25 09:00:52 2011 UTC (13 years, 2 months ago) by ticso
File length: 25828 byte(s)
Diff to previous 218909
correct variable type name in comment


Revision 218909 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 21 09:01:34 2011 UTC (13 years, 4 months ago) by brucec
File length: 25826 byte(s)
Diff to previous 193217
Fix typos - remove duplicate "the".

PR:	bin/154928
Submitted by:	Eitan Adler <lists at eitanadler.com>
MFC after: 	3 days


Revision 193217 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 1 10:30:00 2009 UTC (15 years, 1 month ago) by pjd
File length: 25830 byte(s)
Diff to previous 192923
- Rename IP_NONLOCALOK IP socket option to IP_BINDANY, to be more consistent
  with OpenBSD (and BSD/OS originally). We can't easly do it SOL_SOCKET option
  as there is no more space for more SOL_SOCKET options, but this option also
  fits better as an IP socket option, it seems.
- Implement this functionality also for IPv6 and RAW IP sockets.
- Always compile it in (don't use additional kernel options).
- Remove sysctl to turn this functionality on and off.
- Introduce new privilege - PRIV_NETINET_BINDANY, which allows to use this
  functionality (currently only unjail root can use it).

Discussed with:	julian, adrian, jhb, rwatson, kmacy


Revision 192923 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 27 18:57:13 2009 UTC (15 years, 1 month ago) by bms
File length: 25766 byte(s)
Diff to previous 191662
Merge final round of MLD changes from p4:
 ip6_input.c, in6.h:
 * Add netinet6-specific mbuf flag M_RTALERT_MLD, shadowing M_PROTO6.
  * Always set this flag if HBH Router Alert option is present for MLD,
    even when not forwarding.

 icmp6.c:
 * In icmp6_input(), spell m->m_pkthdr.rcvif as ifp to be consistent.
 * Use scope ID for verifying input. Do not apply SSM filters here, no inpcb.
  * Check for M_RTALERT_MLD when validating MLD traffic, as we can't see
    IPv6 hop options outside of ip6_input().

 in6_mcast.c:
 * Use KAME scope/zone ID in in6_multi.
   * Update net.inet6.ip6.mcast.filters implementation to use scope IDs
     for comparisons.
 * Fix scope ID treatment in multicast socket option processing.
   Scope IDs passed in from userland will be ignored as other less
   ambiguous APIs exist for specifying the link.
 * Tighten userland input checks in IPv6 SSM delta and full-state ops.
   * Source filter embedded scope IDs need to be revisited, for now
     just clear them and ignore them on input.
 * Adapt KAME behaviour of looking up the scope ID in the default zone
   for multicast leaves, when the interface is ambiguous.

 mld6.c:
 * Tighten origin checks on MLD traffic as per RFC3810 Section 6.2:
  * ip6_src MAY be the unspecified address for MLDv1 reports.
  * ip6_src MAY have link-local address scope for MLDv1 reports,
    MLDv1 queries, and MLDv2 queries.
  * Perform address field validation *before* accepting queries.
 * Use KAME scope/zone ID in query/report processing.
   * Break const correctness for mld_v1_input_report(), mld_v1_input_query()
     as we temporarily modify the input mbuf chain.
   * Clear the scope ID before handoff to userland MLD daemon.
 * Fix MLDv1 old querier present timer processing.
   With the protocol defaults, hosts should revert to MLDv2 after 260s.
 * Add net.inet6.mld.v1enable sysctl, default to on.

 ifmcstat.c:
 * Use sysctl by default; -K requests kvm(3) if so compiled.

 mld.4:
 * Connect man page to build.

Tested using PCS.


Revision 191662 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 29 10:22:44 2009 UTC (15 years, 2 months ago) by bms
File length: 25735 byte(s)
Diff to previous 191117
Add IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT, in6addr_linklocal_allv2routers
for use by MLDv2.
Add IPv6 SSM socket layer membership vector size constants and
tree bounds.
Remove unreferenced struct ipv6_mreq_source; SSM for IPv6 goes
straight to the RFC 3678 socket options.


Revision 191117 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 15 20:34:19 2009 UTC (15 years, 2 months ago) by kmacy
File length: 25299 byte(s)
Diff to previous 183529
add an llentry to struct route{_in6} to allow it to be passed around with
the rtentry


Revision 183529 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 2 00:32:59 2008 UTC (15 years, 9 months ago) by cperciva
File length: 25274 byte(s)
Diff to previous 174510
Default to ignoring potentially evil IPv6 Neighbor Solicitation
messages.

Approved by:    so (cperciva)
Approved by:	re (kensmith)
Security:       FreeBSD-SA-08:10.nd6
Thanks to:      jinmei, bz


Revision 174510 - (view) (download) (annotate) - [select for diffs]
Modified Mon Dec 10 16:03:40 2007 UTC (16 years, 6 months ago) by obrien
File length: 25232 byte(s)
Diff to previous 171496
Clean up VCS Ids.


Revision 171496 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 19 09:16:40 2007 UTC (16 years, 11 months ago) by bz
File length: 25236 byte(s)
Diff to previous 171260
Restore behavior changed with rev. 1.46 and make
IPV6_IPSEC_POLICY always visible again. This unbreaks some
third party user space applications.

PR:		114491
Reported by:	sumikawa
Reviewed by:	sumikawa
Approved by:	re (hrs)


Revision 171260 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 5 16:29:40 2007 UTC (17 years ago) by delphij
File length: 25231 byte(s)
Diff to previous 171259
Space cleanup

Approved by:	re (rwatson)


Revision 171259 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 5 16:23:49 2007 UTC (17 years ago) by delphij
File length: 25261 byte(s)
Diff to previous 171173
ANSIfy[1] plus some style cleanup nearby.

Discussed with:	gnn, rwatson
Submitted by:	Karl Sj?dahl - dunceor <dunceor gmail com> [1]
Approved by:	re (rwatson)


Revision 171173 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 3 12:46:08 2007 UTC (17 years ago) by mlaier
File length: 25262 byte(s)
Diff to previous 171167
Link pf 4.1 to the build:
 - move ftp-proxy from libexec to usr.sbin
 - add tftp-proxy
 - new altq mtag link

Approved by:	re (kensmith)


Revision 171167 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 3 12:13:45 2007 UTC (17 years ago) by gnn
File length: 25092 byte(s)
Diff to previous 171133
Commit the change from FAST_IPSEC to IPSEC.  The FAST_IPSEC
option is now deprecated, as well as the KAME IPsec code.
What was FAST_IPSEC is now IPSEC.

Approved by: re
Sponsored by: Secure Computing


Revision 171133 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jul 1 11:41:27 2007 UTC (17 years ago) by gnn
File length: 25102 byte(s)
Diff to previous 170613
Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes only the kernel files, the rest of the files
will follow in a second commit.

Reviewed by:    bz
Approved by:    re
Supported by:   Secure Computing


Revision 170613 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 12 16:24:56 2007 UTC (17 years ago) by bms
File length: 25083 byte(s)
Diff to previous 157209
Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
 * IPv4 multicast socket processing is now moved out of ip_output.c
   into a new module, in_mcast.c.
 * The in_mcast.c module implements the IPv4 legacy any-source API in
   terms of the protocol-independent source-specific API.
 * Source filters are lazy allocated as the common case does not use them.
   They are part of per inpcb state and are covered by the inpcb lock.
 * struct ip_mreqn is now supported to allow applications to specify
   multicast joins by interface index in the legacy IPv4 any-source API.
 * In UDP, an incoming multicast datagram only requires that the source
   port matches the 4-tuple if the socket was already bound by source port.
   An unbound socket SHOULD be able to receive multicasts sent from an
   ephemeral source port.
 * The UDP socket multicast filter mode defaults to exclusive, that is,
   sources present in the per-socket list will be blocked from delivery.
 * The RFC 3678 userland functions have been added to libc: setsourcefilter,
   getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
 * Definitions for IGMPv3 are merged but not yet used.
 * struct sockaddr_storage is now referenced from <netinet/in.h>. It
   is therefore defined there if not already declared in the same way
   as for the C99 types.
 * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
   which are then interpreted as interface indexes) is now deprecated.
 * A patch for the Rhyolite.com routed in the FreeBSD base system
   is available in the -net archives. This only affects individuals
   running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
 * Make IPv6 detach path similar to IPv4's in code flow; functionally same.
 * Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from:  p4://bms_netdev
Submitted by:   Wilbert de Graaf (original work)
Reviewed by:    rwatson (locking), silence from fenner,
		net@ (but with encouragement)


Revision 157209 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 28 12:51:22 2006 UTC (18 years, 3 months ago) by dwmalone
File length: 24540 byte(s)
Diff to previous 156865
This comment on various IPPORT_ defines was copied from in.h and
probably never fully applied to IPv6. Over time it has become more
stale, so replace it with something more up to date.

Reviewed by:	ume
MFC after:	1 month


Revision 156865 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 19 02:11:42 2006 UTC (18 years, 3 months ago) by suz
File length: 25410 byte(s)
Diff to previous 151539
updates net.inet6.ip6.kame_version as the proof of the latest KAME merge

Reviewed by: KAME
MFC after: 2 days


Revision 151539 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 21 16:23:01 2005 UTC (18 years, 8 months ago) by suz
File length: 25419 byte(s)
Diff to previous 151478
sync with KAME regarding NDP

- introduced fine-grain-timer to manage ND-caches and IPv6 Multicast-Listeners
- supports Router-Preference <draft-ietf-ipv6-router-selection-07.txt>
- better prefix lifetime management
- more spec-comformant DAD advertisement
- updated RFC/internet-draft revisions

Obtained from: KAME
Reviewed by: ume, gnn
MFC after: 2 month


Revision 151478 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 19 16:53:24 2005 UTC (18 years, 8 months ago) by suz
File length: 25303 byte(s)
Diff to previous 149033
sync with KAME (removed a unnecesary non-standard macro)

Obtained from: KAME
Reviewd by: ume, gnn


Revision 149033 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 13 19:55:06 2005 UTC (18 years, 10 months ago) by ume
File length: 25633 byte(s)
Diff to previous 148921
added a knob to enable path MTU discovery for multicast packets.
(by default, it is disabled)

Submitted by:	suz
Obtained from:	KAME


Revision 148921 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 10 09:13:35 2005 UTC (18 years, 10 months ago) by suz
File length: 25490 byte(s)
Diff to previous 148385
supports stealth forwarding in IPv6, as well as in IPv4

PR: kern/54625
MFC after: 1 week


Revision 148385 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 25 12:31:43 2005 UTC (18 years, 11 months ago) by ume
File length: 25426 byte(s)
Diff to previous 148169
scope cleanup.  with this change
- 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.

Submitted by:	JINMEI Tatuya <jinmei__at__isl.rdc.toshiba.co.jp>
Obtained from:	KAME


Revision 148169 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 20 08:59:45 2005 UTC (18 years, 11 months ago) by ume
File length: 25362 byte(s)
Diff to previous 139826
update comments:
  - RFC2292bis -> RFC3542
  - typo fixes

Submitted by:	Keiichi SHIMA <keiichi__at__iijlab.net>
Obtained from:	KAME


Revision 139826 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 7 02:30:35 2005 UTC (19 years, 5 months ago) by imp
File length: 25368 byte(s)
Diff to previous 128019
/* -> /*- for license, minor formatting changes, separate for KAME


Revision 128019 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 7 20:46:16 2004 UTC (20 years, 3 months ago) by imp
File length: 25366 byte(s)
Diff to previous 122128
Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson


Revision 122128 - (view) (download) (annotate) - [select for diffs]
Modified Wed Nov 5 17:19:31 2003 UTC (20 years, 8 months ago) by ume
File length: 25603 byte(s)
Diff to previous 122077
byebye in6_ifawithscope().  it was a function for old source
address selection.

Obtained from:	KAME


Revision 122077 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 4 20:22:33 2003 UTC (20 years, 8 months ago) by ume
File length: 25681 byte(s)
Diff to previous 121742
source address selection part of RFC3484.
TODO: since there is scope issue to be solved, multicast and
link-local address are treated as special for workaround for
now.

Obtained from:	KAME


Revision 121742 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 30 15:29:17 2003 UTC (20 years, 8 months ago) by ume
File length: 25612 byte(s)
Diff to previous 121569
add management part of address selection policy described in
RFC3484.

Obtained from:	KAME


Revision 121569 - (view) (download) (annotate) - [select for diffs]
Modified Sun Oct 26 10:49:18 2003 UTC (20 years, 8 months ago) by ume
File length: 25494 byte(s)
Diff to previous 121499
use uint32_t instead of u_int32_t for newly introduced
struct definition.


Revision 121499 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 25 10:57:08 2003 UTC (20 years, 8 months ago) by ume
File length: 25495 byte(s)
Diff to previous 121498
revert following unwanted changes:
  - __packed to __attribute__((__packed__)
  -  uintN_t back to u_intN_t

Reported by:	bde


Revision 121498 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 25 09:37:10 2003 UTC (20 years, 8 months ago) by ume
File length: 25502 byte(s)
Diff to previous 121472
correct namespace pollution.

Submitted by:	bde


Revision 121472 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 24 18:26:30 2003 UTC (20 years, 8 months ago) by ume
File length: 25407 byte(s)
Diff to previous 121345
Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(aka RFC2292bis).  Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.

Obtained from:	KAME


Revision 121345 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 22 15:29:42 2003 UTC (20 years, 8 months ago) by ume
File length: 23274 byte(s)
Diff to previous 121315
- implement lock around IPv6 reassembly, to avoid panic due to
  frag6_drain (mutex version will come later).
- limit number of fragments (not fragment queues) in kernel.

Obtained from:	KAME


Revision 121315 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 21 20:05:32 2003 UTC (20 years, 8 months ago) by ume
File length: 23225 byte(s)
Diff to previous 120890
- change scope to zone.
- change node-local to interface-local.
- better error handling of address-to-scope mapping.
- use in6_clearscope().

Obtained from:	KAME


Revision 120890 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 7 17:42:31 2003 UTC (20 years, 9 months ago) by ume
File length: 23003 byte(s)
Diff to previous 114259
nuke unused CTL_IPV6PROTO_NAMES macro.


Revision 114259 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 29 22:03:46 2003 UTC (21 years, 2 months ago) by mdodd
File length: 24308 byte(s)
Diff to previous 102227
Add definitions for IN6ADDR_LINKLOCAL_ALLMDNS_INIT and INADDR_ALLMDNS_GROUP.


Revision 102227 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 21 16:20:02 2002 UTC (21 years, 10 months ago) by mike
File length: 24156 byte(s)
Diff to previous 100688
o Merge <machine/ansi.h> and <machine/types.h> into a new header
  called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
  macros, which are only MD because of gratuitous differences between
  architectures.
o Change all headers to make use of this.  This mainly involves
  changing:
    #ifdef _BSD_FOO_T_
    typedef	_BSD_FOO_T_	foo_t;
    #undef _BSD_FOO_T_
    #endif
  to:
    #ifndef _FOO_T_DECLARED
    typedef	__foo_t	foo_t;
    #define	_FOO_T_DECLARED
    #endif

Concept by:	bde
Reviewed by:	jake, obrien


Revision 100688 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 25 20:40:09 2002 UTC (21 years, 11 months ago) by ume
File length: 24150 byte(s)
Diff to previous 100503
correct comment for setsockopt arg size.

Reported by:	Martin Laabs <martin@martin.erfurt.thur.de>
Obtained from:	KAME
MFC after:	1 week


Revision 100503 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 22 15:13:55 2002 UTC (21 years, 11 months ago) by ume
File length: 24155 byte(s)
Diff to previous 97181
sin6_len is not an address family.  I believe this doesn't
break compatibility with POSIX.1-2001.


Revision 97181 - (view) (download) (annotate) - [select for diffs]
Modified Thu May 23 18:48:27 2002 UTC (22 years, 1 month ago) by mike
File length: 24158 byte(s)
Diff to previous 95023
o Conditionalize sections for POSIX.1-2001 compatibility.
o Use POSIX spelling for types, where possible.
o Define size_t in the __BSD_VISIBLE case (this isn't really needed
  for standards conformance, but follows the tradition of not
  requiring <sys/types.h> as a prerequisite).
o Use _BYTE_ORDER and friends instead of BYTE_ORDER and friends, since
  there may not be enough pollution in order for the latter to work.
o Add an XXX note about the missing IPPROTO_IPV6 macro.


Revision 95023 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 19 04:46:24 2002 UTC (22 years, 2 months ago) by suz
File length: 23980 byte(s)
Diff to previous 94357
just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.
(based on freebsd4-snap-20020128)

Reviewed by:	ume
MFC after:	1 week


Revision 94357 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 10 11:59:02 2002 UTC (22 years, 2 months ago) by mike
File length: 23963 byte(s)
Diff to previous 92700
Unconditionalize the definition of INET_ADDRSTRLEN and
INET6_ADDRSTRLEN.  Doing this helps expose bogus redefinitions in 3rd
party software.


Revision 92700 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 19 15:01:21 2002 UTC (22 years, 3 months ago) by darrenr
File length: 23995 byte(s)
Diff to previous 91984
put an extern for ip6_protox in here where it is only used for kernel compiling


Revision 91984 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 10 06:42:27 2002 UTC (22 years, 3 months ago) by mike
File length: 23967 byte(s)
Diff to previous 83934
o Add INET_ADDRSTRLEN and INET6_ADDRSTRLEN defines to <arpa/inet.h>
  for POSIX.1-2001 conformance.
o Add magic to <netinet/in.h> and <netinet6/in6.h> to prevent
  redefining INET_ADDRSTRLEN and INET6_ADDRSTRLEN.
o Add a note about missing typedefs in <arpa/inet.h>.


Revision 83934 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 25 18:40:52 2001 UTC (22 years, 9 months ago) by brooks
File length: 23935 byte(s)
Diff to previous 78725
Make faith loadable, unloadable, and clonable.


Revision 78725 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 24 20:43:01 2001 UTC (23 years ago) by ume
File length: 23886 byte(s)
Diff to previous 78064
remove IN6_IS_ADDR_ANY macro (outside of standard, #if 0'ed for a long time)

Obtained from:	KAME
MFC after:	10 days


Revision 78064 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 11 12:39:29 2001 UTC (23 years ago) by ume
File length: 23996 byte(s)
Diff to previous 65124
Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks


Revision 65124 - (view) (download) (annotate) - [select for diffs]
Modified Sun Aug 27 00:58:13 2000 UTC (23 years, 10 months ago) by itojun
File length: 21628 byte(s)
Diff to previous 62604
warn that setsockopt/sysctl # spaces are shared among *BSD, and should better
be consulted with KAME guys if you want a number.


Revision 62604 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 5 01:40:29 2000 UTC (24 years ago) by itojun
File length: 21468 byte(s)
Diff to previous 62587
split net.inet6.ip6.rtexpire (and others) from net.inet.ip.*.
From: Andrzej Bialecki <abial@webgiro.com>


Revision 62587 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 4 16:35:15 2000 UTC (24 years ago) by itojun
File length: 21178 byte(s)
Diff to previous 60393
sync with kame tree as of july00.  tons of bug fixes/improvements.

API changes:
- additional IPv6 ioctls
- IPsec PF_KEY API was changed, it is mandatory to upgrade setkey(8).
  (also syntax change)


Revision 60393 - (view) (download) (annotate) - [select for diffs]
Modified Thu May 11 16:57:45 2000 UTC (24 years, 1 month ago) by bde
File length: 21053 byte(s)
Diff to previous 57972
Fixed missing prototype for inet6_rthdr_reverse().


Revision 57972 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 13 10:07:30 2000 UTC (24 years, 3 months ago) by shin
File length: 20965 byte(s)
Diff to previous 57943
Backout the previous change to __KAME_VERSION (FreeBSD4.x addition),
because this is now 5.0-current.


Revision 57943 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 12 20:27:26 2000 UTC (24 years, 3 months ago) by shin
File length: 20971 byte(s)
Diff to previous 57120
Change __KAME_VERSION value. Added the word "FreeBSD4.x" to identify the
system with other platform and/or other version of FreeBSD, which is also
integrated KAME code based on another date.

Approved by: jkh


Revision 57120 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 10 19:33:58 2000 UTC (24 years, 4 months ago) by shin
File length: 20965 byte(s)
Diff to previous 56018
Forbid include of soem inet6 header files from wrong place

  KAME put INET6 related stuff into sys/netinet6 dir, but IPv6
  standard API(RFC2553) require following files to be under sys/netinet.
    netinet/ip6.h
    netinet/icmp6.h
  Now those header files just include each following files.
    netinet6/ip6.h
    netinet6/icmp6.h

  Also KAME has netinet6/in6.h for easy INET6 common defs
  sharing between different BSDs, but RFC2553 requires only
  netinet/in.h should be included from userland.
  So netinet/in.h also includes netinet6/in6.h inside.

  To keep apps portability, apps should not directly include
  above files from netinet6 dir.
  Ideally, all contents of,
    netinet6/ip6.h
    netinet6/icmp6.h
    netinet6/in6.h
  should be moved into
    netinet/ip6.h
    netinet/icmp6.h
    netinet/in.h
  but to avoid big changes in this stage, add some hack, that
    -Put some special macro define into those files under neitnet
    -Let files under netinet6 cause error if it is included
     from some apps, and, if the specifal macro define is not
     defined.
     (which should have been defined if files under netinet is
     included)
    -And let them print an error message which tells the
     correct name of the include file to be included.

  Also fix apps which includes invalid header files.

Approved by: jkh

Obtained from: KAME project


Revision 56018 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jan 15 05:30:15 2000 UTC (24 years, 5 months ago) by shin
File length: 20822 byte(s)
Diff to previous 54263
wrapped prototype declarations by __P(())

Submitted by: bde


Revision 54263 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 7 17:39:16 1999 UTC (24 years, 7 months ago) by shin
File length: 20774 byte(s)
Diff to previous 53877
udp IPv6 support, IPv6/IPv4 tunneling support in kernel,
packet divert at kernel for IPv6/IPv4 translater daemon

This includes queue related patch submitted by jburkhol@home.com.

Submitted by: queue related patch from jburkhol@home.com
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


Revision 53877 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 29 08:19:01 1999 UTC (24 years, 7 months ago) by itojun
File length: 22154 byte(s)
Diff to previous 53541
there's no memcmp() in kernel, use bcmp() instead.
in userland memcmp() is preferred for ANSI preference.
(from KAME repository)


Revision 53541 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 22 02:45:11 1999 UTC (24 years, 7 months ago) by shin
File length: 21869 byte(s)
Diff to previous 52904
KAME netinet6 basic part(no IPsec,no V6 Multicast Forwarding, no UDP/TCP
for IPv6 yet)

With this patch, you can assigne IPv6 addr automatically, and can reply to
IPv6 ping.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


Revision 52904 - (view) (download) (annotate) - [select for diffs]
Added Fri Nov 5 14:41:39 1999 UTC (24 years, 8 months ago) by shin
File length: 22162 byte(s)
KAME related header files additions and merges.
(only those which don't affect c source files so much)

Reviewed by: cvs-committers
Obtained from: KAME project


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.27