Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#13646 closed defect (fixed)

[netifd] '/etc/init.d/network reload' does not apply new routes and flushes the old ones

Reported by: Damian Kaczkowski <damian.kaczkowski+openwrt@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc: jow@…, nbd@…, cyrus@…

Description

Hi guys.

As topic says, netifd flushes manual routes.

ar71xx
bb trunk r36815

Steps to reproduce.

Show current routes:

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         234.134.121.1   0.0.0.0         UG    0      0        0 eth0.2
10.22.22.0      0.0.0.0         255.255.255.0   U     0      0        0 br-lan
234.134.121.0   0.0.0.0         255.255.255.128 U     0      0        0 eth0.2

Add some test route:

uci set network.test_route_1=route
uci set network.test_route_1.name=test_route_1
uci set network.test_route_1.interface=lan
uci set network.test_route_1.target=10.11.11.0
uci set network.test_route_1.netmask=255.255.255.0
uci set network.test_route_1.gateway=10.22.22.254

uci commit

Reload network and show routes - added route is missing:

/etc/init.d/network reload

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         234.134.121.1   0.0.0.0         UG    0      0        0 eth0.2
10.22.22.0      0.0.0.0         255.255.255.0   U     0      0        0 br-lan
234.134.121.0   0.0.0.0         255.255.255.128 U     0      0        0 eth0.2

Restart network and show routes - routes are now ok:

/etc/init.d/network restart

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         234.134.121.1   0.0.0.0         UG    0      0        0 eth0.2
10.11.11.0      10.22.22.254    255.255.255.0   UG    0      0        0 br-lan
10.22.22.0      0.0.0.0         255.255.255.0   U     0      0        0 br-lan
234.134.121.0   0.0.0.0         255.255.255.128 U     0      0        0 eth0.2

Reload network and check routes - our route is flushed:

/etc/init.d/network reload
route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         234.134.121.1   0.0.0.0         UG    0      0        0 eth0.2
10.22.22.0      0.0.0.0         255.255.255.0   U     0      0        0 br-lan
234.134.121.0   0.0.0.0         255.255.255.128 U     0      0        0 eth0.2

Greets.

Attachments (0)

Change History (6)

comment:1 follow-up: Changed 5 years ago by Matt Willsher <matt@…>

The default route that comes from ppp/pppoe is also removed even though it returns from ifstatus and continues to show after the 6in4 tunnel is up and the route is gone.

comment:2 in reply to: ↑ 1 Changed 5 years ago by Matt Willsher <matt@…>

FWIW I made a post (https://forum.openwrt.org/viewtopic.php?id=44609) over in the forums which gives the background as to how I came across this problem. Perhaps the most relavent part is:

ifstatus run against the PPPoE interface shows the route even after the henet tunnel comes up (there is the correct IP where XXX.XXX.XXX.XXX is below)

...
    "route": [
        {
            "target": "0.0.0.0",
            "mask": 0,
            "nexthop": "XXX.XXX.XXX.XXX"
        }
    ],
...

comment:3 Changed 5 years ago by Damian Kaczkowski <damian.kaczkowski+openwrt@…>

Ticket may be closed. Tested on r36909 and all is good now (regarding OP problem, haven't tested Matts problem). It seems it was fixed at r36903, r36904, r36905, r36906. Thanks.

comment:4 Changed 5 years ago by cyrus

  • Resolution set to fixed
  • Status changed from new to closed

Closing this for now. Please reopen if you still run into similar problems.

comment:5 Changed 5 years ago by Matt Willsher <matt@…>

I can confirm that the ppp route issue is also fixed as of r36906.

comment:6 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.