> The undo_<table>_routing files are not new; they are an integral part of
> the Multi-ISP implementation and allow 'stop' and 'restart' to work
> correctly.
>   
First time I noticed this...

>> Same goes for the ${VARDIR}/undo_*_routing files: they contain various 
>> "ip route del" statements, but if the route has already been deleted 
>> (given the above example, say I first execute 
>> ${VARDIR}/undo_main_routing, followed by 
>> ${VARDIR}/undo_rfc1918_routing), then an error will be given. The 
>> appropriate thing to do would be either to swallow the error ( redirect 
>> to /dev/null) or check whether that route exists prior to issuing "ip 
>> route del". I favour the latter approach as it is much cleaner.
>>     
>
> Why run 'ip' twice when in the normal case, the existing command succeeds?
>   
You've lost me here. The undo command deletes routes. If a particular 
route has already been deleted (say by undo_main_routing), when 
undo_rfc1918_routing tries to delete the same route (due to the current 
state of shorewall when it doesn't check whether same routes were 
defined, particularly if the 'replace' solution is adopted), then ip 
will moan. That is what I meant by the above.

>> There won't be any such issue with executing 
>> ${VARDIR}/undo_<provider>_routing, since you use "ip route flush table 
>> <provier_num>" and that will clear everything up.
>>     
>
> Because these files are an integral part of the Multi-ISP feature, they
> are normally run by the generated script. Look at one of these files
> closely:
>
> qt /sbin/ip -4 route del unreachable 10.0.0.0/8
> qt /sbin/ip -4 route del unreachable 172.16.0.0/12
> qt /sbin/ip -4 route del unreachable 192.168.0.0/16
>
> The 'qt' function is as follows:
>
> #
> # Suppress all output for a command
> #
> qt()
> {
>     "$@" >/dev/null 2>&1
> }
>
> The attached patch deletes the leading 'qt ' and adds ' >/dev/null 2>&1'
> to the end of each command.
>   
Again, you've lost me. There was absolutely nothing wrong with 
undo_provider_routing - I really like it and simply pointed out that the 
undo_provider_routing can't have the issues of the other undo_*_ files. 
OK, I didn't know what 'qt' does, but I don't see a reason why it needs 
to be modified - it does a good job, so why remove it?

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to