Messages in this thread |  | | Date | Thu, 29 Nov 2001 15:59:52 -0500 | From | "Christopher Friesen" <> | Subject | Re: RFC: ethernet links should remember routes the same as addresses |
| |
Andi Kleen wrote: > > "Christopher Friesen" <cfriesen@nortelnetworks.com> writes: > > Currently, if I run "ip link set dev ethX down", all routes associated with that > > IP address in the additional routing tables are lost. This is somewhat > > understandable, as the addresses are not actually available anymore. However, > > the addresses are still visible associated with the link. Then I run "ip link > > set dev ethX up". The route in the main routing table comes back, but none of > > the other routes do. Somehow, all of those additional routes must be re-added. > > ip route list dev device > BACKUP > > ... > > while read i ; do ip route add $i ; done < BACKUP
Unfortunately, this seems to only list the routes in the main routing table, and these routes are recreated automatically when I bring the link back up.
The problem is that I have routes in multiple other routing tables, and they don't show up in this command. I assume I'd have to run a similar command for each routing table, which is kind of a pain.
If the driver re-init is totally separate from the routing code, is there any real reason why shutting down the driver *should* remove all routes to that device? Maybe the simplest solution would be a new ioctl that would be a link *reset*...just down/up the link without affecting anything else....
-- Chris Friesen | MailStop: 043/33/F10 Nortel Networks | work: (613) 765-0557 3500 Carling Avenue | fax: (613) 765-2986 Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |