diff mbox series

Fix error message generated in routel script when have 'multicase' in routing list

Message ID fe0c34409428f100fb2e602e021062b8c4df4b6b.camel@arcor.de (mailing list archive)
State Rejected
Delegated to: Stephen Hemminger
Headers show
Series Fix error message generated in routel script when have 'multicase' in routing list | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

B.Arenfeld March 15, 2021, 8:30 a.m. UTC
Hello :-)

I'm on an machine with Manjaro Linux. 
I get some error messages from shift command in the routel script:
/usr/bin/routel: Zeile 48: shift: shift count out of range

Reason are lines from "ip route list table 0" starting with word "multicast" :
 
multicast ff00::/8 dev enp2s0 table local proto kernel metric 256 pref medium

I added the "multicast" word in routel script and everything is fine ;-)

Greetings

Burkhard Arenfeld


Signed-off-by: Burkhard Arenfeld <b.arenfeld@arcor.de>

Comments

Stephen Hemminger March 17, 2021, 6:07 a.m. UTC | #1
On Mon, 15 Mar 2021 09:30:07 +0100
"B.Arenfeld" <b.arenfeld@arcor.de> wrote:

> Hello :-)
> 
> I'm on an machine with Manjaro Linux. 
> I get some error messages from shift command in the routel script:
> /usr/bin/routel: Zeile 48: shift: shift count out of range
> 
> Reason are lines from "ip route list table 0" starting with word "multicast" :
>  
> multicast ff00::/8 dev enp2s0 table local proto kernel metric 256 pref medium
> 
> I added the "multicast" word in routel script and everything is fine ;-)
> 
> Greetings
> 
> Burkhard Arenfeld
> 
> 
> Signed-off-by: Burkhard Arenfeld <b.arenfeld@arcor.de>
> 
> --- routel.orig	2021-03-15 08:23:24.706677247 +0100
> +++ routel	2021-03-15 08:23:20.293589911 +0100
> @@ -25,7 +25,7 @@ ip route list table "$@" |
>      src=""
>      table=""
>      case $network in
> -       broadcast|local|unreachable) via=$network
> +       broadcast|local|multicast|unreachable) via=$network
>            network=$1
>            shift
>            ;;
> 
> 

There are several patches which make it impossible to apply.

Serious: the patch doesn't apply the current version of ip/routel in git
has the same line already there? Not sure where you found the original but
the version in git was imported back in 2015 (from Bitkeeper) and already
has the same line.  Did you get this from some vendor supplied out of date
distro?

Minor: the patch was not based at the normal place in the directory
tree. The standard practice is to do this at directory of the source tree.
In this case it would be in the iproute2 source directory. In that directory
the routel script is in ip sub directory.

Trivial: checkpatch whines that the name in From and Signed-off-by aren't
exact match. But that is just noise, and it looks ok.

Please compare with current iproute2 in git and see if your patch was backwards?
diff mbox series

Patch

--- routel.orig	2021-03-15 08:23:24.706677247 +0100
+++ routel	2021-03-15 08:23:20.293589911 +0100
@@ -25,7 +25,7 @@  ip route list table "$@" |
     src=""
     table=""
     case $network in
-       broadcast|local|unreachable) via=$network
+       broadcast|local|multicast|unreachable) via=$network
           network=$1
           shift
           ;;