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

Fix lack macro for find_rttables_group() #2397

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

jimying
Copy link
Contributor

@jimying jimying commented Mar 29, 2024

lack macro HAVE_DECL_FRA_SUPPRESS_IFGROUP,
which is similar with get_rttables_group().

This fix build error when macro HAVE_DECL_FRA_SUPPRESS_IFGROUP=0 (on centos 7 kernel 3.10.0)

rttables.c:328:31: error: use of undeclared identifier 'rt_groups'
  328 |         return find_entry(name, id, &rt_groups, RT_GROUPS_FILE, NULL, INT32_MAX);
      |                                      ^
rttables.c:328:42: error: use of undeclared identifier 'RT_GROUPS_FILE'
  328 |         return find_entry(name, id, &rt_groups, RT_GROUPS_FILE, NULL, INT32_MAX);

lack macro HAVE_DECL_FRA_SUPPRESS_IFGROUP,
which is similar with get_rttables_group()
@pqarmitage pqarmitage merged commit db4b11d into acassen:master Mar 29, 2024
3 of 10 checks passed
@pqarmitage
Copy link
Collaborator

@jimying Many thanks for this patch, which I have now merged. There was one slight problem with it, since it would not build if SNMP support was disabled, but commit f035191 resolves that.

@jimying
Copy link
Contributor Author

jimying commented Mar 29, 2024

@pqarmitage

I copied the logic from get_rttables_group() in lib/rttables.h

#if HAVE_DECL_FRA_SUPPRESS_IFGROUP && defined _WITH_SNMP_VRRP_
extern const char *get_rttables_group(uint32_t);
#endif

is it also need modify get_rttables_group()?

@pqarmitage
Copy link
Collaborator

@jimying No, it is not needed to modify get_rttables_group(). get_rttables_group() is only used for responding to SNMP requests, whereas find_rttables_group() is used for ip rules and for vmac and ipvlan config parsing.

@jimying jimying deleted the fix-macro branch March 29, 2024 09:09
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.

None yet

2 participants