History log of /openbsd/sys/net/if_etherip.c (Results 1 – 25 of 55)
Revision Date Author Comments
# 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 ...


# 938ff1ae 23-Dec-2023 bluhm <bluhm@openbsd.org>

Backout always allocate per-CPU statistics counters for network
interface descriptor. It panics during attach of em(4) device at
boot.


# 4046f503 22-Dec-2023 mvs <mvs@openbsd.org>

Always allocate per-CPU statistics counters for network interface
descriptor.

We have the mess in network interface statistics. Only pseudo drivers
do per-CPU counters allocation, all other network

Always allocate per-CPU statistics counters for network interface
descriptor.

We have the mess in network interface statistics. Only pseudo drivers
do per-CPU counters allocation, all other network devices use the old
`if_data'. The network stack partially uses per-CPU counters and
partially use `if_data', but the protection is inconsistent: some times
counters accessed with exclusive netlock, some times with shared
netlock, some times with kernel lock, but without netlock, some times
with another locks.

To make network interfaces statistics more consistent, always allocate
per-CPU counters at interface attachment time and use it instead of
`if_data'. At this step only move counters allocation to the if_attach()
internals. The `if_data' removal will be performed with the following
diffs to make review and tests easier.

ok bluhm

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 ...


# bf0d449c 16-Sep-2023 mpi <mpi@openbsd.org>

Allow counters_read(9) to take an optional scratch buffer.

Using a scratch buffer makes it possible to take a consistent snapshot of
per-CPU counters without having to allocate memory.

Makes ddb(4)

Allow counters_read(9) to take an optional scratch buffer.

Using a scratch buffer makes it possible to take a consistent snapshot of
per-CPU counters without having to allocate memory.

Makes ddb(4) show uvmexp command work in OOM situations.

ok kn@, mvs@, cheloha@

show more ...


# 1d80faa6 28-Feb-2022 dlg <dlg@openbsd.org>

add the mbuf tags that prevent output loops.

mostly copied from vxlan where the tag is checked in output and
set in encap. etherip appears to be one of the first drivers i
reworked, so it's a bit cr

add the mbuf tags that prevent output loops.

mostly copied from vxlan where the tag is checked in output and
set in encap. etherip appears to be one of the first drivers i
reworked, so it's a bit crufty. the ipv4 vs ipv6 handling could
be done better.

show more ...


# 4123b6a7 16-May-2021 deraadt <deraadt@openbsd.org>

panic does not require a \n at the end. When one is provided, it looks wrong.


# 3a0d2939 09-Jan-2021 gnezdo <gnezdo@openbsd.org>

Enforce range with sysctl_int_bounded in etherip_sysctl

OK millert@


# 0e70c421 21-Aug-2020 kn <kn@openbsd.org>

Leave default ifq_maxlen handling to ifq_init()

Most clonable interface drivers (except bridge, enc, loop, pppx,
switch, trunk and vlan) initialise the send queue's length to IFQ_MAXLEN
during *_clo

Leave default ifq_maxlen handling to ifq_init()

Most clonable interface drivers (except bridge, enc, loop, pppx,
switch, trunk and vlan) initialise the send queue's length to IFQ_MAXLEN
during *_clone_create() even though ifq_init(), which is eventually called
through if_attach(), does the same.

Remove all early "ifq_set_maxlen(&ifq->if_snd, IFQ_MAXLEN);" lines to leave
it to ifq_init() and have clonable drivers a tad more in sync.

OK mvs

show more ...


# 0cae21bd 10-Jul-2020 patrick <patrick@openbsd.org>

Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.

ok dlg@ tobhe@


# 26415d92 23-Apr-2019 dlg <dlg@openbsd.org>

a first cut at converting some virtual ethernet interfaces to if_vinput

this let's input processing bypass ifiqs. there's a performance
benefit from this, and it will let me tweak the backpressure d

a first cut at converting some virtual ethernet interfaces to if_vinput

this let's input processing bypass ifiqs. there's a performance
benefit from this, and it will let me tweak the backpressure detection
mechanism that ifiqs use without impacting on a stack of virtual
interfaces.

ive tested all of these except mpw, which i will end up testing
soon anyway.

show more ...


# b9e5cef3 19-Apr-2019 dlg <dlg@openbsd.org>

use the factored out txhprio and rxhprio checks

reduces code duplication and chance for error.


# 8d943c62 19-Apr-2019 dlg <dlg@openbsd.org>

add rxprio support


# 25dfeb2b 17-Dec-2018 dlg <dlg@openbsd.org>

Handle SIOCADDMULTI and SIOCDELMULTI as nops in ioctl code.

There's nothing underneath the tunnels that needs configuration,
so there's no point in keepign track of configured multicast
addresses. W

Handle SIOCADDMULTI and SIOCDELMULTI as nops in ioctl code.

There's nothing underneath the tunnels that needs configuration,
so there's no point in keepign track of configured multicast
addresses. We will at least save a bit of memory.

show more ...


# 12f62104 17-Dec-2018 dlg <dlg@openbsd.org>

If something like ether_ioctl returns ENETRESET, don't let it bubble out.

ENETRESET in hardware drivers means you should reprogram the hardware.
There's no hardware to reprogram, so just turn it int

If something like ether_ioctl returns ENETRESET, don't let it bubble out.

ENETRESET in hardware drivers means you should reprogram the hardware.
There's no hardware to reprogram, so just turn it into 0 on the way
out.

show more ...


# d8e64327 12-Nov-2018 dlg <dlg@openbsd.org>

add txprio support

etherip puts the prio in the encapsulating ip header, and supports
using hardcoded prio values or the prio from the mbuf. it encapsulates
ethernet, which doesnt have a prio field

add txprio support

etherip puts the prio in the encapsulating ip header, and supports
using hardcoded prio values or the prio from the mbuf. it encapsulates
ethernet, which doesnt have a prio field unelss you parse the ether
payload, which is not worth it.

ok claudio@

show more ...


# 4e916909 12-Nov-2018 dlg <dlg@openbsd.org>

set the hardmtu on ether encap ifs so the mtu can be raised above 1500


# e23f9ddd 29-Oct-2018 dlg <dlg@openbsd.org>

use the tunnelttl in the ip6 encap too, not ip6_defhlim.


# 3228febf 19-Feb-2018 dlg <dlg@openbsd.org>

initialise sc_df to 0 in clone create rather than setting sc_ttl badly


# ed7a9f2e 19-Feb-2018 dlg <dlg@openbsd.org>

add code to support configuration of tunnel traffic fragmentation


# 137f8175 12-Feb-2018 dlg <dlg@openbsd.org>

restore the previous semantics wrt if up, tunnel, and address config.

our network drivers have a feature where if you configure an address
on the interface, it implicitly brings the interface up. i

restore the previous semantics wrt if up, tunnel, and address config.

our network drivers have a feature where if you configure an address
on the interface, it implicitly brings the interface up. i changed
etherip so you could only change the tunnel configuration while it
down, but maintained the implicit up behaviour. bringing the tunnel
up also relied on having valid configuration, ie, tunnel addreses
must be configured otherwise up will fail.

this means people who have address config in their hostname.etherip
files before config for the tunnel addresses will have problems.
firstly, the address wont be configured because falling through to
the interface up fails because the tunnel isnt configured correctly,
and that error makes the address config roll back. secondly, config
that relies on configuring the address to bring the interface up
will fail because there's no explicit up after the tunnel config.

this diff rolls the tunnel config back to keeping the interface on
a list, and allowing config at any time. the caveat to this is that
it makes mpsafety hard because inconsistent intermediate states are
visible when packets are being processed.

show more ...


# 77f3bafc 12-Feb-2018 dlg <dlg@openbsd.org>

; ends c statements, not ;;


# 4fc46bb8 09-Feb-2018 dlg <dlg@openbsd.org>

add support for setting the ttl on the tunnel traffic.


# 0f32e530 09-Feb-2018 dlg <dlg@openbsd.org>

rework etherip to make it more consistent and reduce code duplication.

ok claudio@


# 71cb9cc2 01-Feb-2018 bluhm <bluhm@openbsd.org>

Done means to stop processing the protocol loop, but IP proto none
is protocol 58. Fix typo in ip6_etherip_input() to properly discard
EtherIP tunnel IPv6 packets if the feature is disabled.
found b

Done means to stop processing the protocol loop, but IP proto none
is protocol 58. Fix typo in ip6_etherip_input() to properly discard
EtherIP tunnel IPv6 packets if the feature is disabled.
found by Maxime Villard; with markus@; OK patrick@ deraadt@ millert@ jca@

show more ...


123