Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 2025 11:31:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 278654] The -ifa modifier to route(8) is ineffective
Message-ID:  <bug-278654-227-CshifS7u3v@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-278654-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278654

Alexandre Snarskii <snar@snar.spb.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |snar@snar.spb.ru

--- Comment #4 from Alexandre Snarskii <snar@snar.spb.ru> ---
Confirmed the same behavior on FreeBSD 14.3 and 15-CURRENT (as of yesterday).

root@twix:>sysctl net.netlink.debug.nl_parser_debug_level=9
net.netlink.debug.nl_parser_debug_level: 6 -> 9
root@twix:> route add -host 1.1.1.1 10.2.2.2 -ifa 10.0.0.1
add host 1.1.1.1: gateway 10.2.2.2

dmesg shows received netlink attributes as:

[nl_parser] nl_parse_attrs_raw: parse 0xfffff804d6951038 remaining_len 32
[nl_parser] nl_parse_attrs_raw: >> parsing 0xfffff804d6951038 attr_type 1 len 8
(rem 32)
[nl_parser] nl_parse_attrs_raw: >> parsing 0xfffff804d6951040 attr_type 15 len
8 (rem 24)
[nl_parser] nl_parse_attrs_raw: >> parsing 0xfffff804d6951048 attr_type 5 len 8
(rem 16)
[nl_parser] nl_parse_attrs_raw: >> parsing 0xfffff804d6951050 attr_type 14 len
8 (rem 8)
[nl_parser] nl_parse_attrs_raw: end parse: 0xfffff804d6951058 remaining_len 0

so it has DST(1), TABLE(15), GATEWAY(5) and FLAGS(14) attributes, but SRC(2) is
not present.

PS: looking at the kernel side - even if it was present it wont be taken into
consideration: it's defined but not used in code:

snar@twix:~>grep -R RTA_SRC /usr/src/sys/netlink
/usr/src/sys/netlink/route/route.h:     NL_RTA_SRC              = 2, /* binary,
preferred source address */
/usr/src/sys/netlink/route/route.h:#define RTA_SRC                     
NL_RTA_SRC
snar@twix:~>

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

home | help

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