[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#646961: FreeBSD route and "gw" keyword

El 20 de novembre de 2011 15:12, Robert Millan <rmh@debian.org> ha escrit:
> 2011/11/20 Michael Tokarev <mjt@tls.msk.ru>:
>> 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 dev $interface; do :; done
>> +           if [ ${uname} = "GNU/kFreeBSD" ] ; then
>> +               /lib/freebsd/route -q flush
>> +           else
>> +               while /sbin/route del default gw 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 dev
$interface; do :; done
               while /sbin/route del default gw dev
$interface; do :; done

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

Robert Millan

Reply to: