Bug 278220 - gre: route add -iface invalid argument
Summary: gre: route add -iface invalid argument
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-04-07 09:02 UTC by Dirk Meyer
Modified: 2024-04-08 17:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Meyer freebsd_committer freebsd_triage 2024-04-07 09:02:54 UTC
Setup:
Using a GRE Tunnel to route an IPv4 and IPv6 network.
The endpoint is a small Cisco Router with "ip unnumbered"

After Updating from FreeBSD-13 to FreeBSD-14.
the gre tunnels stopped working for IPv4, IPv6 seems okay.
Kernel is GENERIC

On FreeBSD-14 any IPv4 route set is rejected with "Invalid argument"

Diagnostics:

# freebsd-version -kru
14.0-RELEASE-p6
14.0-RELEASE-p6
14.0-RELEASE-p6

# ifconfig gre0
gre0: flags=1008051<UP,POINTOPOINT,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 1476
        description: f2
        options=80000<LINKSTATE>
        tunnel inet 192.168.XXX.15 --> 185.XXX.XXX.2
        inet6 fe80::xxxx:xxxx:xxxx:xxxx%gre0 prefixlen 64 scopeid 0x4
        groups: gre
        fib: 3
        tunnelfib: 3
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

# route add -4 10.10.10.10/24 -iface gre0
add net 10.10.10.10: gateway gre0 fib 0: Invalid argument
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2024-04-07 09:06:33 UTC
# route add -4 10.10.10.10/24 -iface gre0 -fib 3
add net 10.10.10.10: gateway gre0 fib 3: Invalid argument

Possible Workaround:

After configuring an extra IPv4 address in the interface,
the route is accepted.

# ifconfig gre0 inet 10.10.30.1 10.10.30.12
# route add -4 10.10.10.10/24 -iface gre0 -fib 3
Comment 2 Marek Zarychta 2024-04-07 18:45:17 UTC
(In reply to Dirk Meyer from comment #1)
It has already been fixed in CURRENT[1], see also bug 275341. There was MFC to stable/14 too[2], so 14.1-RELEASE should be fine.

1. https://cgit.freebsd.org/src/commit/?id=f818559774cb0c1516364c4beca361480fd68b5b
2. https://lists.freebsd.org/archives/freebsd-net/2024-March/004714.html