Comments (7)
Thanks,
I've rewrote the script, can you check if the latest version has the same problem ?
from bsdrp.
Now its not better but different :)
Here is output without modifications.
% ./graphpath-new.sh.ORG 46.215.0.141 1.1.1.1
This tool is mainly designed for drawing router or firewall routing view
./graphpath-new.sh.ORG: position: parameter not set
There seams to be problem with postition and position parameter name.
% grep -C 3 postition ./graphpath-new.sh.ORG
local ip=$3 # IP address for src & dst host (=direct for a router)
local gateway=$4 # IP address for a router
local gateway_arp=$5 # ARP cache if directly connected to "me" block
local postition=$6
left=""
right=""
# There is a special case: If ip=direct, this mean this block is useless
% grep -C 3 position ./graphpath-new.sh.ORG
# There is a special case: If ip=direct, this mean this block is useless
[ "$ip" == direct ] && return 0
# If in second family mode, need to move or add vertical line
[ "${position}" == "left" ] && left=" | "
[ "${position}" == "right" ] && right=" |"
# If label is "ROUTER TOWARDS DESTINATION", need to move this block to the left
#echo ${label} | grep -q "ROUTER TOWARDS DESTINATION" && left=" | "
# If label is "ROUTER TOWARDS SOURCE", need to add an vertical line to the left"
Here is the script after my 'new' modifications.
% ./graphpath-new.sh 46.215.0.141 1.1.1.1
This tool is mainly designed for drawing router or firewall routing view
+----------------------------+
| SOURCE HOST |
| IP: 46.215.0.141 |
| ARP: empty |
+----------------------------+
|
+----------------------------+
| IF: lo0 |
| MAC: |
| IP: 127.0.0.1 |
| net: 46.215.0.141 |
| mask: 255.255.255.255 |
| |
| THIS HOST |
| |
| net: 0.0.0.0 |
| mask: 0.0.0.0 |
| IP: 46.215.0.141 |
| MAC: |
| IF: tun0 |
+----------------------------+
|
+----------------------------+
| DESTINATION HOST |
| IP: 1.1.1.1 |
| ARP: empty |
+----------------------------+
... and here is the 'new' diff.
% diff -u ./graphpath-new.sh.ORG ./graphpath-new.sh
--- ./graphpath-new.sh.ORG 2018-04-27 12:28:59.563936000 +0200
+++ ./graphpath-new.sh 2018-04-27 12:33:02.593642000 +0200
@@ -132,14 +132,10 @@
local ip=$3 # IP address for src & dst host (=direct for a router)
local gateway=$4 # IP address for a router
local gateway_arp=$5 # ARP cache if directly connected to "me" block
- local postition=$6
left=""
right=""
# There is a special case: If ip=direct, this mean this block is useless
[ "$ip" == direct ] && return 0
- # If in second family mode, need to move or add vertical line
- [ "${position}" == "left" ] && left=" | "
- [ "${position}" == "right" ] && right=" |"
# If label is "ROUTER TOWARDS DESTINATION", need to move this block to the left
#echo ${label} | grep -q "ROUTER TOWARDS DESTINATION" && left=" | "
# If label is "ROUTER TOWARDS SOURCE", need to add an vertical line to the left"
from bsdrp.
thanks, this typo is fixed, and the new output with this version seems better than the previous.
from bsdrp.
Still a problem with 'position' variable, as $6 does not exist and its not check for not existence.
% ./graphpath-new-new.sh 46.215.0.141 1.1.1.1
This tool is mainly designed for drawing router or firewall routing view
+----------------------------+
| SOURCE HOST |
| IP: 46.215.0.141 |
| ARP: empty |
+----------------------------+
|
+----------------------------+
| IF: lo0 |
| MAC: |
| IP: 127.0.0.1 |
| net: 46.215.0.141 |
| mask: 255.255.255.255 |
| |
| THIS HOST |
| |
| net: 0.0.0.0 |
| mask: 0.0.0.0 |
| IP: 46.215.0.141 |
| MAC: |
| IF: tun0 |
+----------------------------+
./graphpath-new-new.sh: 6: parameter not set
% grep position ./graphpath-new-new.sh
local position=$6
[ "${position}" == "left" ] && left=" | "
[ "${position}" == "right" ] && right=" |"
from bsdrp.
I've forgot to update arguments on one function call.
from bsdrp.
Can I close this ticket ?
from bsdrp.
If its fixed then sure, go ahead.
from bsdrp.
Related Issues (20)
- /usr/local/etc/ in wrong location in poudriere image HOT 1
- set metric does not work in route-map (argument is malformed) HOT 2
- Error while upgrading to 1.91 HOT 3
- Can't add multiple flavors of port HOT 1
- "show ip bgp neighbors json" on frr crash bgpd HOT 5
- UEFI boot support HOT 7
- FRR OSPF hello with wrong mask HOT 2
- Kernel panic with multiple BGP neighbors HOT 2
- Suggestion - Change from bgpq3 to bgpq4 on next releases HOT 1
- `config rollback` is always failed. HOT 1
- Need ISO download / No DNS? HOT 5
- 1.99 ftp-proxy issues
- 1.99 pfctl show states hangs
- upgrade failed 1.99 to 1.991 HOT 1
- Reproducible panic in jails when using multiple FIBs in host. HOT 3
- Duplicates packets with Carp and ECMP HOT 3
- After my brother Protoierey Gennadiy Zaridze fell on the router due to progressive fibrodysplasia ossificans, the system stopped working. What to do?
- BSDRP + sr-iov and bhyve ? HOT 3
- type error on:. https://bsdrp.net/features - 1Go vs 1GB HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bsdrp.