History log of /openbsd/sys/netinet6/udp6_output.c (Results 1 – 25 of 65)
Revision Date Author Comments
# ace0f189 17-Apr-2024 bluhm <bluhm@openbsd.org>

Use struct ipsec_level within inpcb.

Instead of passing around u_char[4], introduce struct ipsec_level
that contains 4 ipsec levels. This provides better type safety.
The embedding struct inpcb is

Use struct ipsec_level within inpcb.

Instead of passing around u_char[4], introduce struct ipsec_level
that contains 4 ipsec levels. This provides better type safety.
The embedding struct inpcb is globally visible for netstat(1), so
put struct ipsec_level outside of #ifdef _KERNEL.

OK deraadt@ mvs@

show more ...


# 94c0e2bd 13-Feb-2024 bluhm <bluhm@openbsd.org>

Merge struct route and struct route_in6.

Use a common struct route for both inet and inet6. Unfortunately
struct sockaddr is shorter than sockaddr_in6, so netinet/in.h has
to be exposed from net/ro

Merge struct route and struct route_in6.

Use a common struct route for both inet and inet6. Unfortunately
struct sockaddr is shorter than sockaddr_in6, so netinet/in.h has
to be exposed from net/route.h. Struct route has to be bsd visible
for userland as netstat kvm code inspects inp_route. Internet PCB
and TCP SYN cache can use a plain struct route now. All specific
sockaddr types for inet and inet6 are embeded there.

OK claudio@

show more ...


# 921ffa12 03-Dec-2023 bluhm <bluhm@openbsd.org>

Rename all in6p local variables to inp.

There exists no struct in6pcb in OpenBSD, this was an old kame idea.
Calling the local variable in6p does not make sense, it is actually
a struct inpcb. Also

Rename all in6p local variables to inp.

There exists no struct in6pcb in OpenBSD, this was an old kame idea.
Calling the local variable in6p does not make sense, it is actually
a struct inpcb. Also in6p is not used consistently in inet6 code.
Having the same convention for IPv4 and IPv6 is less confusing.

OK sashan@ mvs@

show more ...


# cff23a6b 01-Dec-2023 bluhm <bluhm@openbsd.org>

Make internet PCB connect more consistent.

The public interface is in_pcbconnect(). It dispatches to
in6_pcbconnect() if necessary. Call the former from tcp_connect()
and udp_connect().
In in6_pcb

Make internet PCB connect more consistent.

The public interface is in_pcbconnect(). It dispatches to
in6_pcbconnect() if necessary. Call the former from tcp_connect()
and udp_connect().
In in6_pcbconnect() initialization in6a = NULL is not necessary.
in6_pcbselsrc() sets the pointer, but does not read the value.
Pass a constant in6_addr pointer to in6_pcbselsrc() and in6_selectsrc().
It returns a reference to the address of some internal data structure.
We want to be sure that in6_addr is not modified this way. IPv4
in_pcbselsrc() solves this by passing a copy of the address.

OK kn@ sashan@ mvs@

show more ...


# 952c6363 28-Nov-2023 bluhm <bluhm@openbsd.org>

Remove struct inpcb from in6_embedscope() parameters.

rip6_output() did modify inp_outputopts6 temporarily to provide
different ip6_pktopts to in6_embedscope(). Better pass inp_outputopts6
and inp_

Remove struct inpcb from in6_embedscope() parameters.

rip6_output() did modify inp_outputopts6 temporarily to provide
different ip6_pktopts to in6_embedscope(). Better pass inp_outputopts6
and inp_moptions6 as separate arguments to in6_embedscope().
Simplify the code that deals with these options in in6_embedscope().
Doucument inp_moptions and inp_moptions6 as protected by net lock.

OK kn@

show more ...


# 2551e577 26-Nov-2023 bluhm <bluhm@openbsd.org>

Remove inp parameter from ip_output().

ip_output() received inp as parameter. This is only used to lookup
the IPsec level of the socket. Reasoning about MP locking is much
easier if only relevant

Remove inp parameter from ip_output().

ip_output() received inp as parameter. This is only used to lookup
the IPsec level of the socket. Reasoning about MP locking is much
easier if only relevant data is passed around. Convert ip_output()
to receive constant inp_seclevel as argument and mark it as protected
by net lock.

OK mvs@

show more ...


# 3ca2e802 22-Feb-2022 guenther <guenther@openbsd.org>

Delete unnecessary #includes of <netinet6/ip6protosw.h>: some never
needed it and some no longer need it after moving the externs from
there to <sys/protosw.h>

ok jsg@


# 7eb8d89d 22-Feb-2022 guenther <guenther@openbsd.org>

Delete unnecessary #includes of <sys/domain.h> and/or <sys/protosw.h>

net/if_pppx.c pointed out by jsg@
ok gnezdo@ deraadt@ jsg@ mpi@ millert@


# 678831be 10-Mar-2021 jsg <jsg@openbsd.org>

spelling

ok gnezdo@ semarie@ mpi@


# 0e560947 13-Sep-2018 bluhm <bluhm@openbsd.org>

Add reference counting for inet pcb, this will be needed when we
start locking the socket. An inp can be referenced by the PCB queue
and hashes, by a pf mbuf header, or by a pf state key.
OK visa@


# b2a698ea 11-Aug-2017 bluhm <bluhm@openbsd.org>

Validate sockaddr from userland in central functions. This results
in common checks for unix, inet, inet6 instead of partial checks
here and there. Some checks are already done at a higher layer,
b

Validate sockaddr from userland in central functions. This results
in common checks for unix, inet, inet6 instead of partial checks
here and there. Some checks are already done at a higher layer,
but better be paranoid with user input.
OK claudio@ millert@

show more ...


# 1a74d1f7 13-May-2017 bluhm <bluhm@openbsd.org>

Return EADDRNOTAVAIL if UDP sendto(2) is used with a mapped address.
OK mpi@


# 90b45443 19-Dec-2016 mpi <mpi@openbsd.org>

Remove redundant splsoftnet().

ok bluhm@


# 967e9010 18-Nov-2016 dlg <dlg@openbsd.org>

turn ipstat into a set of percpu counters.

each counter is identified by an enum value which correspond to the
original members of the udpstat struct.

udpstat_inc(udps_foo) replaces udpstat.udps_fo

turn ipstat into a set of percpu counters.

each counter is identified by an enum value which correspond to the
original members of the udpstat struct.

udpstat_inc(udps_foo) replaces udpstat.udps_foo++ for the actual
updates. udpstat_inc is a thin wrapper around counters_inc.

counters are still returned to userland via the udpstat struct for
now.

ok mpi@ mikeb@ deraadt@

show more ...


# 3e4bd4b4 04-Aug-2016 vgross <vgross@openbsd.org>

Commit in6_selectsrc() split again, with missing assignment fixed.


# 9b3bbc85 22-Jul-2016 mpi <mpi@openbsd.org>

Revert in_selectsrc() refactoring, it breaks IPv6.

Reported by Heiko on bugs@.

ok stsp@, claudio@


# f9813c41 20-Jul-2016 vgross <vgross@openbsd.org>

Split in6_selectsrc() into a low-level part and a pcb-level part, and
convert in_selectsrc() prototype to match.

Ok bluhm@ mpi@.


# 6876d393 19-May-2016 vgross <vgross@openbsd.org>

Do not check if source address is available when the UDP6 socket is bound
to [::]. We should be able to send from a socket bound to [::] while using
sockets bound to specified addresses for reception

Do not check if source address is available when the UDP6 socket is bound
to [::]. We should be able to send from a socket bound to [::] while using
sockets bound to specified addresses for reception.

Spotted with regress/usr.sbin/syslogd/args-client-bind-only6.pl test case.

"makes sense to me" millert@, ok benno@, ok bluhm@

show more ...


# a3324a84 31-Mar-2016 vgross <vgross@openbsd.org>

Don't forget to initialize scope_id. This fixes semarie@ and sthen@'s
regressions with dhcpcd.

Ok sthen@


# 20aa62de 23-Mar-2016 vgross <vgross@openbsd.org>

Merge in_pcbbind() and in6_pcbbind(), and change every call to
in6_pcbbind() into in_pcbbind().

Ok jca@ mpi@


# b23e58bb 21-Mar-2016 vgross <vgross@openbsd.org>

Extract in6_pcbaddrisavail() from in6_pcbbind(), and use it when
checking for source availability in udp6_output(); This time with
all the files.

Ok jca@ bluhm@


# ea798c60 20-Mar-2016 jca <jca@openbsd.org>

Revert, missing decl for in6_pcbaddrisavail() breaks kernel build.

Spotted by deraadt@


# c8ea467a 19-Mar-2016 vgross <vgross@openbsd.org>

Extract in6_pcbaddrisavail() from in6_pcbbind(), and use it when
checking for source availability in udp6_output().

Ok jca@ bluhm@


# 5b750a1d 12-Mar-2016 vgross <vgross@openbsd.org>

Add checks on overlapping IPv6 sockets ownership

ok mpi@ bluhm@


# 05cb8c4f 02-Dec-2015 vgross <vgross@openbsd.org>

Move port picking away from in_pcbbind()

ok sthen@


123