mirror of
https://github.com/bgp/bgpq4.git
synced 2024-05-11 05:55:05 +00:00
Resolve merge conflict
This commit is contained in:
@ -3,7 +3,8 @@ bin_PROGRAMS=bgpq4
|
||||
bgpq4_SOURCES=bgpq4.c sx_report.c bgpq_expander.c sx_slentry.c \
|
||||
bgpq4_printer.c sx_prefix.c strlcpy.c sx_maxsockbuf.c \
|
||||
bgpq4.h config.h sx_maxsockbuf.h sx_prefix.h \
|
||||
sx_report.h sx_slentry.h sys_queue.h sys_tree.h
|
||||
sx_report.h sx_slentry.h sys_queue.h sys_tree.h \
|
||||
expander_freeall.c
|
||||
dist_doc_DATA=bgpq4.html
|
||||
dist_man8_MANS=bgpq4.8
|
||||
EXTRA_DIST=bootstrap readme.header README.md CHANGES COPYRIGHT bgpq4.spec
|
||||
|
@ -1358,26 +1358,26 @@ bgpq4_print_kprefix(struct sx_radix_node* n, void* ff)
|
||||
FILE* f=(FILE*)ff;
|
||||
if(!f) f=stdout;
|
||||
if(n->isGlue) goto checkSon;
|
||||
sx_prefix_snprintf_sep(&n->prefix,prefix,sizeof(prefix),"/");
|
||||
sx_prefix_snprintf_sep(n->prefix,prefix,sizeof(prefix),"/");
|
||||
if(n->isAggregate) {
|
||||
if(n->aggregateLow>n->prefix.masklen) {
|
||||
if(n->aggregateLow>n->prefix->masklen) {
|
||||
fprintf(f,"/routing filter add action=accept chain=\"%s-%s\" prefix=%s prefix-length=%d-%d\n",
|
||||
bname?bname:"NN",
|
||||
n->prefix.family==AF_INET?"V4":"V6",
|
||||
n->prefix->family==AF_INET?"V4":"V6",
|
||||
prefix,
|
||||
n->aggregateLow,
|
||||
n->aggregateHi);
|
||||
} else {
|
||||
fprintf(f,"/routing filter add action=accept chain=\"%s-%s\" prefix=%s prefix-length=%d\n",
|
||||
bname?bname:"NN",
|
||||
n->prefix.family==AF_INET?"V4":"V6",
|
||||
n->prefix->family==AF_INET?"V4":"V6",
|
||||
prefix,
|
||||
n->aggregateHi);
|
||||
};
|
||||
} else {
|
||||
fprintf(f,"/routing filter add action=accept chain=\"%s-%s\" prefix=%s\n",
|
||||
bname?bname:"NN",
|
||||
n->prefix.family==AF_INET?"V4":"V6",
|
||||
n->prefix->family==AF_INET?"V4":"V6",
|
||||
prefix);
|
||||
};
|
||||
checkSon:
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#include <bgpq3.h>
|
||||
#include <bgpq4.h>
|
||||
|
||||
void sx_radix_node_freeall(struct sx_radix_node *n) {
|
||||
if (n->l != NULL) {
|
||||
@ -33,7 +33,7 @@ void bgpq_prequest_freeall(struct bgpq_prequest *bpr) {
|
||||
|
||||
void expander_freeall(struct bgpq_expander *expander) {
|
||||
|
||||
printf("starting to free all\n");
|
||||
// printf("starting to free all\n");
|
||||
// seg fault here
|
||||
// if (expander->sources != NULL) {
|
||||
// printf("freeing soruces\n");
|
||||
@ -43,7 +43,7 @@ void expander_freeall(struct bgpq_expander *expander) {
|
||||
// printf("freeing name\n");
|
||||
// free(expander->name);
|
||||
//}
|
||||
printf("freeing asn32s\n");
|
||||
// printf("freeing asn32s\n");
|
||||
for (int i = 0; i < 65536; i++) {
|
||||
if (expander->asn32s[i] != NULL) {
|
||||
free(expander->asn32s[i]);
|
||||
@ -70,7 +70,7 @@ void expander_freeall(struct bgpq_expander *expander) {
|
||||
|
||||
bgpq_prequest_freeall(expander->firstpipe);
|
||||
bgpq_prequest_freeall(expander->lastpipe);
|
||||
printf("finished freeing all\n");
|
||||
// printf("finished freeing all\n");
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user