From 42cabc552d50b3dbc658b88a27b75fd6a2f7bec5 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Wed, 26 May 2021 01:49:30 +0300 Subject: ospf6d: fix interface area configuration Currently the interface area is configured from the router node using "interface IFNAME area ID" command. There are multiple problems with this command: - it is not in line with all other interface-related commands - other parameters are configured from the interface node using "ipv6 ospf6" prefix - it is not in line with OSPFv2 - area is configured from the interface node using "ip ospf area" command - most importantly, it doesn't work correctly when the interface is in a different VRF - instead of configuring the interface, it creates a new fake interface and configuring it instead To fix all the problems, this commit adds a new command to the interface configuration node - "ipv6 ospf6 area ID". The purpose of the command is completely the same, but it works correctly in a multi-VRF environment. The old command is preserved for the backward compatibility, but the warning is added that it is deprecated because it doesn't work correctly with VRFs. Signed-off-by: Igor Ryzhov --- ospf6d/ospf6_interface.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ospf6d/ospf6_interface.h') diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h index fb1b947cf8..796d75e897 100644 --- a/ospf6d/ospf6_interface.h +++ b/ospf6d/ospf6_interface.h @@ -39,6 +39,9 @@ struct ospf6_interface { /* back pointer */ struct ospf6_area *area; + uint32_t area_id; + int area_id_format; + /* list of ospf6 neighbor */ struct list *neighbor_list; @@ -177,6 +180,9 @@ extern const char *const ospf6_interface_state_str[]; /* Function Prototypes */ +extern void ospf6_interface_start(struct ospf6_interface *oi); +extern void ospf6_interface_stop(struct ospf6_interface *oi); + extern struct ospf6_interface * ospf6_interface_lookup_by_ifindex(ifindex_t, vrf_id_t vrf_id); extern struct ospf6_interface *ospf6_interface_create(struct interface *); @@ -185,7 +191,6 @@ extern void ospf6_interface_delete(struct ospf6_interface *); extern void ospf6_interface_enable(struct ospf6_interface *); extern void ospf6_interface_disable(struct ospf6_interface *); -extern void ospf6_interface_if_add(struct interface *); extern void ospf6_interface_state_update(struct interface *); extern void ospf6_interface_connected_route_update(struct interface *); extern void ospf6_interface_connected_route_add(struct connected *); -- cgit v1.2.3