History log of /netbsd/sys/netinet/ip_carp.c (Results 1 – 25 of 119)
Revision Date Author Comments
# d7c33465 07-Apr-2023 mlelstv <mlelstv@NetBSD.org>

Select virtual address as sender if backing interface is anonymous.
Use correct scope for IPv6.


# dadf14f6 26-Mar-2023 mlelstv <mlelstv@NetBSD.org>

Use backing device to send advertisements. Otherwise the packets originate
from the virtual MAC address, which confuses switches.


# e20e2cb2 02-Sep-2022 thorpej <thorpej@NetBSD.org>

Remove unnecessary inclusion of <net/netisr.h>.


# d4636643 30-Sep-2021 yamaguchi <yamaguchi@NetBSD.org>

carp: Register carp_carpdev_state to link-state change hook


# bbdda93b 16-Jun-2021 riastradh <riastradh@NetBSD.org>

if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so

if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around. And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail. (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint. This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken. However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.

show more ...


# 604d35db 14-Oct-2020 roy <roy@NetBSD.org>

carp: Don't set a link level address if vhid == -1

Link level address for carp is dervied from vhid.
Until vhid is set, carp is useless, so don't give it a link level address
until a vhid is set.

T

carp: Don't set a link level address if vhid == -1

Link level address for carp is dervied from vhid.
Until vhid is set, carp is useless, so don't give it a link level address
until a vhid is set.

This fixes recent test case breakage where carp was fixed to actually
print the ethernet address set by default. Note that neither carp nor
the test case itself was actually broken as the error is the common
ATF net code assuming that a cloned interface's link level address is
unique upon creation.

show more ...


# f2b4deb2 12-Oct-2020 roy <roy@NetBSD.org>

carp: link state is DOWN until it becomes a MASTER

This is consitent with other BSD's handling of CARP and means
we don't have to carry a custom flag for it.


# d1382b89 12-Oct-2020 roy <roy@NetBSD.org>

carp: Set ethernet address just before interface registation

Otherwise ifconfig reports SIOCGLIFADDR errors.


# 62642b83 09-Oct-2020 roy <roy@NetBSD.org>

carp: Remove media, software should use link status.

carp literally has no media just like ppp, vlan, etc.


# 59008cd7 06-Feb-2020 thorpej <thorpej@NetBSD.org>

Perform link state change processing on a work queue, rather than in a
softint.


# a602279a 04-Feb-2020 thorpej <thorpej@NetBSD.org>

Use ifmedia_fini().


# d666a55f 29-Jan-2020 thorpej <thorpej@NetBSD.org>

Adopt <net/if_stats.h>.


# 3dd0bace 20-Jan-2020 thorpej <thorpej@NetBSD.org>

Remove FDDI support.


# 30a870c7 19-Jan-2020 thorpej <thorpej@NetBSD.org>

Remove Token Ring support.


# 19664277 16-Jan-2020 kardel <kardel@NetBSD.org>

Provide SIOCGIFMEDIA ioctl to deliver link status.
Add link0 (IFF_LINK0) flag to map INIT state to LINK_STATE_DOWN
instead of LINK_STATE_UNKNOWN. This allows routing software to
suppress routes to th

Provide SIOCGIFMEDIA ioctl to deliver link status.
Add link0 (IFF_LINK0) flag to map INIT state to LINK_STATE_DOWN
instead of LINK_STATE_UNKNOWN. This allows routing software to
suppress routes to the interface of the carp interface when in
init state (e. g. link down in the parent interface).

show more ...


# 70747dc1 10-Nov-2019 chs <chs@NetBSD.org>

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.


# 23333e24 01-Jun-2019 joerg <joerg@NetBSD.org>

Define carp6_cksum only when it is used, that is under INET6


# aa137774 14-Mar-2019 ozaki-r <ozaki-r@NetBSD.org>

carp: don't skip pserialize_read_enter and ifa_release


# ae0244df 22-Dec-2018 maxv <maxv@NetBSD.org>

Replace M_ALIGN and MH_ALIGN by m_align.


# 06fb17b7 14-Sep-2018 maxv <maxv@NetBSD.org>

Use non-variadic function pointer in protosw::pr_input.


# 8517c9d1 26-Jun-2018 msaitoh <msaitoh@NetBSD.org>

Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug th

Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.

show more ...


# 5dd99733 14-Jun-2018 yamaguchi <yamaguchi@NetBSD.org>

Add the lock to refer the list included in ethercom for safety

The lock is already held while adding and deleting
ok ozaki-r@


# f07cea33 14-Jun-2018 yamaguchi <yamaguchi@NetBSD.org>

Use ether_lookup_multi() instead of the macro

ok ozaki-r@


# 5da2a6c3 18-May-2018 maxv <maxv@NetBSD.org>

IP6_EXTHDR_GET -> M_REGION_GET, no functional change.


# 1c9c60ff 21-Mar-2018 maxv <maxv@NetBSD.org>

Fix an untriggerable memory leak. carp_prepare_ad does not fail, so switch
it to void.


12345