El 20 de novembre de 2011 15:12, Robert Millan <[email protected]> ha escrit:
> 2011/11/20 Michael Tokarev <[email protected]>:
>> So maybe freebsd route can recognize and skip this "gw"
>> keyword between source and destination?
>
> I can't tell beforehand.  I'll discuss this with upstream.

I discussed this with upstream, they don't want to recognize this "gw"
keyword, and with good reason (it'd break existing valid usage).

>> -           while /sbin/route del default gw 0.0.0.0 dev $interface; do :; 
>> done
>> +           if [ ${uname} = "GNU/kFreeBSD" ] ; then
>> +               /lib/freebsd/route -q flush
>> +           else
>> +               while /sbin/route del default gw 0.0.0.0 dev $interface; do 
>> :; done
>> +           fi
>>
>> appears to be not required, the loop (with command line corrections)
>> works on freeBSD too.  But I'm not sure this change is right in the
>> first place: isn't `route flush' flushes _all_ routes, not only the
>> default one?

I think you're right.  Please could you just use:

           if [ ${uname} = "GNU/kFreeBSD" ] ; then
               while /lib/freebsd/route del -net 0.0.0.0 0.0.0.0 dev
$interface; do :; done
           else
               while /sbin/route del default gw 0.0.0.0 dev
$interface; do :; done
           fi

Afterwards, we can switch back to /sbin/route when the transition is finished.

-- 
Robert Millan



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to