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

Distribute vrf aware #3246

Merged
merged 2 commits into from
Jan 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
lib: enforce vrf_name_to_id by returning default_vrf when name is null
in order to enforce the vrf_id to return, from a vrf name, a check is
done on the vrf_name_to_id callback.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
  • Loading branch information
pguibert6WIND committed Dec 28, 2018
commit 2569910bb6e5c00ececc60ed15b182e14a88cb9d
2 changes: 2 additions & 0 deletions lib/vrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ vrf_id_t vrf_name_to_id(const char *name)
vrf_id_t vrf_id = VRF_DEFAULT; // Pending: need a way to return invalid
// id/ routine not used.

if (!name)
return vrf_id;
vrf = vrf_lookup_by_name(name);
if (vrf)
vrf_id = vrf->vrf_id;
Expand Down