Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2024 03:52:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 276414] rtnetlink: destroying an interface generates spurious RTM_NEWLINKs
Message-ID:  <bug-276414-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276414

            Bug ID: 276414
           Summary: rtnetlink: destroying an interface generates spurious
                    RTM_NEWLINKs
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: lexi.freebsd@le-fay.org

tested on FreeBSD 15.0-CURRENT #8 main-n267554-c8328f1a7b6e

when an interface is destroyed, an rtnetlink socket monitoring RTNLGRP_LINK
will get 1 or more spurious RTM_NEWLINKS, followed by the actual RTM_DELLIN=
K.

this can be observed with 'route monitor' which uses netlink:

# ifconfig bridge1 create

03:49:47.538 PID 10747 add/repl iface iface#8 bridge1 admin DOWN oper DOWN =
mtu
1500

# ifconfig bridge1 destroy

03:50:14.124 PID 10747 add/repl iface iface#8 bridge1 admin DOWN oper DOWN =
mtu
1500
03:50:14.124 PID 10747 delete iface iface#8 bridge1 admin DOWN oper DOWN mtu
1500

with wg(4) interfaces, there are several spurious RTM_NEWLINKs after destro=
y:

03:50:44.607 PID 10747 add/repl iface iface#8 wg1 admin DOWN oper DOWN mtu =
1420
03:50:44.607 PID    0 add/repl iface iface#8 wg1 admin DOWN oper DOWN mtu 1=
420
03:50:44.654 PID 10747 add/repl iface iface#8 wg1 admin DOWN oper DOWN mtu =
1420
03:50:44.654 PID    0 delete iface iface#8 wg1 admin DOWN oper DOWN mtu 1420

i'm not particularly familiar with the netlink API, but from reading the
documentation, this isn't the behaviour i'd expect.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276414-227>