Bug 172532 - service routing restart always fails
Summary: service routing restart always fails
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-09 23:30 UTC by Enji Cooper
Modified: 2023-01-22 20:07 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (434 bytes, patch)
2012-10-09 23:30 UTC, Enji Cooper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer 2012-10-09 23:30:15 UTC
Before patch...

# service routing restart
delete net ::ffff:0.0.0.0: gateway ::1
delete net ::0.0.0.0: gateway ::1
delete net 3ffe::: gateway em1
delete net fe80::: gateway ::1
delete net ff02::: gateway ::1
ifconfig: interface auto does not exist
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
add net 3ffe::: gateway em1
add net fe80::: gateway ::1
add net ff02::: gateway ::1

After patch...

# service routing restart
delete net ::ffff:0.0.0.0: gateway ::1
delete net ::0.0.0.0: gateway ::1
delete net 3ffe::: gateway em1
delete net fe80::: gateway ::1
delete net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
add net 3ffe::: gateway em1
add net fe80::: gateway ::1
add net ff02::: gateway ::1

Fix: Patch attached with submission follows:
How-To-Repeat: 1. Set network_interfaces="auto".
2. Run `service routing restart` with IPv6 enabled.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-10-10 01:24:49 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:22 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Graham Perrin freebsd_committer 2022-10-17 12:39:24 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
Comment 4 Graham Perrin freebsd_committer 2023-01-22 20:06:52 UTC
I can't guess whether the patch here is still applicable, I do know that I'm always left without Internet connectivity after running the command: 

service routing restart

----

root@mowa219-gjp4-8570p-freebsd:~ # uname -KU
1400078 1400078
root@mowa219-gjp4-8570p-freebsd:~ # service routing restart
delete host 127.0.0.1: gateway lo0
default              192.168.1.1          -fib 0   done
delete host ::1: gateway lo0
delete net fe80::: gateway ::1
delete net ff02::: gateway ::1
delete net ::ffff:0.0.0.0: gateway ::1
delete net ::0.0.0.0: gateway ::1
delete net default: gateway 2001:470:1f1c:a0::1
add host 127.0.0.1: gateway lo0
add host ::1: gateway lo0
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
add net default: gateway 2001:470:1f1c:a0::1
root@mowa219-gjp4-8570p-freebsd:~ # 

----

A longhand workaround that I found, through many hours of trial and error (my current use case includes em(4) and iwn(4), with wired network service nearly always available): 

ls /var/run/resolvconf/interfaces/ ; route delete default ; ifconfig wlan0 down && ifconfig em0 down && sleep 5 ; ls /var/run/resolvconf/interfaces/ ; ifconfig em0 up && sleep 15 ; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; ping -c 2 -6 freshports.org