diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-09 00:22:31 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-09 00:23:39 +0300 |
| commit | 8975bbbdd6885b8a99be4893291a82150c254452 (patch) | |
| tree | 2adaf05d9d8bfe10d5573754911ad49a49b3048d /zebra/if_netlink.c | |
| parent | b1e27fbba4d79a1ae33b9c867749e7a27dde0b75 (diff) | |
lib: set type for newly created interfaces
Currently, the ll_type is set only in `netlink_interface` which is
executed only during startup. If the interface is created when the FRR
is already running, the type is not stored.
Fixes #1164.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/if_netlink.c')
| -rw-r--r-- | zebra/if_netlink.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 15645d024d..9385418655 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -1832,6 +1832,8 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) /* Update link. */ zebra_if_update_link(ifp, link_ifindex, ns_id); + ifp->ll_type = + netlink_to_zebra_link_type(ifi->ifi_type); netlink_interface_update_hw_addr(tb, ifp); /* Inform clients, install any configured addresses. */ @@ -1899,6 +1901,8 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) /* Update link. */ zebra_if_update_link(ifp, link_ifindex, ns_id); + ifp->ll_type = + netlink_to_zebra_link_type(ifi->ifi_type); netlink_interface_update_hw_addr(tb, ifp); if (if_is_no_ptm_operative(ifp)) { |
