NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
install/57989: sysinst parses `route -n show' output and sometimes feeds back input route(8) doesn't like
>Number: 57989
>Category: install
>Synopsis: sysinst parses `route -n show' output and sometimes feeds back input route(8) doesn't like
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: install-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 03 03:50:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current
>Organization:
The RouteBSD Installation
>Environment:
>Description:
sysinst(8) parses the output of `route -n show' to get a default default route suggestion:
648 /*
649 * Extract default route from output of
650 * 'route -n show'
651 */
652 if (collect(T_OUTPUT, &textbuf,
653 "/sbin/route -n show | "
654 "while read dest gateway flags;"
655 " do [ \"$dest\" = default ] && {"
656 " echo \"$gateway\"; break; };"
657 " done" ) > 0)
658 strlcpy(net_defroute, textbuf,
659 sizeof net_defroute);
660 free(textbuf);
661 if ((nline = strchr(net_defroute, '\n')))
662 *nline = '\0';
https://nxr.netbsd.org/xref/src/usr.sbin/sysinst/net.c#648
When there's no gateway, and we only have link-local configuration, it sometimes comes up with net_defroute set to `link#1'. But route(8) doesn't like it when that is passed back in later:
883 run_program(RUN_DISPLAY | RUN_PROGRESS,
884 "/sbin/route -n add default %s", net_defroute);
https://nxr.netbsd.org/xref/src/usr.sbin/sysinst/net.c#883
This causes route(8) to fail:
Status: Command failed
Command: /sbin/route -n add default link#1
Hit enter to continue
────────────────────────────────────────────────────────────────────────────────
route: link#1: bad value
Fortunately, it is an apparently harmless failure; it doesn't prevent the installation from proceeding and downloading from link-local addresses.
>How-To-Repeat:
run sysinst on a network with no DHCP server or IPv6 SLAAC or anything, just link-local configuration
>Fix:
Yes, please!
Home |
Main Index |
Thread Index |
Old Index