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

Issue 1968 defaultvrfonly #2042

Closed

Conversation

pguibert6WIND
Copy link
Member

This permits configuring static routes per table identifier.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-3255/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


Warnings Generated during build:

Checkout code: Successful with additional warnings:

Report for zebra_static.c
===============================================
< WARNING: line over 80 characters
< #161: FILE: /tmp/f1-544/zebra_static.c:161:
< +			re->table = zebra_vrf_lookup_by_id(si->vrf_id)->table_id;
< 

CLANG Static Analyzer Summary

  • Github Pull Request 2042, comparing to Git base SHA 8227cf9

No Changes in Static Analysis warnings compared to base

20 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-3255/artifact/shared/static_analysis/index.html

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 9, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/2042 d7cd097
Date 04/09/2018
Start 06:41:53
Finish 07:04:54
Run-Time 23:01
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-04-09-06:41:53.txt
Log autoscript-2018-04-09-06:42:41.log.bz2

For details, please contact louberger

@pguibert6WIND pguibert6WIND force-pushed the issue_1968_defaultvrfonly branch from d7cd097 to 9266916 Compare April 9, 2018 13:06
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-3259/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


CLANG Static Analyzer Summary

  • Github Pull Request 2042, comparing to Git base SHA 8227cf9

No Changes in Static Analysis warnings compared to base

20 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-3259/artifact/shared/static_analysis/index.html

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 9, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/2042 9266916
Date 04/09/2018
Start 09:33:28
Finish 09:56:26
Run-Time 22:58
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-04-09-09:33:28.txt
Log autoscript-2018-04-09-09:34:15.log.bz2

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 12, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/2042 e407804
Date 04/12/2018
Start 05:20:21
Finish 05:43:18
Run-Time 22:57
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-04-12-05:20:21.txt
Log autoscript-2018-04-12-05:21:09.log.bz2

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-3299/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


CLANG Static Analyzer Summary

  • Github Pull Request 2042, comparing to Git base SHA 0b98482

No Changes in Static Analysis warnings compared to base

20 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-3299/artifact/shared/static_analysis/index.html

}

if (vrf_is_user_cfged(vrf)) {
} else if (vrf_is_user_cfged(vrf)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the wrong fix. We should use the vty_frame() code to display vrf config information.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Donald,

the issue is related to default routing table.
please tell me if I am wrong.
I am on VRF netns mode.
if I configure a static route on default VRF, then I should not see default VRF table appear.
I expect static route be on configure terminal.
Actually this is not the case.

#configure terminal
ip route 5.5.5.0/24 tun1
#
#show running-config
...
vrf Default-IP-Routing-Table
ip route 5.5.5.0/24 tun1
!
...

I don't see the point here with vty_frame().
Unless I did not understand how to solve the issue, please refine.
Thanks,
Cheers,Philippe

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pguibert6WIND, Donald (and I) agree with you that it should not show the default VRF. If I understand Donald correctly, he is saying that your approach to fixing this is not ideal (again I agree). We have facilities in lib/vty.c for this exact scenario that allow you to enter a "config frame" by calling vty_frame(). You exit the frame by calling vty_endframe(). Any calls to vty_out() are cached in that frame between entry and exit. If you ended up not calling vty_out() at all, then that entire frame is destroyed and nothing is output (including the very first line that you started the frame with).

Incidentally, I have touched this code to use vty_frame() in an unrelated but overlapping PR:
#2079

Ergo you can just revert this part of the patch.

@pguibert6WIND pguibert6WIND force-pushed the issue_1968_defaultvrfonly branch from e407804 to dbac81e Compare April 17, 2018 09:55
Add the table keyword for all ip route/ip mroute/ipv6 route commands
that are available. Also, the main structure is being added a table
identifier.

Signed-off-by: Philippe Guibert <[email protected]>
In the case where vrf backend is netns, then the list of ns tables may
be extended. A single list is kept,but an attribute is added: the ns_id.

Signed-off-by: Philippe Guibert <[email protected]>
when configuring a route on default vrf, the show running displays
default vrf subnode. Instead, if it is the default vrf that is used,
then the vrf subnode is not displayed.

Signed-off-by: Philippe Guibert <[email protected]>
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-3341/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


CLANG Static Analyzer Summary

  • Github Pull Request 2042, comparing to Git base SHA 673c2b7

No Changes in Static Analysis warnings compared to base

6 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-3341/artifact/shared/static_analysis/index.html

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 17, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/2042 dbac81e
Date 04/17/2018
Start 06:46:20
Finish 07:09:12
Run-Time 22:52
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-04-17-06:46:20.txt
Log autoscript-2018-04-17-06:47:08.log.bz2

For details, please contact louberger

re->table = zebra_vrf_lookup_by_id(si->vrf_id)
->table_id;
else if (si->table_id) /* case default VRF, table used
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this comment on its own line above the else, or move the terminating */ onto the same line as /*.

*/
re->table = si->table_id;
else /* case default VRF, default table
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

}

if (vrf_is_user_cfged(vrf)) {
} else if (vrf_is_user_cfged(vrf)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pguibert6WIND, Donald (and I) agree with you that it should not show the default VRF. If I understand Donald correctly, he is saying that your approach to fixing this is not ideal (again I agree). We have facilities in lib/vty.c for this exact scenario that allow you to enter a "config frame" by calling vty_frame(). You exit the frame by calling vty_endframe(). Any calls to vty_out() are cached in that frame between entry and exit. If you ended up not calling vty_out() at all, then that entire frame is destroyed and nothing is output (including the very first line that you started the frame with).

Incidentally, I have touched this code to use vty_frame() in an unrelated but overlapping PR:
#2079

Ergo you can just revert this part of the patch.

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.

5 participants