1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

lib-interface: Change API for interface 'options'

Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Vinit Agnihotri 2024-03-05 02:32:23 -08:00 committed by Martin Schwenke
parent 3edeb2bdce
commit c60fe03ef7
2 changed files with 5 additions and 5 deletions

View File

@ -749,15 +749,15 @@ bool interfaces_changed(void)
}
/****************************************************************************
Return True if interface exists for given interface index
Return True if interface exists for given interface index and options
**************************************************************************/
bool interface_ifindex_exists(int if_index)
bool interface_ifindex_exists_with_options(int if_index, uint32_t options)
{
struct interface *i;
struct interface *i = NULL;
for (i = local_interfaces; i != NULL; i = i->next) {
if (i->if_index == if_index) {
if ((i->if_index == if_index) && (i->options & options)) {
return true;
}
}

View File

@ -45,6 +45,6 @@ bool iface_local(const struct sockaddr *ip);
void load_interfaces(void);
void gfree_interfaces(void);
bool interfaces_changed(void);
bool interface_ifindex_exists(int if_index);
bool interface_ifindex_exists_with_options(int if_index, uint32_t options);
#endif /* _INTERFACE_H */