summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_interface.c
AgeCommit message (Collapse)Author
2021-03-17ospf6d: remove interface prefix when area is removedckishimo
This bug was first reported in PR#7717. When removing an interface from the area, the interface prefix is still shown r1# sh ipv6 ospf6 interface prefix *N IA 2013:12::/64 ::1 r1-r2-eth0 00:00:12 r1# conf t r1(config)# router ospf6 r1(config-ospf6)# no interface r1-r2-eth0 area 0.0.0.0 r1(config-ospf6)# exit r1# sh ipv6 ospf6 interface prefix *N IA 2013:12::/64 ::1 r1-r2-eth0 00:00:22 This fix will check if the interface is disabled so the prefix is not shown Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-03-03ospf6d: fix setting NOAUTOCOST flagEmanuele Di Pascale
ospf6 keeps a flag to remember whether the cost for an interface was manually added via config or computed automatically, but if the configured value matches the auto-computed one we were not setting this flag, meaning that the config would not show up in the config. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-02-16Merge pull request #8051 from volta-networks/fix_ospf6_hello_loRuss White
ospf6d: Don't send hellos on loopback interface
2021-02-09ospf6d: Don't send hellos on loopback interfacelynne
When ospf6 passive is turned off on a loopback interface don't start sending ospf6 hellos. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-01-26ospf6d: Json support added for command "show ipv6 ospf6 interface prefix [json]"Yash Ranjan
Modify code to add JSON format output in show command "show ipv6 ospf6 interface prefix" with proper formating Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-01-26ospf6d: Json support added for command "show ipv6 ospf6 route [json]"Yash Ranjan
Modify code to add JSON format output in show command "show ipv6 ospf6 route [<intra-area|inter-area|external-1| external-2|X:X::X:X|X:X::X:X/M|detail|summary>]" with proper formating Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-01-26ospf6d: Track wait_timer and disable when neededDonald Sharp
When removing ospfv3 from an interface that has been previously put into wait state, there is a possible use after free of the oi because the wait_timer could have been started for the interface. This is because the wait_timer was not tracked by the interface and we just created a thread for it without storing the thread pointer. Issue: #7932 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-14ospf6d: Link LSA is not updated when router priority is modifiedMobashshera Rasool
Issue: #7727 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-11-30ospf6: get instance from route table scopeIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-18Merge pull request #7454 from ranjanyash54/dev_8Donald Sharp
ospf6d: Json support added for command "show ipv6 ospf6 interface traffic [json]"
2020-11-16ospf6d: Json support added for command "show ipv6 ospf6 interface [json]"github login name
Modify code to add JSON format output in show command "show ipv6 ospf6 interface" with proper formating Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-15ospf6d: Json support added for command "show ipv6 ospf6 interface traffic ↵github login name
[json]" Modify code to add JSON format output in show command "show ipv6 ospf6 interface traffic" with proper formating Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-04ospf6d: Json support added for command "show ipv6 ospf6 neighbor [json]"github login name
Modify code to add JSON format output in show command "show ipv6 ospf6 neighbor" with proper formating Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-03Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6Rafael Zalamena
ospf6d : Transformation changes for ospf6 vrf support.
2020-10-30ospf6d : Transformation changes for ospf6 vrf support.harios_niral
1. All the changes are related to handle ospf6 with different vrf. 2. The dependancy of global ospf6 is removed. Co-authored-by: Kaushik <kaushik@niralnetworks.com> Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-10-22:* Convert prefix2str to %pFXDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-11ospf6d, tests: Prevent use after freeDonald Sharp
The code pattern: for (ALL_LSDB(lsdb, lsa)) { remove_lsa(lsa) } has a use after free in ALL_LSDB, since we ask for the next pointer, after it has been freed. Modify the code such that we grab the next pointer before we can possibly free it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-10-08ospf6d: Move header includes around to reflect realityDonald Sharp
ospf6_network.h needs ospf6_top.h to be included first. This makes newer versions of gcc much much happier. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03ospf6d: fix SA warningMark Stapp
Fix an SA issue in ospf6_interface.c. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-01ospf6d : Preparing for ospf6d VRF support.Kaushik
1. Removed the VRF_DEFAULT dependency from ospf6d. 2. The dependency on show command still exist will be fixed when the ospf6 master is available. Co-authored-by: Harios <hari@niralnetworks.com> Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-07-14*: un-split strings across linesDavid Lamparter
Remove mid-string line breaks, cf. workflow doc: .. [#tool_style_conflicts] For example, lines over 80 characters are allowed for text strings to make it possible to search the code for them: please see `Linux kernel style (breaking long lines and strings) <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_ and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: move CLI node names to cmd_node->nameDavid Lamparter
And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: move CLI parent data to cmd_node->parent_nodeDavid Lamparter
Same as before, instead of shoving this into a big central list we can just put the parent node in cmd_node. Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: remove second parameter on install_node()David Lamparter
There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: remove cmd_node->vtyshDavid Lamparter
The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: clean up cmd_node initializersDavid Lamparter
... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-02*: generously apply constDavid Lamparter
const const const your boat, merrily down the stream... Signed-off-by: David Lamparter <equinox@diac24.net>
2019-09-30Merge pull request #5009 from donaldsharp/interface_deletionRuss White
lib, zebra: Allow for interface deletion when kernel event happens
2019-09-19*: Convert zapi->interface_delete to ifp callbackDonald Sharp
Convert the callback of the interface_delete to the new ifp callback. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19*: Convert interface_down to interface down callbackDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19*: Convert from ->interface_up to the interface callbackDonald Sharp
For all the places we have a zclient->interface_up convert them to use the interface ifp_up callback instead. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19*: Switch all zclient->interface_add to interface create callbackDonald Sharp
Switch the zclient->interface_add functionality to have everyone use the interface create callback in lib/if.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19*: Add infrastructure to support zapi interface callbacksDonald Sharp
Start the conversion to allow zapi interface callbacks to be controlled like vrf creation/destruction/change callbacks. This will allow us to consolidate control into the interface.c instead of having each daemon read the stream and react accordingly. This will hopefully reduce a bunch of cut-n-paste stuff Create 4 new callback functions that will be controlled by lib/if.c create -> A upper level protocol receives an interface creation event The ifp is brand spanking newly created in the system. up -> A upper level protocol receives a interface up event This means the interface is up and ready to go. down -> A upper level protocol receives a interface down destroy -> A upper level protocol receives a destroy event This means to delete the pointers associated with it. At this point this is just boilerplate setup for future commits. There is no new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-17ospf6d: track explicit interface type configDavid Lamparter
If the interface doesn't exist in system, we'll default to broadcast and then later not change that when the interface comes up. Explicitly track whether the user configured the type and properly auto-set it if they didn't. Fixes: #3930 Fixes: #4873 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17ospf6d: fix mistaken if_is_* instead of oi->typeDavid Lamparter
If the user configured an interface to be in a particular mode, we need to be consistent about that. No looking at if_is_pointopoint() or if_is_broadcast(). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17ospf6d: interface state needs update even w/o areaDavid Lamparter
We can't skip reading interface state if there's no area yet, we'll be missing information later when the interface is configured. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-06-23Revert "Ospf missing interface handling 2"Donald Sharp
2019-06-12*: change if_lookup_by_name() api with vrfPhilippe Guibert
the vrf_id parameter is replaced by struct vrf * parameter. this impacts most of the daemons that look for an interface based on the name and the vrf identifier. Also, it fixes 2 lookup calls in zebra and sharpd, where the vrf_id was ignored until now. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-02-25*: remove casts of XMALLOC / XCALLOCQuentin Young
No cast necessary for void * Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-14ospf6d: upon interface deletion, the area if list may be updatedPhilippe Guibert
there are some events where the list of interfaces per area should be reviewed due to an interface is being removed. This fix avoids having some memory leak. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-01-26ospf6d: fix FreeBSD IPv6 multicast group join raceRafael Zalamena
Avoid a IPv6 multicast group join race by delaying the group install before processing all event queue. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-01-23ospf6d: keep track of the socket set threadRafael Zalamena
When using the timer to set the socket multicast options, keep track of the thread pointer. If we lose the thread reference we might have situations where multicast is enabled when it should be disabled and vice versa. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-01-23ospf6d: don't queue interface eventsRafael Zalamena
Apply interface event as soon as possible instead of queueing an event for it. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-10-20ospf6d: fix two "show" commandsRenato Westphal
The "show ipv6 ospf6 interface [IFNAME] prefix" command shouldn't accept the "match" keyword when a prefix is not given, otherwise ospf6d will crash. Fixes the following crashes: ospf6d aborted: vtysh -c "show ipv6 ospf6 interface eth99 prefix match" ospf6d aborted: vtysh -c "show ipv6 ospf6 interface prefix match" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-10-02*: list_delete_and_null() -> list_delete()David Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-11*: ALLOC calls cannot failDonald Sharp
There is no need to check for failure of a ALLOC call as that any failure to do so will result in a assert happening. So we can safely remove all of this code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-15ospf6d: unchecked return value (Coverity 1221437)paco
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-04-13ospf6d: remove ospf6_interface_if_delQuentin Young
Unused and contains obvious NPD Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>