Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified dummy_interface struct to add prefixlen along with Address #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mj073
Copy link

@mj073 mj073 commented Feb 1, 2018

Fix for #30
After the fix following is the result when dummy interface is added:

mahesh@invader28:~$ sudo goes vnet show ip fib
 Table                   Destination                               Adjacency
     default                   10.0.4.0/24       3: glean eth-4-1
     default                  10.0.4.28/32       4: local eth-4-1
     default                   10.0.6.0/24       5: glean eth-6-1
     default                  10.0.6.28/32       6: local eth-6-1
     default                   10.0.8.0/24       7: glean eth-8-1
     default                  10.0.8.28/32       8: local eth-8-1
     default                  10.0.10.0/24       9: glean eth-10-1
     default                 10.0.10.28/32      10: local eth-10-1
     default                  10.0.12.0/24      11: glean eth-12-1
     default                 10.0.12.28/32      12: local eth-12-1
     default                  10.0.14.0/24      13: glean eth-14-1
     default                 10.0.14.28/32      14: local eth-14-1
     default                  10.0.16.0/24      15: glean eth-16-1
     default                 10.0.16.28/32      16: local eth-16-1
     default                  10.0.18.0/24      17: glean eth-18-1
     default                 10.0.18.28/32      18: local eth-18-1
     default                  10.0.20.0/24      19: glean eth-20-1
     default                 10.0.20.28/32      20: local eth-20-1
     default                  10.0.22.0/24      21: glean eth-22-1
     default                 10.0.22.28/32      22: local eth-22-1
     default                  10.0.24.0/24      23: glean eth-24-1
     default                 10.0.24.28/32      24: local eth-24-1
     default                  10.0.26.0/24      25: glean eth-26-1
     default                 10.0.26.28/32      26: local eth-26-1
     default                  10.0.28.0/24      27: glean eth-28-1
     default                 10.0.28.28/32      28: local eth-28-1
     default                  10.0.30.0/24      29: glean eth-30-1
     default                 10.0.30.28/32      30: local eth-30-1
     default                  10.0.32.0/24      31: glean eth-32-1
     default                 10.0.32.28/32      32: local eth-32-1
mahesh@invader28:~$
mahesh@invader28:~$ sudo ip addr show dummy0
Device "dummy0" does not exist.
mahesh@invader28:~$ sudo ip link add dummy0 type dummy
mahesh@invader28:~$ sudo ip add add 3.3.3.3/24 dev dummy0
mahesh@invader28:~$ sudo ip addr show dummy0
28751: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 76:6c:05:0c:9e:82 brd ff:ff:ff:ff:ff:ff
    inet 3.3.3.3/24 scope global dummy0
       valid_lft forever preferred_lft forever
mahesh@invader28:~$ sudo goes vnet show ip fib
 Table                   Destination                               Adjacency
     default                   10.0.4.0/24       3: glean eth-4-1
     default                  10.0.4.28/32       4: local eth-4-1
     default                   10.0.6.0/24       5: glean eth-6-1
     default                  10.0.6.28/32       6: local eth-6-1
     default                   10.0.8.0/24       7: glean eth-8-1
     default                  10.0.8.28/32       8: local eth-8-1
     default                  10.0.10.0/24       9: glean eth-10-1
     default                 10.0.10.28/32      10: local eth-10-1
     default                  10.0.12.0/24      11: glean eth-12-1
     default                 10.0.12.28/32      12: local eth-12-1
     default                  10.0.14.0/24      13: glean eth-14-1
     default                 10.0.14.28/32      14: local eth-14-1
     default                  10.0.16.0/24      15: glean eth-16-1
     default                 10.0.16.28/32      16: local eth-16-1
     default                  10.0.18.0/24      17: glean eth-18-1
     default                 10.0.18.28/32      18: local eth-18-1
     default                  10.0.20.0/24      19: glean eth-20-1
     default                 10.0.20.28/32      20: local eth-20-1
     default                  10.0.22.0/24      21: glean eth-22-1
     default                 10.0.22.28/32      22: local eth-22-1
     default                  10.0.24.0/24      23: glean eth-24-1
     default                 10.0.24.28/32      24: local eth-24-1
     default                  10.0.26.0/24      25: glean eth-26-1
     default                 10.0.26.28/32      26: local eth-26-1
     default                  10.0.28.0/24      27: glean eth-28-1
     default                 10.0.28.28/32      28: local eth-28-1
     default                  10.0.30.0/24      29: glean eth-30-1
     default                 10.0.30.28/32      30: local eth-30-1
     default                  10.0.32.0/24      31: glean eth-32-1
     default                 10.0.32.28/32      32: local eth-32-1
mahesh@invader28:~$ sudo ip link set dummy0 up
mahesh@invader28:~$ sudo goes vnet show ip fib
 Table                   Destination                               Adjacency
     default                    3.3.3.0/24       2: punt
     default                    3.3.3.3/32       2: punt
     default                   10.0.4.0/24       3: glean eth-4-1
     default                  10.0.4.28/32       4: local eth-4-1
     default                   10.0.6.0/24       5: glean eth-6-1
     default                  10.0.6.28/32       6: local eth-6-1
     default                   10.0.8.0/24       7: glean eth-8-1
     default                  10.0.8.28/32       8: local eth-8-1
     default                  10.0.10.0/24       9: glean eth-10-1
     default                 10.0.10.28/32      10: local eth-10-1
     default                  10.0.12.0/24      11: glean eth-12-1
     default                 10.0.12.28/32      12: local eth-12-1
     default                  10.0.14.0/24      13: glean eth-14-1
     default                 10.0.14.28/32      14: local eth-14-1
     default                  10.0.16.0/24      15: glean eth-16-1
     default                 10.0.16.28/32      16: local eth-16-1
     default                  10.0.18.0/24      17: glean eth-18-1
     default                 10.0.18.28/32      18: local eth-18-1
     default                  10.0.20.0/24      19: glean eth-20-1
     default                 10.0.20.28/32      20: local eth-20-1
     default                  10.0.22.0/24      21: glean eth-22-1
     default                 10.0.22.28/32      22: local eth-22-1
     default                  10.0.24.0/24      23: glean eth-24-1
     default                 10.0.24.28/32      24: local eth-24-1
     default                  10.0.26.0/24      25: glean eth-26-1
     default                 10.0.26.28/32      26: local eth-26-1
     default                  10.0.28.0/24      27: glean eth-28-1
     default                 10.0.28.28/32      28: local eth-28-1
     default                  10.0.30.0/24      29: glean eth-30-1
     default                 10.0.30.28/32      30: local eth-30-1
     default                  10.0.32.0/24      31: glean eth-32-1
     default                 10.0.32.28/32      32: local eth-32-1
mahesh@invader28:~$ sudo ip link set dummy0 down
mahesh@invader28:~$ sudo goes vnet show ip fib
 Table                   Destination                               Adjacency
     default                   10.0.4.0/24       3: glean eth-4-1
     default                  10.0.4.28/32       4: local eth-4-1
     default                   10.0.6.0/24       5: glean eth-6-1
     default                  10.0.6.28/32       6: local eth-6-1
     default                   10.0.8.0/24       7: glean eth-8-1
     default                  10.0.8.28/32       8: local eth-8-1
     default                  10.0.10.0/24       9: glean eth-10-1
     default                 10.0.10.28/32      10: local eth-10-1
     default                  10.0.12.0/24      11: glean eth-12-1
     default                 10.0.12.28/32      12: local eth-12-1
     default                  10.0.14.0/24      13: glean eth-14-1
     default                 10.0.14.28/32      14: local eth-14-1
     default                  10.0.16.0/24      15: glean eth-16-1
     default                 10.0.16.28/32      16: local eth-16-1
     default                  10.0.18.0/24      17: glean eth-18-1
     default                 10.0.18.28/32      18: local eth-18-1
     default                  10.0.20.0/24      19: glean eth-20-1
     default                 10.0.20.28/32      20: local eth-20-1
     default                  10.0.22.0/24      21: glean eth-22-1
     default                 10.0.22.28/32      22: local eth-22-1
     default                  10.0.24.0/24      23: glean eth-24-1
     default                 10.0.24.28/32      24: local eth-24-1
     default                  10.0.26.0/24      25: glean eth-26-1
     default                 10.0.26.28/32      26: local eth-26-1
     default                  10.0.28.0/24      27: glean eth-28-1
     default                 10.0.28.28/32      28: local eth-28-1
     default                  10.0.30.0/24      29: glean eth-30-1
     default                 10.0.30.28/32      30: local eth-30-1
     default                  10.0.32.0/24      31: glean eth-32-1
     default                 10.0.32.28/32      32: local eth-32-1
mahesh@invader28:~$ sudo ip link set dummy0 up
mahesh@invader28:~$ sudo goes vnet show ip fib
 Table                   Destination                               Adjacency
     default                    3.3.3.0/24       2: punt
     default                    3.3.3.3/32       2: punt
     default                   10.0.4.0/24       3: glean eth-4-1
     default                  10.0.4.28/32       4: local eth-4-1
     default                   10.0.6.0/24       5: glean eth-6-1
     default                  10.0.6.28/32       6: local eth-6-1
     default                   10.0.8.0/24       7: glean eth-8-1
     default                  10.0.8.28/32       8: local eth-8-1
     default                  10.0.10.0/24       9: glean eth-10-1
     default                 10.0.10.28/32      10: local eth-10-1
     default                  10.0.12.0/24      11: glean eth-12-1
     default                 10.0.12.28/32      12: local eth-12-1
     default                  10.0.14.0/24      13: glean eth-14-1
     default                 10.0.14.28/32      14: local eth-14-1
     default                  10.0.16.0/24      15: glean eth-16-1
     default                 10.0.16.28/32      16: local eth-16-1
     default                  10.0.18.0/24      17: glean eth-18-1
     default                 10.0.18.28/32      18: local eth-18-1
     default                  10.0.20.0/24      19: glean eth-20-1
     default                 10.0.20.28/32      20: local eth-20-1
     default                  10.0.22.0/24      21: glean eth-22-1
     default                 10.0.22.28/32      22: local eth-22-1
     default                  10.0.24.0/24      23: glean eth-24-1
     default                 10.0.24.28/32      24: local eth-24-1
     default                  10.0.26.0/24      25: glean eth-26-1
     default                 10.0.26.28/32      26: local eth-26-1
     default                  10.0.28.0/24      27: glean eth-28-1
     default                 10.0.28.28/32      28: local eth-28-1
     default                  10.0.30.0/24      29: glean eth-30-1
     default                 10.0.30.28/32      30: local eth-30-1
     default                  10.0.32.0/24      31: glean eth-32-1
     default                 10.0.32.28/32      32: local eth-32-1
mahesh@invader28:~$ sudo goes restart
mahesh@invader28:~$ sudo goes vnet show ip fib
 Table                   Destination                               Adjacency
     default                    3.3.3.0/24       2: punt
     default                    3.3.3.3/32       2: punt
     default                   10.0.4.0/24       3: glean eth-4-1
     default                  10.0.4.28/32       4: local eth-4-1
     default                   10.0.6.0/24       5: glean eth-6-1
     default                  10.0.6.28/32       6: local eth-6-1
     default                   10.0.8.0/24       7: glean eth-8-1
     default                  10.0.8.28/32       8: local eth-8-1
     default                  10.0.10.0/24       9: glean eth-10-1
     default                 10.0.10.28/32      10: local eth-10-1
     default                  10.0.12.0/24      11: glean eth-12-1
     default                 10.0.12.28/32      12: local eth-12-1
     default                  10.0.14.0/24      13: glean eth-14-1
     default                 10.0.14.28/32      14: local eth-14-1
     default                  10.0.16.0/24      15: glean eth-16-1
     default                 10.0.16.28/32      16: local eth-16-1
     default                  10.0.18.0/24      17: glean eth-18-1
     default                 10.0.18.28/32      18: local eth-18-1
     default                  10.0.20.0/24      19: glean eth-20-1
     default                 10.0.20.28/32      20: local eth-20-1
     default                  10.0.22.0/24      21: glean eth-22-1
     default                 10.0.22.28/32      22: local eth-22-1
     default                  10.0.24.0/24      23: glean eth-24-1
     default                 10.0.24.28/32      24: local eth-24-1
     default                  10.0.26.0/24      25: glean eth-26-1
     default                 10.0.26.28/32      26: local eth-26-1
     default                  10.0.28.0/24      27: glean eth-28-1
     default                 10.0.28.28/32      28: local eth-28-1
     default                  10.0.30.0/24      29: glean eth-30-1
     default                 10.0.30.28/32      30: local eth-30-1
     default                  10.0.32.0/24      31: glean eth-32-1
     default                 10.0.32.28/32      32: local eth-32-1
mahesh@invader28:~$ sudo ip add add 5.5.5.5/16 dev dummy0
mahesh@invader28:~$ sudo goes vnet show ip fib
 Table                   Destination                               Adjacency
     default                    3.3.3.0/24       2: punt
     default                    3.3.3.3/32       2: punt
     default                    5.5.0.0/16       2: punt
     default                    5.5.5.5/32       2: punt
     default                   10.0.4.0/24       3: glean eth-4-1
     default                  10.0.4.28/32       4: local eth-4-1
     default                   10.0.6.0/24       5: glean eth-6-1
     default                  10.0.6.28/32       6: local eth-6-1
     default                   10.0.8.0/24       7: glean eth-8-1
     default                  10.0.8.28/32       8: local eth-8-1
     default                  10.0.10.0/24       9: glean eth-10-1
     default                 10.0.10.28/32      10: local eth-10-1
     default                  10.0.12.0/24      11: glean eth-12-1
     default                 10.0.12.28/32      12: local eth-12-1
     default                  10.0.14.0/24      13: glean eth-14-1
     default                 10.0.14.28/32      14: local eth-14-1
     default                  10.0.16.0/24      15: glean eth-16-1
     default                 10.0.16.28/32      16: local eth-16-1
     default                  10.0.18.0/24      17: glean eth-18-1
     default                 10.0.18.28/32      18: local eth-18-1
     default                  10.0.20.0/24      19: glean eth-20-1
     default                 10.0.20.28/32      20: local eth-20-1
     default                  10.0.22.0/24      21: glean eth-22-1
     default                 10.0.22.28/32      22: local eth-22-1
     default                  10.0.24.0/24      23: glean eth-24-1
     default                 10.0.24.28/32      24: local eth-24-1
     default                  10.0.26.0/24      25: glean eth-26-1
     default                 10.0.26.28/32      26: local eth-26-1
     default                  10.0.28.0/24      27: glean eth-28-1
     default                 10.0.28.28/32      28: local eth-28-1
     default                  10.0.30.0/24      29: glean eth-30-1
     default                 10.0.30.28/32      30: local eth-30-1
     default                  10.0.32.0/24      31: glean eth-32-1
     default                 10.0.32.28/32      32: local eth-32-1
mahesh@invader28:~$

@fszyang

@stigt
Copy link
Collaborator

stigt commented Feb 1, 2018 via email

@mj073
Copy link
Author

mj073 commented Feb 2, 2018

I have created this pull request with the Fix for issue #30.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants