summaryrefslogtreecommitdiffstats
path: root/ripngd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOPLakshman Krishnamoorthy2019-07-221-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introducing a 3rd state for route_map_apply library function: RMAP_NOOP Traditionally route map MATCH rule apis were designed to return a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH. (Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR). Depending on this response, the following statemachine decided the course of action: State1: If match cmd returns RMAP_MATCH then, keep existing behaviour. If routemap type is PERMIT, execute set cmds or call cmds if applicable, otherwise PERMIT! Else If routemap type is DENY, we DENYMATCH right away State2: If match cmd returns RMAP_NOMATCH, continue on to next route-map. If there are no other rules or if all the rules return RMAP_NOMATCH, return DENYMATCH We require a 3rd state because of the following situation: The issue - what if, the rule api needs to abort or ignore a rule?: "match evpn vni xx" route-map filter can be applied to incoming routes regardless of whether the tunnel type is vxlan or mpls. This rule should be N/A for mpls based evpn route, but applicable to only vxlan based evpn route. Also, this rule should be applicable for routes with VNI label only, and not for routes without labels. For example, type 3 and type 4 EVPN routes do not have labels, so, this match cmd should let them through. Today, the filter produces either a match or nomatch response regardless of whether it is mpls/vxlan, resulting in either permitting or denying the route.. So an mpls evpn route may get filtered out incorrectly. Eg: "route-map RM1 permit 10 ; match evpn vni 20" or "route-map RM2 deny 20 ; match vni 20" With the introduction of the 3rd state, we can abort this rule check safely. How? The rules api can now return RMAP_NOOP to indicate that it encountered an invalid check, and needs to abort just that rule, but continue with other rules. As a result we have a 3rd state: State3: If match cmd returned RMAP_NOOP Then, proceed to other route-map, otherwise if there are no more rules or if all the rules return RMAP_NOOP, then, return RMAP_PERMITMATCH. Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
* Revert "Ospf missing interface handling 2"Donald Sharp2019-06-243-16/+9
|
* Merge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2Donald Sharp2019-06-223-9/+16
|\ | | | | Ospf missing interface handling 2
| * *: change interface structure, from vrf_id to vrfPhilippe Guibert2019-06-122-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Field vrf_id is replaced by the pointer of the struct vrf *. For that all other code referencing to (interface)->vrf_id is replaced. This work should not change the behaviour. It is just a continuation work toward having an interface API handling vrf pointer only. some new generic functions are created in vrf: vrf_to_id, vrf_to_name, a zebra function is also created: zvrf_info_lookup an ospf function is also created: ospf_lookup_by_vrf it is to be noted that now that interface has a vrf pointer, some more optimisations could be thought through all the rest of the code. as example, many structure store the vrf_id. those structures could get the exact vrf structure if inherited from an interface vrf context. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * lib, bgpd, ospfd, pimd, zebra, rip, ripng, bfd: change ↵Philippe Guibert2019-06-121-1/+4
| | | | | | | | | | | | | | | | | | | | if_update_to_new_vrf() api vrf_id parameter is replaced with struct vrf * parameter. It is needed to create vrf structure before entering in the fuction. an error is generated in case the vrf parameter is missing. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * *: change if_lookup_by_name() api with vrfPhilippe Guibert2019-06-122-3/+4
| | | | | | | | | | | | | | | | | | | | 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>
* | ripngd: use MTYPE_STATICDavid Lamparter2019-06-219-75/+16
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib: use MTYPE_STATICDavid Lamparter2019-06-211-2/+4
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | ripd, ripngd: fix OpenBSD compiler warningDavid Lamparter2019-06-131-2/+2
| | | | | | | | | | | | | | The fact that the OpenBSD RB_TREE stuff results in a compiler warning on OpenBSD - and OpenBSD alone - is pretty funny, I have to say... Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: fix northbound initializer warning on OpenBSDDavid Lamparter2019-06-131-62/+124
|/ | | | | | | | For some reason, the compiler on OpenBSD on our CI boxes doesn't like struct initializers with ".a.b = x, .a.c = y", generating a warning about overwritten initializers... Signed-off-by: David Lamparter <equinox@diac24.net>
* lib,bgpd,babeld,ripngd,nhrpd,bfdd: clean up SA warningsMark Stapp2019-06-061-1/+2
| | | | | | Clean up several SA warnings. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* Revert of PR 4078 and PR 4315Lakshman Krishnamoorthy2019-06-041-19/+22
| | | | Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
* Merge pull request #4315 from lkrishnamoor/route_map_3rd_stateDonald Sharp2019-05-311-22/+19
|\ | | | | lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP
| * lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOPLakshman Krishnamoorthy2019-05-301-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introducing a 3rd state for route_map_apply library function: RMAP_NOOP Traditionally route map MATCH rule apis were designed to return a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH. (Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR). Depending on this response, the following statemachine decided the course of action: Action: Apply route-map match and return the result (RMAP_MATCH/RMAP_NOMATCH) State1: Receveived RMAP_MATCH THEN: If Routemap type is PERMIT, execute other rules if applicable, otherwise we PERMIT! Else: If Routemap type is DENY, we DENYMATCH right away State2: Received RMAP_NOMATCH, continue on to next route-map, otherwise, return DENYMATCH by default if nothing matched. With reference to PR 4078 (https://github.com/FRRouting/frr/pull/4078), we require a 3rd state because of the following situation: The issue - what if, the rule api needs to abort or ignore a rule?: "match evpn vni xx" route-map filter can be applied to incoming routes regardless of whether the tunnel type is vxlan or mpls. This rule should be N/A for mpls based evpn route, but applicable to only vxlan based evpn route. Today, the filter produces either a match or nomatch response regardless of whether it is mpls/vxlan, resulting in either permitting or denying the route.. So an mpls evpn route may get filtered out incorrectly. Eg: "route-map RM1 permit 10 ; match evpn vni 20" or "route-map RM2 deny 20 ; match vni 20" With the introduction of the 3rd state, we can abort this rule check safely. How? The rules api can now return RMAP_NOOP (or another enum) to indicate that it encountered an invalid check, and needs to abort just that rule, but continue with other rules. Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR as the 3rd state (or create a new enum like RMAP_NOOP)? RMAP_OKAY and RMAP_ERROR are used to return the result of set cmd. We chose to go with RMAP_NOOP (but open to ideas), as a way to bypass the rmap filter As a result we have a 3rd state: State3: Received RMAP_NOOP Then, proceed to other route-map, otherwise return RMAP_PERMITMATCH by default. Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
* | ripngd: strcat -> strlcatQuentin Young2019-05-291-7/+7
|/ | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* bgpd, ripd, ripngd: remove deprecated -r optionEmanuele Di Pascale2019-05-221-8/+2
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* *: use ZAPI_CALLBACK_ARGS macro for zapi handlersQuentin Young2019-05-033-31/+16
| | | | | | | | | | | | This macro: - Marks ZAPI callbacks for readability - Standardizes argument names - Makes it simple to add ZAPI arguments in the future - Ensures proper types - Looks better - Shortens function declarations Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #4162 from opensourcerouting/rip-issuesDonald Sharp2019-04-233-1/+7
|\ | | | | ripd, ripngd: fix cleaning up of offset lists
| * ripd, ripngd: fix cleaning up of offset listsRenato Westphal2019-04-193-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should never attempt to remove a list item in the "del" callback of the list. This is already performed by the list_delete() function, doing it twice leads to crashes or memory corruption. Introduce the offset_list_free() function so that we can separate the removal and deallocation of offset lists into separate functions, without code duplication. offset_list_del() will be used by the northbound callbacks to remove offset lists, while offset_list_free() will be used by rip_clean() to clean up all RIP offset lists using list_delete(). Do the same for ripngd. This is a fallout from the ripd/ripngd northbound conversion. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | lib: rework management of user pointers in the northbound layerRenato Westphal2019-04-181-32/+32
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a hash table to keep track of user pointers associated to configuration entries. The previous strategy was to embed the user pointers inside libyang data nodes, but this solution incurred a substantial performance overhead. The user pointers embedded in candidate configurations could be lost while the configuration was being edited, so they needed to be regenerated before the candidate could be committed. This was done by the nb_candidate_restore_priv_pointers() function, which was extremely expensive for large configurations. The new hash table solves this performance problem. The yang_dnode_[gs]et_entry() functions were renamed and moved from yang.[ch] to northbound.[ch], which is a more appropriate place for them. This patch also introduces the nb_running_unset_entry() function, the counterpart of nb_running_set_entry() (unsetting user pointers was done automatically before, now it needs to be done manually). As a consequence of these changes, we shouldn't need support for libyang private pointers anymore (-DENABLE_LYD_PRIV=ON). But it's probably a good idea to keep requiring this feature as we might need it in the future for other things (e.g. disable configuration settings without removing them). Fixes #4136. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #3548 from opensourcerouting/rip-vrfDonald Sharp2019-04-0514-676/+1278
|\ | | | | rip(ng)d: add VRF support
| * lib, ripd, ripngd: rename remaining delete northbound callbacksRenato Westphal2019-03-291-30/+30
| | | | | | | | | | | | | | | | | | PR #3622 renamed the "delete" northbound callback to "destroy" in order to make the libfrr headers compatible with C++. This commit renames a few functions that still use "delete" instead of "destroy" in their names. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * Merge remote-tracking branch 'frr/master' into rip-vrfRenato Westphal2019-03-299-37/+61
| |\ | | | | | | | | | | | | | | | | | | Merge commit to solve a bunch of conflicts with other PRs that were merged in the previous weeks. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripd, ripngd: change how we keep track of redistribution configurationRenato Westphal2019-01-184-43/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ripd and ripngd were leveraging the zclient code to keep track of the redistribute configuration, which is what most daemons do. The problem, however, is that the zclient code uses VRF IDs to identify VRFs, and VRF IDs are unknown until a VRF is enabled (information received from zebra). This means we can't configure a redistribute command on a RIP instance when the corresponding VRF is disabled (doing so leads to a null-dereference crash right now in both ripd and ripngd). To fix this, change the rip/ripng data structures so that they keep track of the full redistribute configuration and not only the route-map and metric associated to each command. This is similar to what bgpd and ospfd are doing to solve the same problem. In the future the zclient code and all daemons need to be refactored to consolidate the handling of redistribute configuration in a single place to reduce code duplication. One of the most important changes to do is to use VRF names and not VRF IDs to identify VRFs. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: add vrf input parameter to the "clear-ripng-route" RPCRenato Westphal2019-01-182-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description of the new parameter (adapted from the ietf-rip module): "VRF name identifying a specific RIPng instance. This leaf is optional for the rpc. If it is specified, the rpc will clear all routes in the specified RIPng instance; if it is not specified, the rpc will clear all routes in all RIPng instances."; Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: make YANG operational-data VRF aware tooRenato Westphal2019-01-182-84/+106
| | | | | | | | | | | | | | | | | | | | | Move the "state" container into the "instance" list and adapt the code accordingly. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: add VRF supportRenato Westphal2019-01-189-208/+508
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Turn the "instance" YANG presence-container into a YANG list keyed by the new "vrf" leaf. This is a backward incompatible change but this should be ok for now. * RIPng VRF instances can be configured even when the corresponding VRF doesn't exist. And a RIPng VRF instance isn't deleted when the corresponding VRF is deleted. For this to work, implement the ripng_instance_enable() and ripng_instance_disable() functions that are called to enable/disable RIPng routing instances when necessary. A RIPng routing instance can be enabled only when the corresponding VRF is enabled (this information comes from zebra and depends on the underlying VRF backend). Routing instances are stored in the new ripng_instances rb-tree (global variable). * Add a vrf pointer to the ripng structure instead of storing vrf_id only. This is much more convenient than using vrf_lookup_by_id() every time we need to get the vrf pointer from the VRF ID. The ripng->vrf pointer is updated whenever the VRF enable/disable hooks are called. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: remove the ripng global variableRenato Westphal2019-01-1811-291/+506
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the last step to make ripngd ready for multi-instance support. Remove the ripng global variable and add a "ripng" parameter to all functions that need to know the RIPng instance they are working on. On some functions, retrieve the RIPng instance from the interface variable when it exists (this assumes interfaces can pertain to one RIPng instance at most, which is ok for VRF support). In preparation for the next commits (VRF support), add a "vrd_id" member to the ripng structure, and use ripng->vrf_id instead of VRF_DEFAULT wherever possible. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: move "ripng_offset_list_master" to the ripng structureRenato Westphal2019-01-183-29/+16
| | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripdng: clear list of peers when RIPng is deconfiguredRenato Westphal2019-01-183-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is an old standing bug where the list of RIPng peers wasn't cleared after deconfiguring RIPng, which caused the existing peers to still be present on a newly configured RIPng instance (except when the timed out after ~3 minutes). Fix this. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: move "peer_list" to the ripng structureRenato Westphal2019-01-185-21/+20
| | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: move "Vripng_passive_interface" to the ripng structureRenato Westphal2019-01-183-14/+16
| | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: move "ripng_enable_network" to the ripng structureRenato Westphal2019-01-183-16/+21
| | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: move "ripng_enable_if" to the ripng structureRenato Westphal2019-01-183-20/+21
| | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: simplify cleaning up of routing instanceRenato Westphal2019-01-183-59/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Call ripng_clean() only when RIPng is configured, this way we can remove one indentation level from this function. * ripng_redistribute_clean() is only called on shutdown, so there's no need to call ripng_redistribute_withdraw() there since the RIPng table is already cleaned up elsewhere. * Deallocate the ripng structure only at the end of the function. This prepares the ground for the next commits where all global variables will be moved to the ripng structure. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripngd: fix valgrind warning about uninitialized memory usageRenato Westphal2019-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following warning when running ripngd with valgrind: ==38== Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s) ==38== at 0x5EA1E47: sendmsg (sendmsg.c:28) ==38== by 0x118C48: ripng_send_packet (ripngd.c:226) ==38== by 0x11D1D6: ripng_request (ripngd.c:1924) ==38== by 0x120BD8: ripng_interface_wakeup (ripng_interface.c:666) ==38== by 0x4ECB4B4: thread_call (thread.c:1601) ==38== by 0x4E8D9CE: frr_run (libfrr.c:1011) ==38== by 0x1121C8: main (ripng_main.c:180) ==38== Address 0xffefffc34 is on thread 1's stack ==38== in frame #1, created by ripng_send_packet (ripngd.c:172) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | ripd, ripngd: fix null pointer dereference in YANG RPCsRenato Westphal2019-01-181-0/+3
| | | | | | | | | | | | | | | | | | These RPCs should do nothing when RIP/RIPng aren't configured. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | isisd, ospf6d, ripngd: Do not allow v6 LL's to be `redist connected` inDonald Sharp2019-03-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rib process of handling routes has been unified a bit more and as a result v6 LL routes are now showing up as a result of a `redistribute connected`. Doing anything with these routes is a policy decision that should be enforced by the individual routing daemons not by zebra. As such add a bit of code to isisd, ripngd and opsf6d to handle them. The bgp daemon already handles this situation. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | *: remove trailing newlines from zlog messagesQuentin Young2019-03-141-2/+2
| |/ |/| | | | | | | | | Zlog puts its own newlines on, and doing this makes logs look nasty. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | eigrp, rip, ripng, lib: unlink if_rmap from vrfPhilippe Guibert2019-02-191-4/+7
| | | | | | | | | | | | | | | | | | an interface rmap context can be created from a custom name string, instead of a vrf. This ability permits to handle several instances of interface route map in the same vrf. The naming convention will be transparent on what the name is for in the daemon code. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | lib, rip, ripng, eigrp: rework if_rmap contextPhilippe Guibert2019-02-192-7/+28
| | | | | | | | | | | | | | | | | | | | so as to handle ri/ripng/eigrp multiple instances, the need is to encapsulate if_rmap hash table into a container context self to each instance. This work then reviews the if_rmap api, mainly by adding a if_rmap_ctx context, that is passed for each exchange between library and the daemon. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | libs, rip, isis: change northbound operation enum to DESTROYMark Stapp2019-02-111-10/+10
| | | | | | | | | | | | | | | | Change the northbound lib operation from DELETE to DESTROY; make the required changes in the users of the northbound, in the cli, rip, ripng, and isis. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | libs, daemons: changes to permit c++ compilationMark Stapp2019-02-111-10/+10
| | | | | | | | | | | | | | | | | | | | | | Some misc changes to resolve some c++ compilation errors. The goal is only to permit an external module - a plugin, for example - to see frr headers, not to support or encourage contributions in c++. The changes include: avoiding use of keywords like 'new', 'delete'; cleaning up implicit type-casting from 'void *' in several places. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | ripd,ripngd: Added changes to track route-map usage in rip,ripngrgirada2019-02-041-1/+4
| | | | | | | | | | | | | | Updated the routemap applied counter wherever route map attached/detached to a redistribution list. Signed-off-by: RajeshGirada <rgirada@vmware.com>
* | build: fix a whole bunch of *FLAGSDavid Lamparter2019-01-301-1/+1
| | | | | | | | | | | | | | | | | | - some target_CFLAGS that needed to include AM_CFLAGS didn't do so - libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all - consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@ - 2 dependencies were missing for clippy Signed-off-by: David Lamparter <equinox@diac24.net>
* | Treewide: use ANSI function definitionsRuben Kerkhof2019-01-246-9/+9
|/ | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* lib, rip, ripng, babel, eigrp: add ctx pointer to distribute apiPhilippe Guibert2018-12-282-8/+25
| | | | | | | | | | | | | | | | | | | | | | a distribute_ctx context pointer is returned after initialisation to the calling daemon. this context pointer will be further used to do discussion with distribute service. Today, there is no specific problem with old api, since the pointer is the same in all the memory process. but the pointer will be different if we have multiple instances. Right now, this is not the case, but if that happens, that work will be used for that. distribute-list initialisation is split in two. the vty initialisation is done at global level, while the context initialisation is done for each routing daemon instance. babel daemon is being equipped with a routing returning the main babel instance. also, a delete routine is available when the daemon routing instance is suppressed. a list of contexts is used inside distribute_list. This will permit distribute_list utility to handle in the same daemon to handle more than one context. This will be very useful in the vrf context. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* ripd, ripngd: fix memleaks when deleting routing instanceRenato Westphal2018-12-171-1/+1
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* build: update vtysh scan list for ripd and ripngdRenato Westphal2018-12-031-3/+0
| | | | | | | | A few files don't have any CLI commands anymore as they were moved to either rip_cli.c or ripng_cli.c. Update the ripd/ripngd vtysh_scan variable to account for this. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripngd: implement northbound callbacks to fetch route informationRenato Westphal2018-12-031-13/+47
| | | | | | | The "routes" YANG container was copied and adapted from the ietf-rip module. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>