Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 129879 - Wrong route usage on rc scripts.
Summary: Wrong route usage on rc scripts.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: x86 FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
: 129602 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-13 16:32 UTC by Javier Villavicencio (RETIRED)
Modified: 2006-04-19 16:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed patch for freebsd-baselayout. (baselayout-bsd-route.patch,3.60 KB, patch)
2006-04-13 16:38 UTC, Javier Villavicencio (RETIRED)
Details | Diff
replaces -iface for -ifp and "route del" for "route delete" (baselayout-bsd-route.diff,1.24 KB, patch)
2006-04-15 14:54 UTC, Javier Villavicencio (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Villavicencio (RETIRED) gentoo-dev 2006-04-13 16:32:50 UTC
The route command of FreeBSD doesn't accept parameters like "gw", "metric", or "dev" 
While "dev" can be changed and, maybe, used like -iface I don't think it's gonna work everywhere it is used.
Comment 1 Javier Villavicencio (RETIRED) gentoo-dev 2006-04-13 16:38:10 UTC
Created attachment 84594 [details, diff]
proposed patch for freebsd-baselayout.

fixes route commands.
Comment 2 Javier Villavicencio (RETIRED) gentoo-dev 2006-04-13 16:39:21 UTC
One more, to have net.lo0 start without any error messages (there is one regarding 'route add 127.0.0.0/8'):

--- net.lo0.orig        2006-04-13 20:33:24 -0300
+++ net.lo0     2006-04-13 18:27:16 -0300
@@ -732,7 +732,7 @@
        if [[ ${iface} == lo* ]] ; then
                eval metric_${iface}'="0"'
                eval config_${iface}'=( "127.0.0.1/8 brd 127.255.255.255" "${config_lo[@]}" )'
-               eval routes_${iface}'=( "127.0.0.0/8" "${routes_lo[@]}" )'
+               eval routes_${iface}'=( "127.0.0.0/8 -iface lo0" "${routes_lo[@]}" )'
        fi

        # We may not have a loaded module for ${iface}
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-14 08:24:34 UTC
Fixed in CVS, I'm going to release a new freebsd-baselayout now.

Thanks for the patches! :)
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-14 08:27:39 UTC
*** Bug 129602 has been marked as a duplicate of this bug. ***
Comment 5 Javier Villavicencio (RETIRED) gentoo-dev 2006-04-15 14:54:01 UTC
Created attachment 84740 [details, diff]
replaces -iface for -ifp and "route del" for "route delete"

My mistake, I misunderstood the "-iface" parameter of FreeBSD's route command. It seems it is not used to choose a specific interface but it is used just to tell route that the address is accesible directly through any iterface. I'm not sure yet but the correct parameters seems to be "-ifp".

Also there where a few "route del" commands left, FBSD route uses the full word "delete" I'm not sure what's preferred, to replace del for delete in every command or to replace it in the function route() of the wrapper. But I added the replacement to route() function this time.
Comment 6 Javier Villavicencio (RETIRED) gentoo-dev 2006-04-15 16:02:34 UTC
Reopened with new attachment.
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-19 16:53:00 UTC
Committed to SVN.