OpenBSD CVS

CVS log for src/sys/netinet/ip_mroute.c


[BACK] Up to [local] / src / sys / netinet

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.142 / (download) - annotate - [select for diffs], Sat Apr 6 14:23:27 2024 UTC (2 months ago) by bluhm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.141: +10 -11 lines
Diff to previous 1.141 (colored)

IP multicast sysctl mrtmfc must not write outside of allocation.

Reading sysctl mrt_sysctl_mfc() allocates memory to be copied back
to user.  Chunks of struct mfcinfo are copied from routing table
to linear heap memory.  If the allocated memory was not a multiple
the struct size, a struct mfcinfo could be copied to a partially
unallocated destination.  Check that the end of the struct is within
the allocation.

From Alfredo Ortega;  OK claudio@

Revision 1.141 / (download) - annotate - [select for diffs], Sun Feb 11 18:14:26 2024 UTC (3 months, 4 weeks ago) by mvs
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.140: +3 -4 lines
Diff to previous 1.140 (colored)

Use `sb_mtx' instead of `inp_mtx' in receive path for inet sockets.

In soreceve(), we only touch `so_rcv' socket buffer, which has it's own
`sb_mtx' mutex(9) for protection. So, we can avoid solock() in this
path - it's enough to hold `sb_mtx' in soreceive() and around
corresponding sbappend*(). But not right now :)

This time we use shared netlock for some inet sockets in the soreceive()
path. To protect `so_rcv' buffer we use `inp_mtx' mutex(9) and the
pru_lock() to acquire this mutex(9) in socket layer. But the `inp_mtx'
mutex belongs to the PCB. We initialize socket before PCB, tcp(4)
sockets could exist without PCB, so use `sb_mtx' mutex(9) to protect
sockbuf stuff.

This diff mechanically replaces `inp_mtx' by `sb_mtx' in the receive
path. Only for sockets which already use `inp_mtx'. All other sockets
left as is. They will be converted later.

Since the `sb_mtx' is optional, the new SB_MTXLOCK flag introduced. If
this flag is set on `sb_flags', the `sb_mtx' mutex(9) should be taken.
New sb_mtx_lock() and sb_mtx_unlock() was introduced to hide this check.
They are temporary and will be replaced by mtx_enter() when all this
area will be converted to `sb_mtx' mutex(9).

Also, the new sbmtxassertlocked() function introduced to throw
corresponding assertion for SB_MTXLOCK marked buffers. This time only
sbappendaddr() calls it. This function is also temporary and will be
replaced by MTX_ASSERT_LOCKED() later.

ok bluhm

Revision 1.140 / (download) - annotate - [select for diffs], Wed Dec 6 09:27:17 2023 UTC (6 months ago) by bluhm
Branch: MAIN
Changes since 1.139: +12 -5 lines
Diff to previous 1.139 (colored)

Protect socket receive buffer in IP multicast routing.

Since soreceive() runs in parallel for raw sockets, sbappendaddr()
has to be protected by inpcb mutex.  This was missing in multicast
forwarding which is running with a combination of shared net lock
and kernel lock.  soreceive() uses shared net lock and mutex per
inpcb.  Grab mutex before sbappendaddr() in socket_send() and
socket6_send().

panic receive 1 reported by Jo Geraerts
OK mvs@ claudio@

Revision 1.139 / (download) - annotate - [select for diffs], Wed Jun 14 14:30:08 2023 UTC (11 months, 4 weeks ago) by mvs
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.138: +3 -1 lines
Diff to previous 1.138 (colored)

Add missing kernel lock around (*if_ioctl)().

ok bluhm

Revision 1.138 / (download) - annotate - [select for diffs], Wed Apr 19 20:03:51 2023 UTC (13 months, 3 weeks ago) by kn
Branch: MAIN
Changes since 1.137: +4 -1 lines
Diff to previous 1.137 (colored)

move kernel lock into multicast ioctl handlers;  OK mvs

Revision 1.137 / (download) - annotate - [select for diffs], Thu Sep 8 10:22:06 2022 UTC (21 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.136: +5 -5 lines
Diff to previous 1.136 (colored)

Rename global ifnet TAILQ

Naming the list like the struct itself makes for awful grepping.
Call the global variable "ifnetlist" from now on.

There used to be kvm(3) consumers in base picking up this symbol, but those
have long been converted to other interfaces.

A few potential ports users remain, same deal as sys/net/if_var.h r1.116
"Remove struct ifnet's unused if_switchport member":  they get bumped.

Previous users pointed out by deraadt
OK bluhm

Revision 1.136 / (download) - annotate - [select for diffs], Sat Aug 6 15:57:59 2022 UTC (22 months ago) by bluhm
Branch: MAIN
Changes since 1.135: +5 -5 lines
Diff to previous 1.135 (colored)

Clean up the netlock macros.  Merge NET_RLOCK_IN_SOFTNET and
NET_RLOCK_IN_IOCTL, which have the same implementation.  The R and
W are hard to see, call the new macro NET_LOCK_SHARED.  Rename the
opposite assertion from NET_ASSERT_WLOCKED to NET_ASSERT_LOCKED_EXCLUSIVE.
Update some outdated comments about net locking.
OK mpi@ mvs@

Revision 1.135 / (download) - annotate - [select for diffs], Thu May 5 13:57:40 2022 UTC (2 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.134: +4 -4 lines
Diff to previous 1.134 (colored)

Use static objects for struct rttimer_queue instead of dynamically
allocate them.

Currently there are 6 rttimer_queues and not many more will follow. So
change rt_timer_queue_create() to rt_timer_queue_init() which now takes
a struct rttimer_queue * as argument which will be initialized.
Since this changes the gloabl vars from pointer to struct adjust other
callers as well.
OK bluhm@

Revision 1.134 / (download) - annotate - [select for diffs], Wed May 4 16:52:10 2022 UTC (2 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.133: +3 -4 lines
Diff to previous 1.133 (colored)

Move rttimer callback function from the rttimer itself to rttimer_queue.
All users use the same callback per queue so that makes sense.
Also replace rt_timer_queue_destroy() with rt_timer_queue_flush().
OK bluhm@

Revision 1.133 / (download) - annotate - [select for diffs], Sat Apr 30 07:20:35 2022 UTC (2 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.132: +3 -4 lines
Diff to previous 1.132 (colored)

Convert the 2nd rttimer callback from struct rttimer to u_int rtableid.
The callback only needs to know the rtableid all the other info from
struct rtableid is not needed.
Also change the default rttimer callback to only delete routes that are
RTF_HOST and RTF_DYNAMIC. This way 2 of the ICMP handlers can use NULL
as the callback.
OK bluhm@

Revision 1.132 / (download) - annotate - [select for diffs], Thu Apr 28 17:27:14 2022 UTC (2 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.131: +6 -13 lines
Diff to previous 1.131 (colored)

In the multicast router code don't allocate a rt timer queue for each
rdomain. The rttimer API is rtable/rdomain aware and so there is no need
to have so many queues.
Also init the two queues (one for IPv4 and one for IPv6) early on. This
will allow the rttable code to become simpler.
OK bluhm@

Revision 1.130.2.1 / (download) - annotate - [select for diffs], Wed Dec 15 20:18:20 2021 UTC (2 years, 5 months ago) by bluhm
Branch: OPENBSD_6_9
Changes since 1.130: +2 -1 lines
Diff to previous 1.130 (colored) next main 1.131 (colored)

structure pads can leak uninitialized memory to userland via copyout,
therefore the mandatory idiom is completely clearing structs before
building them for copyout -- that means ALMOST ALL STRUCTS, because
we never know when some architecture will pad a struct..  In two more
cases, the clearing wasn't performed.
from Reno Robert ZDI
ok millert bluhm
from deraadt@
this is errata/6.9/025_mrt.patch.sig

Revision 1.130.6.1 / (download) - annotate - [select for diffs], Wed Dec 15 20:17:19 2021 UTC (2 years, 5 months ago) by bluhm
Branch: OPENBSD_7_0
Changes since 1.130: +2 -1 lines
Diff to previous 1.130 (colored) next main 1.131 (colored)

structure pads can leak uninitialized memory to userland via copyout,
therefore the mandatory idiom is completely clearing structs before
building them for copyout -- that means ALMOST ALL STRUCTS, because
we never know when some architecture will pad a struct..  In two more
cases, the clearing wasn't performed.
from Reno Robert ZDI
ok millert bluhm
from deraadt@
this is errata/7.0/008_mrt.patch.sig

Revision 1.131 / (download) - annotate - [select for diffs], Wed Dec 15 17:21:08 2021 UTC (2 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.130: +2 -1 lines
Diff to previous 1.130 (colored)

structure pads can leak uninitialized memory to userland via copyout,
therefore the mandatory idiom is completely clearing structs before
building them for copyout -- that means ALMOST ALL STRUCTS, because
we never know when some architecture will pad a struct..  In two more
cases, the clearing wasn't performed.
from Reno Robert ZDI
ok millert bluhm

Revision 1.130 / (download) - annotate - [select for diffs], Wed May 27 11:19:29 2020 UTC (4 years ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_6_9_BASE, OPENBSD_6_8_BASE, OPENBSD_6_8
Branch point for: OPENBSD_7_0, OPENBSD_6_9
Changes since 1.129: +5 -5 lines
Diff to previous 1.129 (colored)

Document the various flavors of NET_LOCK() and rename the reader version.

Since our last concurrency mistake only ioctl(2) ans sysctl(2) code path
take the reader lock.  This is mostly for documentation purpose as long as
the softnet thread is converted back to use a read lock.

dlg@ said that comments should be good enough.

ok sashan@

Revision 1.129 / (download) - annotate - [select for diffs], Sun Mar 15 05:34:13 2020 UTC (4 years, 2 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.128: +3 -1 lines
Diff to previous 1.128 (colored)

Guard SIOCDELMULTI if_ioctl calls with KERNEL_LOCK() where the call is
made from socket close path. Most device drivers are not MP-safe yet,
and the closing of AF_INET and AF_INET6 sockets is no longer under the
kernel lock.

This fixes a panic seen by jcs@.

OK mpi@

Revision 1.128 / (download) - annotate - [select for diffs], Mon Sep 2 13:12:09 2019 UTC (4 years, 9 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.127: +36 -33 lines
Diff to previous 1.127 (colored)

Fix a route use after free in multicast route.  Move the rt_mcast_del()
out of the rtable_walk().  This avoids recursion to prevent stack
overflow.  Also it allows freeing the route outside of the walk.
Now mrt_mcast_del() frees the route only when it is deleted from
the routing table.  If that fails, it must not be freed.  After the
route is returned by mfc_find(), it is reference counted.  Then we
need a rtfree(), but not in the other caes.
Move rt_timer_remove_all() into rt_mcast_del().
OK mpi@

Revision 1.127 / (download) - annotate - [select for diffs], Fri Jun 21 17:11:42 2019 UTC (4 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.126: +6 -4 lines
Diff to previous 1.126 (colored)

Prevent recursions by not deleting entries inside rtable_walk(9).

rtable_walk(9) now passes a routing entry back to the caller when
a non zero value is returned and if it asked for it.
This allows us to call rtdeletemsg()/rtrequest_delete() from the
caller without creating a recursion because of rtflushclone().

Multicast code hasn't been adapted and is still possibly creating
recursions.  However multicast route entries aren't cloned so if
a recursion exists it isn't because of rtflushclone().

Fix stack exhaustion triggered by the use of "-msave-args".

Issue reported by Dániel Lévai on bugs@ confirmed by and ok bluhm@.

Revision 1.126 / (download) - annotate - [select for diffs], Tue Jun 4 16:11:13 2019 UTC (5 years ago) by anton
Branch: MAIN
Changes since 1.125: +4 -1 lines
Diff to previous 1.125 (colored)

Add missing NULL check for the protocol control block (pcb) pointer in
mrt{6,}_ioctl. Calling shutdown(2) on the socket prior to the ioctl
command can cause it to be NULL.

ok bluhm@ claudio@

Reported-by: syzbot+bdc489ecb509995a21ed@syzkaller.appspotmail.com
Reported-by: syzbot+156405fdea9f2ab15d40@syzkaller.appspotmail.com

Revision 1.125 / (download) - annotate - [select for diffs], Wed Feb 13 23:47:43 2019 UTC (5 years, 3 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.124: +3 -2 lines
Diff to previous 1.124 (colored)

change rt_ifa_add and rt_ifa_del so they take an rdomain argument.

this allows mpls interfaces (mpe, mpw) to pass the rdomain they
wish the local label to be in, rather than have it implicitly forced
to 0 by these functions. right now they'll pass 0, but it will soon
be possible to have them rx packets in other rdomains.

previously the functions used ifp->if_rdomain for the rdomain.
everything other than mpls still passes ifp->if_rdomain.

ok mpi@

Revision 1.124 / (download) - annotate - [select for diffs], Sun Feb 10 22:32:26 2019 UTC (5 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored)

remove the implict RTF_MPATH flag that rt_ifa_add() sets on new routes.

MPLS interfaces (ab)use rt_ifa_add for adding the local MPLS label
that they listen on for incoming packets, while every other use of
rt_ifa_add is for adding addresses on local interfaces. MPLS does
this cos the addresses involved are in basically the same shape as
ones used for setting up local addresses.

It is appropriate for interfaces to want RTF_MPATH on local addresses,
but in the MPLS case it means you can have multiple local things
listening on the same label, which doesn't actually work. mpe in
particular keeps track of in use labels to it can handle collisions,
however, mpw does not. It is currently possible to have multiple
mpw interfaces on the same local label, and sharing the same label
as mpe or possible normal forwarding labels.

Moving the RTF_MPATH flag out of rt_ifa_add means all the callers
that still want it need to pass it themselves. The mpe and mpw
callers are left alone without the flag, and will now get EEXIST
from rt_ifa_add when a label is already in use.

ok (and a huge amount of patience and help) mpi@
claudio@ is ok with the idea, but saw a much much earlier solution
to the problem

Revision 1.123 / (download) - annotate - [select for diffs], Wed Oct 10 11:46:59 2018 UTC (5 years, 8 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.122: +5 -5 lines
Diff to previous 1.122 (colored)

RT_TABLEID_MAX is 255, fix places that assumed that it is less than 255.

rtable 255 is a valid routing table or domain id that wasn't handled
by the ip[6]_mroute code or by snmpd.  The arrays in the ip[6]_mroute
code where off by one and didn't allocate space for rtable 255; snmpd
simply ignored rtable 255.  All other places in the tree seem to
handle RT_TABLEID_MAX correctly.

OK florian@ benno@ henning@ deraadt@

Revision 1.122 / (download) - annotate - [select for diffs], Mon Apr 30 19:07:44 2018 UTC (6 years, 1 month ago) by tb
Branch: MAIN
Changes since 1.121: +5 -1 lines
Diff to previous 1.121 (colored)

Reduce the scope of the NET_LOCK() in in_control(). Two functions were
protected: mrt_ioctl() and in_ioctl(). The former has no other callers
and only needs a read lock. The latter will need refactoring to reduce
the lock's scope further. In a first step, establish a single exit point
and protect most of the function body with the NET_LOCK() while removing
the NET_LOCK() from a handful of callers.

suggested by & ok mpi, ok visa

Revision 1.121 / (download) - annotate - [select for diffs], Fri Sep 1 15:05:31 2017 UTC (6 years, 9 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.120: +1 -2 lines
Diff to previous 1.120 (colored)

Change sosetopt() to no longer free the mbuf it receives and change
all the callers to call m_freem(9).

Support from deraadt@ and tedu@, ok visa@, bluhm@

Revision 1.120 / (download) - annotate - [select for diffs], Mon Jun 26 09:32:32 2017 UTC (6 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.119: +2 -2 lines
Diff to previous 1.119 (colored)

Assert that the corresponding socket is locked when manipulating socket
buffers.

This is one step towards unlocking TCP input path.  Note that all the
functions asserting for the socket lock are not necessarilly MP-safe.
All the fields of 'struct socket' aren't protected.

Introduce a new kernel-only kqueue hint, NOTE_SUBMIT, to be able to
tell when a filter needs to lock the underlying data structures.  Logic
and name taken from NetBSD.

Tested by Hrvoje Popovski.

ok claudio@, bluhm@, mikeb@

Revision 1.119 / (download) - annotate - [select for diffs], Mon Jun 19 17:00:16 2017 UTC (6 years, 11 months ago) by bluhm
Branch: MAIN
Changes since 1.118: +2 -3 lines
Diff to previous 1.118 (colored)

The IP multicast forward functions return an errno, call the variable
error.  Make the ip_mforward() return value consistent.  Simplify
the caller logic in ipv6_input() like in IPv4.
OK mpi@

Revision 1.118 / (download) - annotate - [select for diffs], Tue May 16 13:09:21 2017 UTC (7 years ago) by rzalamena
Branch: MAIN
Changes since 1.117: +13 -4 lines
Diff to previous 1.117 (colored)

Sync three changes that were caught by IPv6 multicast routing review:

* use a variable to allow disabling debugs on run-time
* fix a potential memory leak on copyout() failure
* don't just blindly use the first address provided by ifalist

ok bluhm@

Revision 1.117 / (download) - annotate - [select for diffs], Tue May 16 13:05:07 2017 UTC (7 years ago) by rzalamena
Branch: MAIN
Changes since 1.116: +6 -10 lines
Diff to previous 1.116 (colored)

Make return values more meaningful by using errno instead of -1 or 1.

ok bluhm@

Revision 1.116 / (download) - annotate - [select for diffs], Tue May 16 12:24:02 2017 UTC (7 years ago) by mpi
Branch: MAIN
Changes since 1.115: +6 -6 lines
Diff to previous 1.115 (colored)

Replace remaining splsoftassert(IPL_SOFTNET) by NET_ASSERT_LOCKED().

ok visa@

Revision 1.115 / (download) - annotate - [select for diffs], Tue May 16 08:32:17 2017 UTC (7 years ago) by rzalamena
Branch: MAIN
Changes since 1.114: +13 -12 lines
Diff to previous 1.114 (colored)

Let malloc() block when the caller of the add route function is
setsockopt(), otherwise use non-blocking malloc() for network stack
calls.

ok bluhm@

Revision 1.114 / (download) - annotate - [select for diffs], Tue May 16 08:28:29 2017 UTC (7 years ago) by rzalamena
Branch: MAIN
Changes since 1.113: +50 -15 lines
Diff to previous 1.113 (colored)

Call rtfree() after each use of routes and make sure the route is valid
when finding one. Since rtfree() is being called and rt_llinfo being
removed, add checks everywhere to make sure we are using a route that is
not being removed.

ok bluhm@

Revision 1.113 / (download) - annotate - [select for diffs], Thu Apr 6 17:36:18 2017 UTC (7 years, 2 months ago) by dhill
Branch: MAIN
Changes since 1.112: +4 -4 lines
Diff to previous 1.112 (colored)

Convert bcopy to memcpy where the memory does not overlap, otherwise,
use memmove.  While here, change some previous conversions to a simple
assignment.

ok deraadt@

Revision 1.112 / (download) - annotate - [select for diffs], Fri Mar 17 14:59:29 2017 UTC (7 years, 2 months ago) by rzalamena
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.111: +11 -1 lines
Diff to previous 1.111 (colored)

Be more strict on all route iterations, lets always make sure that we
are not going to get a unicast route by accident.

ok mpi@

Revision 1.111 / (download) - annotate - [select for diffs], Tue Mar 14 10:27:10 2017 UTC (7 years, 2 months ago) by rzalamena
Branch: MAIN
Changes since 1.110: +8 -5 lines
Diff to previous 1.110 (colored)

Make mfc_find() more strict when looking for routes, fixes a problem
causing ip_mforward() not to send packets to the userland multicast
routing daemon.

Reported and tested by Paul de Weerd.

ok bluhm@, claudio@

Revision 1.110 / (download) - annotate - [select for diffs], Thu Feb 9 15:36:46 2017 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.109: +47 -30 lines
Diff to previous 1.109 (colored)

Unbreak 'netstat -g' and make multicast route stats sysctl more robust.

ok mpi@

Revision 1.109 / (download) - annotate - [select for diffs], Wed Feb 8 01:28:51 2017 UTC (7 years, 4 months ago) by jsg
Branch: MAIN
Changes since 1.108: +4 -2 lines
Diff to previous 1.108 (colored)

Test for NULL before dereferencing a pointer not after.
ok krw@

Revision 1.108 / (download) - annotate - [select for diffs], Wed Feb 1 20:59:47 2017 UTC (7 years, 4 months ago) by dhill
Branch: MAIN
Changes since 1.107: +13 -18 lines
Diff to previous 1.107 (colored)

In sogetopt, preallocate an mbuf to avoid using sleeping mallocs with
the netlock held.  This also changes the prototypes of the *ctloutput
functions to take an mbuf instead of an mbuf pointer.

help, guidance from bluhm@ and mpi@
ok bluhm@

Revision 1.107 / (download) - annotate - [select for diffs], Thu Jan 12 08:22:42 2017 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.106: +2 -36 lines
Diff to previous 1.106 (colored)

Clean up multicast files from unused definitions and comments.

ok mpi@

Revision 1.106 / (download) - annotate - [select for diffs], Wed Jan 11 13:17:35 2017 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.105: +414 -396 lines
Diff to previous 1.105 (colored)

Remove mfc hash tables and use the OpenBSD routing table for multicast
routes. Beside the code simplification and removal, we also get to see
the multicast routes now in the route(8) utility.

ok mpi@

Revision 1.105 / (download) - annotate - [select for diffs], Fri Jan 6 14:01:19 2017 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.104: +116 -143 lines
Diff to previous 1.104 (colored)

Remove the global viftable vector that holds the virtual interfaces
configuration and instead use ifnet to store the configuration and
counters. With this we can safely use multicast routing daemons on
multiple domains without vif id colisions.

ok mpi@

Revision 1.104 / (download) - annotate - [select for diffs], Fri Jan 6 13:48:58 2017 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.103: +10 -19 lines
Diff to previous 1.103 (colored)

Simplify code by removing some old pullup macro, killing some variables
and using m_dup_pkt() instead of m_copym() with max_linkhdr space adjust
on packet sending to avoid more mbuf allocations.

with input from millert@ and mikeb@,
ok mikeb@

Revision 1.103 / (download) - annotate - [select for diffs], Fri Jan 6 10:02:57 2017 UTC (7 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.102: +19 -59 lines
Diff to previous 1.102 (colored)

Kill various splsoftnet().

ok rzalamena@, visa@

Revision 1.102 / (download) - annotate - [select for diffs], Thu Jan 5 12:10:54 2017 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.101: +31 -46 lines
Diff to previous 1.101 (colored)

Remove some unnecessary code abstractions and while here remove a
splsoftnet.

ok mikeb@

Revision 1.101 / (download) - annotate - [select for diffs], Thu Dec 22 11:04:44 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.100: +2 -661 lines
Diff to previous 1.100 (colored)

Remove PIM support from the multicast stack.

ok mpi@

Revision 1.100 / (download) - annotate - [select for diffs], Wed Dec 21 12:05:01 2016 UTC (7 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.99: +2 -2 lines
Diff to previous 1.99 (colored)

Fix build without PIM defined.

Revision 1.99 / (download) - annotate - [select for diffs], Wed Dec 21 09:52:29 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.98: +13 -10 lines
Diff to previous 1.98 (colored)

Fix PIM compilation even though it is disabled.

ok bluhm@

Revision 1.98 / (download) - annotate - [select for diffs], Tue Dec 20 10:54:52 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.97: +15 -20 lines
Diff to previous 1.97 (colored)

Call the multicast timer callback per domain instead of for all domains
this way we save doing big tables walk and iterating tables that we don't
need to.

ok mpi@

Revision 1.97 / (download) - annotate - [select for diffs], Tue Dec 20 09:33:13 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.96: +1 -3 lines
Diff to previous 1.96 (colored)

Remove unused timeout that was never being set.

ok reyk@

Revision 1.96 / (download) - annotate - [select for diffs], Mon Dec 19 12:52:41 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.95: +1 -27 lines
Diff to previous 1.95 (colored)

Kill unused function.

ok mpi@

Revision 1.95 / (download) - annotate - [select for diffs], Mon Dec 19 09:22:24 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.94: +136 -87 lines
Diff to previous 1.94 (colored)

Extend the multicast sockets and multicast hash table support to multiple
domains. This is one step towards supporting to run more than one multicast
socket in different domains at the same time.

ok mpi@

Revision 1.94 / (download) - annotate - [select for diffs], Tue Dec 13 09:22:18 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.93: +7 -5 lines
Diff to previous 1.93 (colored)

Propagate the routing table id in ip_mrouter_set() so the MRT_ADD_VIF
calls won't fail anymore when doing from a different rdomain.

ok mpi@

Revision 1.93 / (download) - annotate - [select for diffs], Tue Nov 29 15:52:12 2016 UTC (7 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.92: +1 -2 lines
Diff to previous 1.92 (colored)

Kill unused 'struct route'.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Nov 29 10:22:30 2016 UTC (7 years, 6 months ago) by jsg
Branch: MAIN
Changes since 1.91: +2 -3 lines
Diff to previous 1.91 (colored)

m_free() and m_freem() test for NULL.  Simplify callers which had their own
NULL tests.

ok mpi@

Revision 1.91 / (download) - annotate - [select for diffs], Sat Sep 24 18:39:48 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

use hashfree. from Mathieu -
ok guenther

Revision 1.90 / (download) - annotate - [select for diffs], Mon Mar 7 18:44:00 2016 UTC (8 years, 3 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored)

Sync no-argument function declaration and definition by adding (void).
ok mpi@ millert@

Revision 1.89 / (download) - annotate - [select for diffs], Sat Nov 14 15:54:27 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.88: +3 -108 lines
Diff to previous 1.88 (colored)

Remove mrtdebug and reduce differences with the v6 version.

Debug informations can already be accessed via mrtstat and pimstat.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Nov 13 10:33:12 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.87: +4 -7 lines
Diff to previous 1.87 (colored)

Do not cast malloc(9) results.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Nov 13 10:25:48 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.86: +11 -13 lines
Diff to previous 1.86 (colored)

Kill another tunnel leftover and keep PIM stuff inside #ifdef PIM.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Nov 12 18:19:27 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.85: +16 -39 lines
Diff to previous 1.85 (colored)

Kill another leftover from the tunnel support removal and add more PIM.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Nov 12 16:58:45 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.84: +4 -8 lines
Diff to previous 1.84 (colored)

Sync headers and get rid of #ifdef MROUTING.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Nov 12 16:48:53 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.83: +22 -109 lines
Diff to previous 1.83 (colored)

Remove VIFF_TUNNEL leftovers, tunnels aren't supported since 2006.

Even pimd(8) no longer support them.

Revision 1.83 / (download) - annotate - [select for diffs], Thu Nov 12 16:34:13 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

Fix PIM build.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Sep 12 13:34:12 2015 UTC (8 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

Introduce if_input_local() a function to feed local traffic back to
the protocol queues.

It basically does what looutput() was doing but having a generic
function will allow us to get rid of the loopback hack overwwritting
the rt_ifp field of RTF_LOCAL routes.

ok mikeb@, dlg@, claudio@

Revision 1.81 / (download) - annotate - [select for diffs], Tue Sep 1 21:24:04 2015 UTC (8 years, 9 months ago) by bluhm
Branch: MAIN
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

Replace sockaddr casts with the proper satosin(), ... calls.
From David Hill; OK mpi@; tested kspillner@; tweaks bluhm@

Revision 1.80 / (download) - annotate - [select for diffs], Mon Aug 24 14:00:29 2015 UTC (8 years, 9 months ago) by bluhm
Branch: MAIN
Changes since 1.79: +3 -1 lines
Diff to previous 1.79 (colored)

In kernel initialize struct sockaddr_in and sockaddr_in6 to zero
everywhere to avoid passing around pointers to uninitialized stack
memory.  While there, fix the call to in6_recoverscope() in
fill_drlist().
OK deraadt@ mpi@

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jul 15 17:55:08 2015 UTC (8 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.78: +18 -18 lines
Diff to previous 1.78 (colored)

rename mbuf ** parameter from m to mp, to match other similar code

Revision 1.78 / (download) - annotate - [select for diffs], Tue Jun 30 15:30:17 2015 UTC (8 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.77: +8 -8 lines
Diff to previous 1.77 (colored)

Get rid of the undocumented & temporary* m_copy() macro added for
compatibility with 4.3BSD in September 1989.

*Pick your own definition for "temporary".

ok bluhm@, claudio@, dlg@

Revision 1.77 / (download) - annotate - [select for diffs], Mon Feb 9 12:18:19 2015 UTC (9 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.76: +88 -1 lines
Diff to previous 1.76 (colored)

Implement 2 sysctl to retrieve the multicast forwarding cache (mfc) and the
virtual interface table (vif). Will be used by netstat soon.
Looked over by guenther@

Revision 1.76 / (download) - annotate - [select for diffs], Sun Feb 8 03:42:24 2015 UTC (9 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.75: +54 -53 lines
Diff to previous 1.75 (colored)

De-static to make ddb hangman harder. OK phessler, henning

Revision 1.75 / (download) - annotate - [select for diffs], Sat Feb 7 07:56:41 2015 UTC (9 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.74: +23 -5 lines
Diff to previous 1.74 (colored)

mechanical conversion of this code to using siphash instead of some xors.

ok tedu@ claudio@

Revision 1.74 / (download) - annotate - [select for diffs], Wed Dec 17 09:57:13 2014 UTC (9 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

Remove the "multicast_" prefix from the fields a multicast-only struct.

Prodded by claudio@ and mikeb@

Revision 1.73 / (download) - annotate - [select for diffs], Wed Dec 17 09:45:59 2014 UTC (9 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.72: +2 -2 lines
Diff to previous 1.72 (colored)

Use an interface index instead of a pointer for multicast options.

Output interface (port) selection for multicast traffic is not done via
route lookups.  Instead the output ifp is registred when setsockopt(2)
is called with the IP{V6,}_MULTICAST_IF option.  But since there is no
mechanism to invalidate such pointer stored in a pcb when an interface
is destroyed/removed, it might lead your kernel to fault.

Prevent a fault upon resume reported by frantisek holop, thanks!

ok mikeb@, claudio@

Revision 1.72 / (download) - annotate - [select for diffs], Fri Dec 5 15:50:04 2014 UTC (9 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored)

Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.

ok mikeb@, krw@, bluhm@, tedu@

Revision 1.71 / (download) - annotate - [select for diffs], Tue Sep 30 12:54:22 2014 UTC (9 years, 8 months ago) by jsg
Branch: MAIN
Changes since 1.70: +2 -1 lines
Diff to previous 1.70 (colored)

add back the sys/sysctl.h include removed in rev 1.60
fixes the kernel build when PIM is defined

Revision 1.70 / (download) - annotate - [select for diffs], Thu Aug 14 09:01:47 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.69: +1 -2 lines
Diff to previous 1.69 (colored)

No need for raw_cb.h

Revision 1.69 / (download) - annotate - [select for diffs], Thu Aug 14 08:22:38 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.68: +2 -668 lines
Diff to previous 1.68 (colored)

Kill MRT_{ADD,DEL}_BW_UPCALL interfaces and the bandwidth monitoring
code that comes with them.

ok mikeb@, henning@

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jul 22 11:06:10 2014 UTC (9 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.67: +1 -2 lines
Diff to previous 1.67 (colored)

Fewer <netinet/in_systm.h> !

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jul 12 18:44:23 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.66: +13 -13 lines
Diff to previous 1.66 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Apr 21 12:22:26 2014 UTC (10 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.65: +4 -3 lines
Diff to previous 1.65 (colored)

ip_output() using varargs always struck me as bizarre, esp since it's only
ever used to pass on uint32 (for ipsec). stop that madness and just pass
the uint32, 0 in all cases but the two that pass the ipsec flowinfo.
ok deraadt reyk guenther

Revision 1.65 / (download) - annotate - [select for diffs], Mon Apr 21 11:10:54 2014 UTC (10 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.64: +5 -10 lines
Diff to previous 1.64 (colored)

we'll do fine without casting NULL to struct foo * / void *
ok gcc & md5 (alas, no binary change)

Revision 1.64 / (download) - annotate - [select for diffs], Thu Jan 9 06:29:06 2014 UTC (10 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.63: +10 -10 lines
Diff to previous 1.63 (colored)

bzero/bcmp -> memset/memcmp. ok matthew

Revision 1.63 / (download) - annotate - [select for diffs], Sun Oct 27 20:57:39 2013 UTC (10 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.62: +1 -44 lines
Diff to previous 1.62 (colored)

delete UPCALL_TIMING debug code from a the dark ages

Revision 1.62 / (download) - annotate - [select for diffs], Wed Oct 23 15:12:42 2013 UTC (10 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.61: +1 -2 lines
Diff to previous 1.61 (colored)

Remove the number of in_var.h inclusions by moving some functions and
global variables to in.h.

ok mikeb@, deraadt@

Revision 1.61 / (download) - annotate - [select for diffs], Thu May 2 11:54:10 2013 UTC (11 years, 1 month ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.60: +2 -308 lines
Diff to previous 1.60 (colored)

tedu broken Resource Reservation Protocol code that was ifdef RSVP_ISI.

ok deraadt@, tedu@ (implicit)

Revision 1.60 / (download) - annotate - [select for diffs], Thu Mar 28 16:45:16 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.59: +1 -3 lines
Diff to previous 1.59 (colored)

no need for a lot of code to include proc.h

Revision 1.59 / (download) - annotate - [select for diffs], Mon Apr 4 17:44:43 2011 UTC (13 years, 2 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.58: +3 -13 lines
Diff to previous 1.58 (colored)

de-guttenberg our stack a bit
we don't need 7 f***ing copies of the same code to do the protocol checksums
(or not, depending on hw capabilities). claudio ok

Revision 1.58 / (download) - annotate - [select for diffs], Fri Jul 2 02:40:16 2010 UTC (13 years, 11 months ago) by blambert
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.57: +4 -3 lines
Diff to previous 1.57 (colored)

m_copyback can fail to allocate memory, but is a void fucntion so gymnastics
are required to detect that.

Change the function to take a wait argument (used in nfs server, but
M_NOWAIT everywhere else for now) and to return an error

ok claudio@ henning@ krw@

Revision 1.57 / (download) - annotate - [select for diffs], Tue Apr 20 22:05:43 2010 UTC (14 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.56: +2 -1 lines
Diff to previous 1.56 (colored)

remove proc.h include from uvm_map.h.  This has far reaching effects, as
sysctl.h was reliant on this particular include, and many drivers included
sysctl.h unnecessarily.  remove sysctl.h or add proc.h as needed.
ok deraadt

Revision 1.56 / (download) - annotate - [select for diffs], Sat Aug 1 09:08:21 2009 UTC (14 years, 10 months ago) by blambert
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.55: +10 -10 lines
Diff to previous 1.55 (colored)

timeout_add -> timeout_add_msec

ok michele@ claudio@

Revision 1.55 / (download) - annotate - [select for diffs], Mon Jul 13 19:14:29 2009 UTC (14 years, 11 months ago) by michele
Branch: MAIN
Changes since 1.54: +9 -271 lines
Diff to previous 1.54 (colored)

Get rid of the token bucket filter.
Traffic shaping code should not be inside routing code.
If you want to rate-limit use altq instead.

ok claudio@ henning@ dlg@

Revision 1.54 / (download) - annotate - [select for diffs], Thu Jul 9 13:04:29 2009 UTC (14 years, 11 months ago) by michele
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Use MAXTTL instead of the hardcoded value.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jun 5 00:05:22 2009 UTC (15 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Initial support for routing domains. This allows to bind interfaces to
alternate routing table and separate them from other interfaces in distinct
routing tables. The same network can now be used in any doamin at the same
time without causing conflicts.
This diff is mostly mechanical and adds the necessary rdomain checks accross
net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6.
input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@

Revision 1.52 / (download) - annotate - [select for diffs], Tue Sep 16 21:33:37 2008 UTC (15 years, 8 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.51: +1 -2 lines
Diff to previous 1.51 (colored)

remove another dead store.

spotted by markus@

ok henning@ mpf@

Revision 1.51 / (download) - annotate - [select for diffs], Mon Sep 15 21:46:01 2008 UTC (15 years, 8 months ago) by chl
Branch: MAIN
Changes since 1.50: +1 -2 lines
Diff to previous 1.50 (colored)

remove dead stores and newly created unused variables.

Found by LLVM/Clang Static Analyzer.

ok mpf@ looks good mk@ ok henning@

Revision 1.50 / (download) - annotate - [select for diffs], Wed Jan 2 03:33:18 2008 UTC (16 years, 5 months ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

return with ENOTTY instead of EINVAL for unknown ioctl requests.

ok claudio@ krw@ dlg@

Revision 1.49 / (download) - annotate - [select for diffs], Fri Dec 14 18:33:41 2007 UTC (16 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.48: +28 -1 lines
Diff to previous 1.48 (colored)

add sysctl entry points into various network layers, in particular to
provide netstat(1) with data it needs;  ok claudio reyk

Revision 1.48 / (download) - annotate - [select for diffs], Tue May 22 09:51:13 2007 UTC (17 years ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.47: +839 -844 lines
Diff to previous 1.47 (colored)

ip_mroute.c is in bad shape.
This first step makes it style(9) compliant.
Just a whitespace diff, no binary change.

OK claudio@ norby@

Revision 1.47 / (download) - annotate - [select for diffs], Tue Apr 10 17:47:55 2007 UTC (17 years, 2 months ago) by miod
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

``it's'' -> ``its'' when the grammar gods require this change.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Feb 14 00:53:48 2007 UTC (17 years, 4 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

Consistently spell FALLTHROUGH to appease lint.
ok kettenis@ cloder@ tom@ henning@

Revision 1.45 / (download) - annotate - [select for diffs], Thu Jun 15 10:11:27 2006 UTC (18 years ago) by pascoe
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

Change cast of last vararg to ip_output to match what ip_output expects,
for clarity.

henning@ claudio@ ok

Revision 1.44 / (download) - annotate - [select for diffs], Thu May 11 20:12:50 2006 UTC (18 years, 1 month ago) by hshoexer
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

fix corruption of pim register packets.  From Hideki ONO, thanks!

ok mcbride@ itojun@

Revision 1.43 / (download) - annotate - [select for diffs], Tue Apr 25 15:49:35 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.42: +4 -108 lines
Diff to previous 1.42 (colored)

Remove virtual tunnel support from the mrouting code. The virtual tunnel
code breaks multicast on gif(4) interfaces and it is far better to configure
a real gif(4) tunnel instead of a multicast tunnel as the latter is almost
not manageable. OK norby@, mblamer@

Revision 1.42 / (download) - annotate - [select for diffs], Mon Apr 25 17:55:51 2005 UTC (19 years, 1 month ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.41: +5 -5 lines
Diff to previous 1.41 (colored)

csum -> csum_flags

ok krw@ canacar@

Revision 1.41 / (download) - annotate - [select for diffs], Sat Jan 15 04:43:40 2005 UTC (19 years, 5 months ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

fix comment

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jan 14 15:09:42 2005 UTC (19 years, 5 months ago) by mcbride
Branch: MAIN
Changes since 1.39: +2 -3 lines
Diff to previous 1.39 (colored)

Duplicate nested if statement in PIM code.

From brad@

Revision 1.39 / (download) - annotate - [select for diffs], Fri Jan 14 14:51:27 2005 UTC (19 years, 5 months ago) by mcbride
Branch: MAIN
Changes since 1.38: +1437 -24 lines
Diff to previous 1.38 (colored)

Add kernel support for Protocol Independant Multicast (PIM)
Information: http://netweb.usc.edu/pim/

From Pavlin Radoslavov <pavlin@icir.org>

ok deraadt@ brad@

Revision 1.38 / (download) - annotate - [select for diffs], Wed Nov 24 01:25:42 2004 UTC (19 years, 6 months ago) by mcbride
Branch: MAIN
Changes since 1.37: +440 -425 lines
Diff to previous 1.37 (colored)

Multicast routing cleanup from Pavlin Radoslavov
- sync ip_mroute.c with NetBSD
- import some FreeBSD changes to MFC entry handling
- set im->im_vif correctly when sending IGMPMSG_WRONGVIF
- increment mrtstat.mrts_upcalls correctly
- return error from get_sg_cnt() if there is no matching forwarding entry

ok henning@ brad@ naddy@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Aug 24 20:31:16 2004 UTC (19 years, 9 months ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.36: +16 -12 lines
Diff to previous 1.36 (colored)

Don't allow SIOCGET{VIF,SG}CNT from sockets other than the multicast router.

From NetBSD
Fixes PR 3825

ok mcbride@ canacar@ claudio@

Revision 1.19.2.9 / (download) - annotate - [select for diffs], Thu Feb 19 10:57:24 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.19.2.8: +116 -102 lines
Diff to previous 1.19.2.8 (colored) to branchpoint 1.19 (colored) next main 1.20 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 6 17:28:32 2004 UTC (20 years, 5 months ago) by markus
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored)

fix vlan destroy for MROUTING; report spamme@wouz.dk via tedu; ok itojun

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jan 3 14:08:53 2004 UTC (20 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macros
to built-ins, so eventually we will have one version of these files.
Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h
and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes.
okay millert@, drahn@, miod@.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Dec 10 07:22:43 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.33: +92 -92 lines
Diff to previous 1.33 (colored)

de-register.  deraadt ok

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jul 9 22:03:16 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.32: +9 -10 lines
Diff to previous 1.32 (colored)

do not flip ip_len/ip_off in netinet stack.  deraadt ok.
(please test, especially PF portion)

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jul 9 03:23:26 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.31: +16 -3 lines
Diff to previous 1.31 (colored)

better vif_delete (no dangling ref to struct ifnet).  deraadt ok
it won't affect default GENERIC build - as MROUTING is not defined

Revision 1.19.2.8 / (download) - annotate - [select for diffs], Sat Jun 7 11:06:08 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.19.2.7: +2 -6 lines
Diff to previous 1.19.2.7 (colored) to branchpoint 1.19 (colored)

Sync SMP branch to -current

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:14 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.30: +2 -6 lines
Diff to previous 1.30 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.23.4.3 / (download) - annotate - [select for diffs], Mon May 19 22:40:41 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.23.4.2: +641 -620 lines
Diff to previous 1.23.4.2 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

sync

Revision 1.19.2.7 / (download) - annotate - [select for diffs], Fri May 16 00:29:44 2003 UTC (21 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.19.2.6: +639 -619 lines
Diff to previous 1.19.2.6 (colored) to branchpoint 1.19 (colored)

merge the trunk so we will get the genfs and locking fixes

Revision 1.30 / (download) - annotate - [select for diffs], Wed May 14 20:35:06 2003 UTC (21 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.29: +639 -619 lines
Diff to previous 1.29 (colored)

KNF.  markus ok

Revision 1.19.2.6 / (download) - annotate - [select for diffs], Tue May 13 19:36:17 2003 UTC (21 years, 1 month ago) by ho
Branch: SMP
Changes since 1.19.2.5: +3 -2 lines
Diff to previous 1.19.2.5 (colored) to branchpoint 1.19 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.29 / (download) - annotate - [select for diffs], Tue May 6 07:28:39 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

string cleaning; tedu ok

Revision 1.19.2.5 / (download) - annotate - [select for diffs], Fri Mar 28 00:06:54 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.19.2.4: +61 -62 lines
Diff to previous 1.19.2.4 (colored) to branchpoint 1.19 (colored)

Sync the SMP branch with 3.3

Revision 1.23.4.2 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:47 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.23.4.1: +62 -63 lines
Diff to previous 1.23.4.1 (colored) to branchpoint 1.23 (colored)

sync to -current

Revision 1.28 / (download) - annotate - [select for diffs], Wed Aug 28 15:43:03 2002 UTC (21 years, 9 months ago) by pefo
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

Fix a problem where passing NULL as a pointer with varargs does not promote
NULL to full 64 bits on a 64 bit address system. Soultion is to add a
(void *) cast before NULL. This makes a 64 bit MIPS kernel work and will
probably help future 64 bit ports as well.

OK from art@

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jul 31 04:05:57 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.26: +1 -2 lines
Diff to previous 1.26 (colored)

remove $Id$

Revision 1.23.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:31:36 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.23: +32 -38 lines
Diff to previous 1.23 (colored)

Sync UBC branch to -current

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jun 9 16:26:10 2002 UTC (22 years ago) by itojun
Branch: MAIN
Changes since 1.25: +61 -61 lines
Diff to previous 1.25 (colored)

whitespace

Revision 1.19.2.4 / (download) - annotate - [select for diffs], Thu Mar 28 14:56:45 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.19.2.3: +31 -37 lines
Diff to previous 1.19.2.3 (colored) to branchpoint 1.19 (colored)

Merge in -current from roughly a week ago

Revision 1.25 / (download) - annotate - [select for diffs], Fri Mar 15 18:19:52 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.24: +2 -8 lines
Diff to previous 1.24 (colored)

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:11 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.23: +32 -32 lines
Diff to previous 1.23 (colored)

First round of __P removal in sys

Revision 1.19.2.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:29:03 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.19.2.2: +53 -6 lines
Diff to previous 1.19.2.2 (colored) to branchpoint 1.19 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.23 / (download) - annotate - [select for diffs], Wed Sep 26 17:37:52 2001 UTC (22 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.22: +41 -1 lines
Diff to previous 1.22 (colored)

bring back the old copyright notice

Revision 1.22 / (download) - annotate - [select for diffs], Sun Aug 19 15:07:34 2001 UTC (22 years, 9 months ago) by miod
Branch: MAIN
Changes since 1.21: +13 -6 lines
Diff to previous 1.21 (colored)

More old timeouts removal, mainly affected unused/unmaintained code.

Revision 1.19.2.2 / (download) - annotate - [select for diffs], Wed Jul 4 10:54:53 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.19.2.1: +2 -3 lines
Diff to previous 1.19.2.1 (colored) to branchpoint 1.19 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jun 23 16:15:56 2001 UTC (22 years, 11 months ago) by fgsch
Branch: MAIN
Changes since 1.20: +2 -3 lines
Diff to previous 1.20 (colored)

Remove unneeded ip_id convertions.
Instead of using HTONS macro in some places, use htons directly in the
struct member and save us a few bytes.
Fix comment.

Revision 1.19.2.1 / (download) - annotate - [select for diffs], Mon May 14 22:40:12 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.20 / (download) - annotate - [select for diffs], Fri Nov 10 15:33:10 2000 UTC (23 years, 7 months ago) by provos
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

seperate -> separate, okay aaron@

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jan 21 03:15:05 2000 UTC (24 years, 4 months ago) by angelos
Branch: MAIN
CVS Tags: SMP_BASE, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Branch point for: SMP
Changes since 1.18: +8 -5 lines
Diff to previous 1.18 (colored)

Rename the ip4_* routines to ipip_*, make it so GIF tunnels are not
affected by net.inet.ipip.allow (the sysctl formerly known as
net.inet.ip4.allow), rename the VIF ipip_input to ipip_mroute_input.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Aug 8 15:04:22 1999 UTC (24 years, 10 months ago) by niklas
Branch: MAIN
CVS Tags: kame_19991208, OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)

undeclared variable

Revision 1.17 / (download) - annotate - [select for diffs], Sun Aug 8 00:43:00 1999 UTC (24 years, 10 months ago) by niklas
Branch: MAIN
Changes since 1.16: +19 -1 lines
Diff to previous 1.16 (colored)

Support detaching of network interfaces.  Still work to do in ipf, and
other families than inet.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Apr 28 09:28:16 1999 UTC (25 years, 1 month ago) by art
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

zap the newhashinit hack.
Add an extra flag to hashinit telling if it should wait in malloc.
update all calls to hashinit.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Apr 20 20:06:12 1999 UTC (25 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.14: +4 -47 lines
Diff to previous 1.14 (colored)

Merge MROUTING and IPSEC wrt handling of IP-in-IP tunnelled packets.
Fix a panic case in the MROUTING code too.  Drop M_TUNNEL support, nothing
ever uses it.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Feb 5 04:23:43 1999 UTC (25 years, 4 months ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored)

Clear mfchashtbl after deallocation (mycroft@netbsd)

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jan 8 21:51:22 1999 UTC (25 years, 5 months ago) by provos
Branch: MAIN
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored)

dont call ip_randomid() in htons().

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jan 8 01:04:17 1999 UTC (25 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

rip_input() should be called with a 0 terminator; cmetz

Revision 1.11 / (download) - annotate - [select for diffs], Sat Dec 26 12:35:11 1998 UTC (25 years, 5 months ago) by provos
Branch: MAIN
Changes since 1.10: +2 -6 lines
Diff to previous 1.10 (colored)

make ip_id random but ensure that ids dont repeat for some period.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jul 29 22:18:50 1998 UTC (25 years, 10 months ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.9: +19 -3 lines
Diff to previous 1.9 (colored)

Proper handling of IP in IP and checksumming.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 3 07:05:08 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

wrong endian conversion caused vif stats to be wrong; jonny@jonny.eng.br

Revision 1.8 / (download) - annotate - [select for diffs], Mon May 18 21:11:00 1998 UTC (26 years, 1 month ago) by provos
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

first step to the setsockopt/getsockopt interface as described in
draft-mcdonald-simple-ipsec-api, kernel notifies (EMT_REQUESTSA) signal
userland key management applications when security services are requested.
this is only for outgoing connections at the moment, incoming packets
are not yet checked against the selected socket policy.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Sep 28 23:09:58 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.6: +23 -22 lines
Diff to previous 1.6 (colored)

more \n in log()

Revision 1.6 / (download) - annotate - [select for diffs], Fri Feb 21 09:17:33 1997 UTC (27 years, 3 months ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.5: +5 -1 lines
Diff to previous 1.5 (colored)

Couple of missing ifdefs.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Feb 20 01:08:04 1997 UTC (27 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +21 -0 lines
Diff to previous 1.4 (colored)

IPSEC package by John Ioannidis and Angelos D. Keromytis. Written in
Greece. From ftp.funet.fi:/pub/unix/security/net/ip/BSDipsec.tar.gz

Revision 1.4 / (download) - annotate - [select for diffs], Fri May 10 12:31:19 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +4 -5 lines
Diff to previous 1.3 (colored)

if_name/if_unit -> if_xname/if_softc

Revision 1.3 / (download) - annotate - [select for diffs], Sun Apr 21 22:29:02 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.2: +6 -6 lines
Diff to previous 1.2 (colored)

partial sync with netbsd 960418, more to come

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 3 22:30:39 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.1: +61 -45 lines
Diff to previous 1.1 (colored)

From NetBSD: 960217 merge

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:11 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:53:11 1995 UTC (28 years, 8 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.