#2 Use 'ip route' instead of 'route'

closed-rejected
None
5
2006-03-09
2006-03-02
James Ots
No

This patch makes wlassistant use 'ip route' instead
of 'route' when trying to find out the default
gateway.

Because 'route' formats the output, on my machine
where the default gateway is somehow being resolved
to a hostname then the regular expression doesn't
recognise it:

default www.routerlogin 0.0.0.0 UG
0 0 0 ra

While 'ip route' returns this:

default via 192.168.0.1 dev ra0

Also, it's more 'correct' to use the 'ip' command.

However, I'm not sure if my regex will match all
possible output from 'ip route', but I think it will.

Discussion

  • Pawel Nawrocki
    Pawel Nawrocki
    2006-03-07

    Logged In: YES
    user_id=1243212

    No patch attached.

     
  • Pawel Nawrocki
    Pawel Nawrocki
    2006-03-07

    • assigned_to: nobody --> pnawrocki
    • status: open --> wont-fix-invalid
     
  • James Ots
    James Ots
    2006-03-07

    Logged In: YES
    user_id=384135

    Hmm, I don't know what sourceforge did with my attachment.
    I'll try again.

     
  • James Ots
    James Ots
    2006-03-07

    • status: wont-fix-invalid --> open-invalid
     
  • James Ots
    James Ots
    2006-03-07

    The Patch

     
    Attachments
  • Pawel Nawrocki
    Pawel Nawrocki
    2006-03-09

    Logged In: YES
    user_id=1243212

    the 'ip' command is not present in some distros (eg
    Slackware). Applying this patch would create additional
    dependancy and require users to seek for and install
    additional packages (in the Slackware case very hard to
    find). That's why I think this patch would make more users
    confused and decided not to apply it. Thank you anyway for
    your contribution!

     
  • Pawel Nawrocki
    Pawel Nawrocki
    2006-03-09

    • status: open-invalid --> closed-rejected