Menu

#22 route(8) fails to add rules in some cases but returns non-error (0).

BETA-1.65-UPSTREAM
closed-fixed
route (3)
5
2014-10-04
2014-10-04
CEM
No

https://bugzilla.redhat.com/show_bug.cgi?id=1149405

Description of problem:
route(8) fails to add rules in some cases but returns non-error (0).

Version-Release number of selected component (if applicable):
net-tools-2.0-0.15.20131119git.fc20.x86_64

How reproducible:
always.

Steps to Reproduce:
1. route add -net 10.19.207.37 netmask 255.255.255.0 gw <foo>
2.
3.</foo>

Actual results:
route: netmask doesn't match route address
Usage: route ...
(exit status of zero)

Expected results:
Either of:
* route(8) issues the warning (doesn't match route address), but does the
obvious thing and zeros out the net bits in the given addr, and continues
to return no error, OR
* route(8) returns an error status when it won't apply a route, so it is
programmatically detectable by callers

Discussion

  • Bernd Eckenfels

    Bernd Eckenfels - 2014-10-04
    • labels: --> route
    • status: open --> closed-fixed
    • assigned_to: Bernd Eckenfels
    • Group: NEXTGEN --> BETA-1.65-UPSTREAM
     
  • Bernd Eckenfels

    Bernd Eckenfels - 2014-10-04

    Thanks Conrad, a bugfix [d621c2] is commited to the master.

     

    Related

    Commit: [d621c2]

  • Bernd Eckenfels

    Bernd Eckenfels - 2014-10-04

    (NB: i chose to fail the operation as this was the intended old behaviour (the problem here is, that usage() no longer returns an error code). While this is not user friendy I can imagine that catching thought errors this way is the safer option.

     
  • CEM

    CEM - 2014-10-04

    Thanks Bernd!

     

Log in to post a comment.

MongoDB Logo MongoDB