Skip to content

Commit

Permalink
Small bug fixes in the API
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-lopez committed Dec 14, 2015
1 parent d23bf9f commit cdaf480
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 57 deletions.
3 changes: 2 additions & 1 deletion lispd/data-plane/vpnapi/vpnapi_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "vpnapi_output.h"
#include "vpnapi.h"
#include "../data-plane.h"
#include "../../fwd_policies/fwd_policy.h"
#include "../../liblisp/liblisp.h"
#include "../../lib/packets.h"
#include "../../lib/sockets.h"
Expand Down Expand Up @@ -92,7 +93,7 @@ vpnapi_output_unicast(lbuf_t *b, packet_tuple_t *tuple)
return (BAD);
}
fe = fi->fwd_info;
if (fe->srloc && fe->drloc) {
if (fe && fe->srloc && fe->drloc) {
switch (lisp_addr_ip_afi(fe->srloc)){
case AF_INET:
fe->out_sock = &(((vpnapi_data_t *)dplane_vpnapi.datap_data)->ipv4_data_socket);
Expand Down
7 changes: 3 additions & 4 deletions lispd/lispd_api_internals.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ lmapi_xtr_mr_create(lmapi_connection_t *conn, lmapi_msg_hdr_t *hdr,
mr_list_xml = get_inner_xmlNodePtr(root_element,"map-resolvers");
mr_list_xml = get_inner_xmlNodePtr(mr_list_xml,"map-resolver");


while (mr_list_xml != NULL){

mr_addr_xml = get_inner_xmlNodePtr(mr_list_xml,"map-resolver-address");
Expand Down Expand Up @@ -582,13 +581,13 @@ lmapi_xtr_ms_create(lmapi_connection_t *conn, lmapi_msg_hdr_t *hdr,
xmlFreeDoc(doc);
doc = NULL;

/* Reprogram Map Register for local EIDs */
program_map_register(xtr);

//Everything fine. We replace the old list with the new one
glist_destroy(xtr->map_servers);
xtr->map_servers = map_servers_list;

/* Reprogram Map Register for local EIDs */
program_map_register(xtr);

LMLOG(LDBG_1, "LMAPI: List of Map Servers successfully created");
map_servers_dump(xtr, LDBG_1);

Expand Down
6 changes: 0 additions & 6 deletions netconf/lispd_api_netconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "lispd_api_netconf.h"
#include "../lispd/lib/util.h"
#include "../lispd/lib/lmlog.h"
#include "../lispd/liblisp/liblisp.h"



Expand All @@ -48,11 +47,6 @@ int ipv4_data_input_fd = 0;
int ipv6_data_input_fd = 0;
int netlink_fd = 0;

/* NAT */
int nat_aware = FALSE;
int nat_status = UNKNOWN;
nonces_list_t *nat_ir_nonce = NULL;

sockmstr_t *smaster = NULL;
lisp_ctrl_dev_t *ctrl_dev;
lisp_ctrl_t *lctrl;
Expand Down
50 changes: 4 additions & 46 deletions netconf/lispmob_Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,10 @@ CFLAGS = -g -I/usr/include/libxml2 -O3
CPPFLAGS =
LIBTOOL = $(libtool) --tag=CC --quiet

SRCS = lispsimple.c lispd_api_netconf.c ../lispd/lib/util.c ../lispd/lispd_api.c \
../lispd/control/lisp_control.c \
../lispd/control/lisp_ctrl_device.c \
../lispd/control/lisp_local_db.c \
../lispd/control/lisp_map_cache.c \
../lispd/control/lisp_xtr.c \
../lispd/control/lisp_ms.c \
../lispd/data-tun/lispd_input.c \
../lispd/data-tun/lispd_output.c \
../lispd/data-tun/lispd_tun.c \
../lispd/elibs/patricia/patricia.c \
../lispd/liblisp/liblisp.c \
../lispd/liblisp/lisp_address.c \
../lispd/liblisp/lisp_data.c \
../lispd/liblisp/lisp_ip.c \
../lispd/liblisp/lisp_lcaf.c \
../lispd/liblisp/lisp_locator.c \
../lispd/liblisp/lisp_mapping.c \
../lispd/liblisp/lisp_messages.c \
../lispd/liblisp/lisp_message_fields.c \
../lispd/liblisp/lisp_nonce.c \
../lispd/liblisp/hmac/hmac.c \
../lispd/liblisp/hmac/hmac-sha1.c \
../lispd/liblisp/hmac/hmac-sha256.c \
../lispd/lib/cksum.c \
../lispd/lib/generic_list.c \
../lispd/lib/hash.c \
../lispd/lib/hash_table.c \
../lispd/lib/iface_locators.c \
../lispd/lib/lbuf.c \
../lispd/lib/lisp_site.c \
../lispd/lib/lmlog.c \
../lispd/lib/mapping_db.c \
../lispd/lib/map_local_entry.c \
../lispd/lib/map_cache_entry.c \
../lispd/lib/routing_tables_lib.c \
../lispd/lib/packets.c \
../lispd/lib/sockets.c \
../lispd/lib/sockets-util.c \
../lispd/lib/shash.c \
../lispd/lib/timers.c \
../lispd/lib/ttable.c \
../lispd/lib/util.c \
../lispd/iface_list.c \
../lispd/iface_mgmt.c \
../lispd/lispd_api.c
SRCS = lispsimple.c lispd_api_netconf.c \
../lispd/lib/lmlog.c \
../lispd/lib/util.c \
../lispd/lispd_api.c


OBJDIR = .obj
Expand Down

0 comments on commit cdaf480

Please sign in to comment.