}
/* send a request to the kernel to add a FDB entry in its static MAC table. */
-int fdb_entry_configure(Link *link, FdbEntry *fdb_entry) {
+static int fdb_entry_configure(Link *link, FdbEntry *fdb_entry) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
int r;
return 1;
}
+int link_set_bridge_fdb(Link *link) {
+ FdbEntry *fdb_entry;
+ int r;
+
+ assert(link);
+ assert(link->network);
+
+ HASHMAP_FOREACH(fdb_entry, link->network->fdb_entries_by_section) {
+ r = fdb_entry_configure(link, fdb_entry);
+ if (r < 0)
+ return log_link_error_errno(link, r, "Failed to add MAC entry to static MAC table: %m");
+ }
+
+ return 0;
+}
+
/* parse the HW address from config files. */
int config_parse_fdb_hwaddr(
const char *unit,
};
FdbEntry *fdb_entry_free(FdbEntry *fdb_entry);
-int fdb_entry_configure(Link *link, FdbEntry *fdb_entry);
+
+int link_set_bridge_fdb(Link *link);
const char* fdb_ntf_flags_to_string(NeighborCacheEntryFlags i) _const_;
NeighborCacheEntryFlags fdb_ntf_flags_from_string(const char *s) _pure_;
return;
}
-static int link_set_bridge_fdb(Link *link) {
- FdbEntry *fdb_entry;
- int r;
-
- HASHMAP_FOREACH(fdb_entry, link->network->fdb_entries_by_section) {
- r = fdb_entry_configure(link, fdb_entry);
- if (r < 0)
- return log_link_error_errno(link, r, "Failed to add MAC entry to static MAC table: %m");
- }
-
- return 0;
-}
-
static int static_address_ready_callback(Address *address) {
Address *a;
Link *link;