Commit 0c6dfe52 authored by Jan Moskyto Matejka's avatar Jan Moskyto Matejka

Merge branch 'int-new' into int-new-merged

parents 7a7ac656 92912f06
D doc/prog-head.sgml
C doc
C nest
C conf
......@@ -5,3 +6,4 @@ C filter
C proto
C sysdep
C lib
D doc/prog-foot.sgml
# Makefile for the BIRD Internet Routing Daemon
# (c) 1999--2000 Martin Mares <mj@ucw.cz>
# (c) 2016 Jan Moskyto Matejka <mq@ucw.cz>
# Disable build-in rules
MAKEFLAGS += -r
# Variable definitions
CPPFLAGS=-I$(objdir) -I$(srcdir) @CPPFLAGS@
CFLAGS=$(CPPFLAGS) @CFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
CLIENT_LIBS=@CLIENT_LIBS@
CC=@CC@
M4=@M4@
BISON=@BISON@
FLEX=@FLEX@
RANLIB=@RANLIB@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
client=$(addprefix $(exedir)/,@CLIENT@)
daemon=$(exedir)/bird
protocols = @protocols@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
sysconfdir=@sysconfdir@
localstatedir=@localstatedir@
docdir=@prefix@/doc
srcdir := @srcdir@
objdir := @objdir@
exedir := @exedir@
ifeq ($(objdir),.)
objdir := $(realpath .)
endif
ifeq ($(VERBOSE),)
Q:=@
else
Q:=
endif
# Meta rules
cleangoals := clean distclean
docgoals := docs userdocs progdocs
.PHONY: all daemon cli $(cleangoals) $(docgoals) tags
all: daemon cli
daemon: $(daemon)
cli: $(client)
# Include directories
dirs := client conf doc filter lib nest $(addprefix proto/,$(protocols)) @sysdep_dirs@
conf-y-targets := $(addprefix $(objdir)/conf/,cf-parse.y keywords.h commands.h)
cf-local = $(conf-y-targets): $(s)config.Y
src-o-files = $(patsubst %.c,$(o)%.o,$(src))
all-daemon = $(exedir)/bird: $(obj)
all-client = $(exedir)/birdc $(exedir)/birdcl: $(obj)
s = $(dir $(lastword $(MAKEFILE_LIST)))
ifeq ($(srcdir),.)
o = $(objdir)/$(s)
else
o = $(patsubst $(srcdir)%,$(objdir)%,$(s))
endif
define clean_in =
clean::
rm -f $(addprefix $(o),$(1))
endef
clean = $(eval $(call clean_in,$(1)))
include $(addsuffix /Makefile,$(addprefix $(srcdir)/,$(dirs)))
# Generic rules
$(objdir)/%.o: $(srcdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h
$(Q)echo CC -o $@ -c $<
$(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
$(objdir)/%.o: $(objdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h
$(Q)echo CC -o $@ -c $<
$(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
$(objdir)/.dir-stamp:
$(Q)echo MKDIR -p $(addprefix $(objdir)/,$(dirs) doc)
$(Q)mkdir -p $(addprefix $(objdir)/,$(dirs) doc)
$(Q)touch $@
$(client) $(daemon):
$(Q)echo LD $(LDFLAGS) -o $@ $^ $(LIBS)
$(Q)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
$(objdir)/sysdep/paths.h: Makefile
echo >$@ "/* Generated by Makefile, don't edit manually! */"
echo >>$@ "#define PATH_CONFIG_FILE \"@CONFIG_FILE@\""
echo >>$@ "#define PATH_CONTROL_SOCKET \"@CONTROL_SOCKET@\""
if test -n "@iproutedir@" ; then echo >>$@ "#define PATH_IPROUTE_DIR \"@iproutedir@\"" ; fi
# Finally include the computed dependencies
ifneq ($(filter-out $(cleangoals),$(MAKECMDGOALS)),)
-include $(shell find $(objdir) -name "*.d")
endif
ifeq ($(MAKECMDGOALS),)
-include $(shell find $(objdir) -name "*.d")
endif
tags:
cd $(srcdir) ; etags -lc `find $(dirs) -name *.[chY]`
# Install
install: all
$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@
$(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/bird
$(INSTALL_PROGRAM) $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl
if test -n "@CLIENT@" ; then \
$(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc ; \
fi
if ! test -f $(DESTDIR)/@CONFIG_FILE@ ; then \
$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/@CONFIG_FILE@ ; \
else \
echo "Not overwriting old bird.conf" ; \
fi
install-docs:
$(INSTALL) -d $(DESTDIR)/$(docdir)
$(INSTALL_DATA) $(objdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
# Cleanup
clean::
rm -f $(objdir)/sysdep/paths.h
rm -f $(addprefix $(exedir)/,bird birdc birdcl)
find $(objdir) -name "*.[od]" -exec rm -f '{}' '+'
ifeq ($(objdir),obj)
distclean: clean
rm -rf $(objdir)
rm -f config.log config.status configure Makefile
else
distclean: clean
rm -rf * .dir-stamp
rm -f config.log config.status configure Makefile
endif
source=commands.c util.c client.c
root-rel=../
dir-name=client
src := commands.c util.c client.c
obj := $(src-o-files)
clients := $(client) birdcl
$(all-client)
source-dep := $(source) $(addsuffix .c,$(clients))
$(o)commands.c.dep: $(objdir)/conf/commands.h
subdir: $(addsuffix .o,$(clients))
$(exedir)/birdc: $(o)birdc.o
$(exedir)/birdc: LIBS += $(CLIENT_LIBS)
include ../Rules
$(exedir)/birdcl: $(o)birdcl.o
source=cf-parse.tab.c cf-lex.c conf.c
root-rel=../
src := cf-parse.tab.c cf-lex.c conf.c
obj := $(src-o-files)
include ../Rules
conf-src=$(srcdir)/conf
conf-fragments=$(conf-src)/confbase.Y @CONFS@ $(addsuffix /config.Y,$(static-dir-paths))
$(all-daemon)
ifdef DEBUG
BISON_DEBUG=-t
#FLEX_DEBUG=-d
endif
cf-parse.tab.h: cf-parse.tab.c
$(o)cf-parse.tab.h: $(o)cf-parse.tab.c
cf-parse.tab.c: cf-parse.y
$(BISON) -bcf-parse -dv -pcf_ $(BISON_DEBUG) cf-parse.y
$(o)cf-parse.tab.c: $(o)cf-parse.y
echo $< $@ $(o)
$(BISON) -b$(@:.tab.c=) -dv -pcf_ $(BISON_DEBUG) $<
cf-parse.y: $(conf-fragments) $(conf-src)/gen_parser.m4
$(M4) -P $(conf-src)/gen_parser.m4 $(conf-fragments) >cf-parse.y
$(conf-y-targets): $(s)confbase.Y
$(M4) -P $| $^ >$@
keywords.h: $(conf-fragments) $(conf-src)/gen_keywords.m4
$(M4) -P $(conf-src)/gen_keywords.m4 $(conf-fragments) >keywords.h
$(o)cf-parse.y: | $(s)gen_parser.m4
$(o)keywords.h: | $(s)gen_keywords.m4
$(o)commands.h: | $(s)gen_commands.m4 $(srcdir)/client/cmds.m4
commands.h: $(conf-fragments) $(conf-src)/gen_commands.m4 $(srcdir)/client/cmds.m4
$(M4) -P $(conf-src)/gen_commands.m4 $(srcdir)/client/cmds.m4 $(conf-fragments) | sort >commands.h
$(o)cf-lex.c: $(s)cf-lex.l $(o)cf-parse.tab.h $(o)keywords.h $(o)commands.h
$(FLEX) $(FLEX_DEBUG) -s -B -8 -o$@ -Pcf_ $<
cf-lex.c: cf-lex.l
$(FLEX) $(FLEX_DEBUG) -s -B -8 -ocf-lex.c -Pcf_ cf-lex.l
$(addprefix $(o),cf-parse.tab.h cf-parse.tab.c cf-parse.y keywords.h commands.h cf-lex.c): $(objdir)/.dir-stamp
depend: keywords.h commands.h cf-parse.tab.c cf-lex.c
$(call clean,cf-parse.tab.h cf-parse.tab.c cf-parse.y keywords.h commands.h cf-lex.c cf-parse.output)
......@@ -52,7 +52,7 @@
#include "lib/resource.h"
#include "lib/string.h"
#include "lib/event.h"
#include "lib/timer.h"
#include "sysdep/unix/timer.h"
#include "conf/conf.h"
#include "filter/filter.h"
......
......@@ -10,7 +10,7 @@
#define _BIRD_CONF_H_
#include "lib/resource.h"
#include "lib/timer.h"
#include "sysdep/unix/timer.h"
/* Configuration structure */
......
......@@ -14,7 +14,7 @@ CF_HDR
#include "conf/conf.h"
#include "lib/resource.h"
#include "lib/socket.h"
#include "lib/timer.h"
#include "sysdep/unix/timer.h"
#include "lib/string.h"
#include "nest/protocol.h"
#include "nest/iface.h"
......
......@@ -23,24 +23,16 @@ AC_ARG_VAR([M4], [location of the M4 program])
if test "$srcdir" = . ; then
# Building in current directory => create obj directory holding all objects
objdir=obj
mkdir -p obj
srcdir_rel=..
makefiles="Makefile:tools/Makefile-top.in obj/Makefile:tools/Makefile.in obj/Rules:tools/Rules.in"
exedir=..
else
# Building in separate directory
objdir=.
srcdir_rel=$srcdir
makefiles="Makefile:tools/Makefile.in Rules:tools/Rules.in"
exedir=.
fi
case $srcdir_rel in
/*) srcdir_rel_mf=$srcdir_rel ;;
*) srcdir_rel_mf="\$(root-rel)$srcdir_rel" ;;
esac
exedir=.
AC_SUBST(objdir)
AC_SUBST(exedir)
AC_SUBST(srcdir_rel_mf)
AC_SUBST(srcdir)
AC_SUBST(runtimedir)
......@@ -162,7 +154,7 @@ sysname=`echo $sysdesc | sed 's/\.h$//'`
AC_DEFINE_UNQUOTED(SYSCONF_INCLUDE, "$sysdesc")
AC_MSG_CHECKING([system-dependent directories])
sysdep_dirs="`sed <$sysdesc '/^Link: /!d;s/^Link: \(.*\)$/\1/' | tr '\012' ' '` lib"
sysdep_dirs="`sed <$sysdesc '/^Link: /!d;s/^Link: \(.*\)$/\1/' | tr '\012' ' '`"
AC_MSG_RESULT($sysdep_dirs)
AC_SUBST(sysdep_dirs)
......@@ -234,10 +226,10 @@ if test "$enable_debug" = yes ; then
fi
fi
CLIENT=
CLIENT=birdcl
CLIENT_LIBS=
if test "$enable_client" = yes ; then
CLIENT=birdc
CLIENT="$CLIENT birdc"
AC_CHECK_LIB(history, add_history, CLIENT_LIBS="-lhistory")
AC_CHECK_LIB(ncurses, tgetent, USE_TERMCAP_LIB=-lncurses,
AC_CHECK_LIB(curses, tgetent, USE_TERMCAP_LIB=-lcurses,
......@@ -255,17 +247,9 @@ AC_SUBST(CLIENT_LIBS)
mkdir -p $objdir/sysdep
AC_CONFIG_HEADERS([$objdir/sysdep/autoconf.h:sysdep/autoconf.h.in])
AC_CONFIG_COMMANDS([merge],[[export CPP="$CPP"
$srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs]],
[[srcdir=$srcdir]
[srcdir_rel=$srcdir_rel]
[objdir=$objdir]
[sysdep_dirs="$sysdep_dirs"]])
AC_CONFIG_FILES($makefiles)
AC_CONFIG_FILES(Makefile:Makefile.in)
AC_OUTPUT
rm -f $objdir/sysdep/paths.h
cat >&AC_FD_MSG <<EOF
BIRD was configured with the following options:
......
......@@ -372,6 +372,8 @@ sub process_file
}
}
#
local $ENV{PATH} = "$ENV{PATH}:/usr/lib/linuxdoc-tools";
my($precmd) = "|sgmlpre output=$global->{format} $global->{define}";
#
......
root-rel=../
dir-name=doc
ifneq ($(wildcard ../Rules),)
include ../Rules
else
srcdir=$(shell cd $(root-rel) ; pwd)
srcdir_abs=$(srcdir)
endif
# Force rebuilds
.PHONY: prog.sgml bird.sgml
.PHONY: progspell docs progdocs userdocs
doc-srcdir := $(shell cd $(s) && pwd)
sgml2 := $(doc-srcdir)/sgml2
docs: progdocs userdocs
progdocs: prog.html prog.ps
userdocs: bird.html bird.ps
prog.sgml:
$(srcdir)/tools/progdoc $(srcdir_abs)
doc-fmt = $(1): $(o)prog.$(1) $(o)bird.$(1)
$(call doc-fmt,html)
$(call doc-fmt,dvi)
$(call doc-fmt,ps)
$(call doc-fmt,pdf)
progdocs: $(o)prog.html $(o)prog.pdf
userdocs: $(o)bird.html $(o)bird.pdf
progspell: $(o)prog.spell
$(o)prog.sgml: $(srcdir)/tools/progdoc $(objdir)/.dir-stamp
$(srcdir)/tools/progdoc $(srcdir) $@
$(o)%.sgml: $(s)%.sgml $(objdir)/.dir-stamp
cp $< $@
%.html: %.sgml
./sgml2html $<
$(o)%.html: $(o)%.sgml
cd $(dir $@) && $(sgml2)html $(notdir $<)
%.dvi: %.tex
latex $<
latex $<
$(o)%.dvi: $(o)%.tex
cd $(dir $@) && TEXINPUTS=$(TEXINPUTS):$(doc-srcdir)/tex latex $(notdir $<)
cd $(dir $@) && TEXINPUTS=$(TEXINPUTS):$(doc-srcdir)/tex latex $(notdir $<)
%.ps: %.dvi
$(o)%.ps: $(o)%.dvi
dvips -D600 -ta4 -o $@ $<
%.tex: %.sgml
./sgml2latex --output=tex $<
$(o)%.pdf: $(o)%.ps
ps2pdf $< $@
%.txt: %.sgml
./sgml2txt $<
$(o)%.tex: $(o)%.sgml
cd $(dir $@) && $(sgml2)latex --output=tex $(notdir $<)
progspell: prog.sgml
sed -f prog-spell.sed <prog.sgml >prog.spell
ispell prog.spell
$(o)%.txt: $(o)%.sgml
cd $(dir $@) && $(sgml2)txt $(notdir $<)
clean:
rm -f *.tex *.dvi *.log *.txt *.aux *.toc *.spell
rm -f prog.sgml
$(o)prog.spell: $(o)prog.sgml $(s)prog-spell.sed
sed -f $(lastword $^) <$< >$@
ispell $@
distclean: clean
rm -f *.html *.ps
$(call clean,prog.spell $(addprefix *.,html dvi ps pdf sgml tex txt aux log toc))
......@@ -17,8 +17,10 @@ use strict;
use vars qw($prefix $DataDir $BinDir $progs);
use FindBin;
$prefix = "/usr";
$DataDir = "sbase";
$DataDir = "$FindBin::Bin/sbase";
$BinDir = "/usr/bin";
use lib "/usr/share/linuxdoc-tools";
......@@ -32,9 +34,9 @@ $progs = {
"GROFFMACRO" => "-ms",
"AWK" => "/usr/share/linuxdoc-tools/awkwhich"
};
$ENV{"SGML_CATALOG_FILES"} = "sbase/dtd/catalog";
$ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog";
require "./LinuxDocTools.pm";
require "$FindBin::Bin/LinuxDocTools.pm";
&LinuxDocTools::init;
my @FileList = LinuxDocTools::process_options ("html", @ARGV);
......
......@@ -17,8 +17,10 @@ use strict;
use vars qw($prefix $DataDir $BinDir $progs);
use FindBin;
$prefix = "/usr";
$DataDir = "sbase";
$DataDir = "$FindBin::Bin/sbase";
$BinDir = "/usr/bin";
use lib "/usr/share/linuxdoc-tools";
......@@ -32,9 +34,9 @@ $progs = {
"GROFFMACRO" => "-ms",
"AWK" => "/usr/share/linuxdoc-tools/awkwhich"
};
$ENV{"SGML_CATALOG_FILES"} = "sbase/dtd/catalog";
$ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog";
require "./LinuxDocTools.pm";
require "$FindBin::Bin/LinuxDocTools.pm";
&LinuxDocTools::init;
my @FileList = LinuxDocTools::process_options ("latex", @ARGV);
......
......@@ -17,8 +17,10 @@ use strict;
use vars qw($prefix $DataDir $BinDir $progs);
use FindBin;
$prefix = "/usr";
$DataDir = "sbase";
$DataDir = "$FindBin::Bin/sbase";
$BinDir = "/usr/bin";
use lib "/usr/share/linuxdoc-tools";
......@@ -32,9 +34,9 @@ $progs = {
"GROFFMACRO" => "-ms",
"AWK" => "/usr/share/linuxdoc-tools/awkwhich"
};
$ENV{"SGML_CATALOG_FILES"} = "sbase/dtd/catalog";
$ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog";
require "./LinuxDocTools.pm";
require "$FindBin::Bin/LinuxDocTools.pm";
&LinuxDocTools::init;
my @FileList = LinuxDocTools::process_options ("txt", @ARGV);
......
source=f-util.c filter.c tree.c trie.c
root-rel=../
dir-name=filter
include ../Rules
src := filter.c f-util.c tree.c trie.c
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
H Library functions
S ip.c ipv4.c ipv6.c
S ip.c
S lists.c
S checksum.c bitops.c patmatch.c printf.c xmalloc.c tbf.c
D resource.sgml
......
src := bitops.c checksum.c ip.c lists.c md5.c net.c patmatch.c printf.c sha1.c sha256.c sha512.c slists.c xmalloc.c
obj := $(src-o-files)
$(all-client)
src := bitops.c checksum.c event.c idm.c ip.c lists.c md5.c mempool.c net.c patmatch.c printf.c resource.c sha1.c sha256.c sha512.c slab.c slists.c tbf.c xmalloc.c
obj := $(src-o-files)
$(all-daemon)
sha256.c
sha256.h
sha512.c
sha512.h
sha1.c
sha1.h
birdlib.h
bitops.c
bitops.h
idm.c
idm.h
ip.c
ip.h
lists.c
lists.h
md5.c
md5.h
mempool.c
resource.c
resource.h
slab.c
socket.h
tbf.c
unaligned.h
xmalloc.c
printf.c
string.h
patmatch.c
slists.c
slists.h
event.c
event.h
checksum.c
checksum.h
alloca.h
net.c
......@@ -9,8 +9,8 @@
#ifndef _BIRD_BIRDLIB_H_
#define _BIRD_BIRDLIB_H_
#include "timer.h"
#include "alloca.h"
#include "sysdep/unix/timer.h"
#include "lib/alloca.h"
/* Ugly structure offset handling macros */
......
......@@ -9,7 +9,7 @@
#ifndef _BIRD_IP_H_
#define _BIRD_IP_H_
#include "lib/endian.h"
#include "sysdep/unix/endian.h"
#include "lib/string.h"
#include "lib/bitops.h"
#include "lib/unaligned.h"
......
......@@ -17,7 +17,7 @@
* if possible.
*/
#include "lib/endian.h"
#include "sysdep/unix/endian.h"
#include "lib/string.h"
static inline u16
......
source=rt-table.c rt-fib.c rt-attr.c proto.c iface.c rt-dev.c password.c cli.c locks.c cmds.c neighbor.c \
a-path.c a-set.c
root-rel=../
dir-name=nest
include ../Rules
src := a-path.c a-set.c cli.c cmds.c iface.c locks.c neighbor.c password.c proto.c rt-attr.c rt-dev.c rt-fib.c rt-table.c
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
......@@ -9,7 +9,7 @@
#ifndef PASSWORD_H
#define PASSWORD_H
#include "lib/timer.h"
#include "sysdep/unix/timer.h"
struct password_item {
node n;
......
......@@ -12,7 +12,7 @@
#include "lib/lists.h"
#include "lib/resource.h"
#include "lib/event.h"
#include "lib/timer.h"
#include "sysdep/unix/timer.h"
#include "nest/route.h"
#include "conf/conf.h"
......@@ -271,7 +271,7 @@ proto_get_router_id(struct proto_config *pc)
}
/* Moved from route.h to avoid dependency conflicts */
static inline void rte_update(struct proto *p, net *net, rte *new) { rte_update2(p->main_channel, net, new, p->main_source); }
static inline void rte_update(struct proto *p, net_addr *n, rte *new) { rte_update2(p->main_channel, n, new, p->main_source); }
extern list proto_list;
......
......@@ -11,7 +11,7 @@
#include "lib/lists.h"
#include "lib/resource.h"
#include "lib/timer.h"
#include "sysdep/unix/timer.h"
//#include "nest/protocol.h"
struct ea_list;
......@@ -276,7 +276,7 @@ static inline net *net_get(rtable *tab, const net_addr *addr) { return (net *) f
rte *rte_find(net *net, struct rte_src *src);
rte *rte_get_temp(struct rta *);
void rte_update2(struct channel *c, net *net, rte *new, struct rte_src *src);
void rte_update2(struct channel *c, net_addr *n, rte *new, struct rte_src *src);
/* rte_update() moved to protocol.h to avoid dependency conflicts */
void rte_discard(rtable *tab, rte *old);
int rt_examine(rtable *t, net_addr *a, struct proto *p, struct filter *filter);
......
......@@ -55,24 +55,15 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad)
if (flags & IF_CHANGE_DOWN)
{
net *n;
DBG("dev_if_notify: %s:%I going down\n", ad->iface->name, ad->ip);
n = net_find(c->table, &ad->prefix);
if (!n)
{
DBG("dev_if_notify: device shutdown: prefix not found\n");
return;
}
/* Use iface ID as local source ID */
struct rte_src *src = rt_get_source(P, ad->iface->index);
rte_update2(c, n, NULL, src);
rte_update2(c, &ad->prefix, NULL, src);
}
else if (flags & IF_CHANGE_UP)
{
rta *a;
net *n;
rte *e;
DBG("dev_if_notify: %s:%I going up\n", ad->iface->name, ad->ip);
......@@ -90,11 +81,9 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad)
};
a = rta_lookup(&a0);
n = net_get(c->table, &ad->prefix);
e = rte_get_temp(a);
e->net = n;
e->pflags = 0;
rte_update2(c, n, e, src);
rte_update2(c, &ad->prefix, e, src);
}
}
......
......@@ -1267,19 +1267,23 @@ rte_unhide_dummy_routes(net *net, rte **dummy)
*/
void
rte_update2(struct channel *c, net *net, rte *new, struct rte_src *src)
rte_update2(struct channel *c, net_addr *n, rte *new, struct rte_src *src)
{
struct proto *p = c->proto;
struct proto_stats *stats = &c->stats;
struct filter *filter = c->in_filter;
ea_list *tmpa = NULL;
rte *dummy = NULL;
net *nn;
ASSERT(c->channel_state == CS_UP);
rte_update_lock();
if (new)
{
nn = net_get(c->table, n);
new->net = nn;
new->sender = c;
if (!new->pref)
......@@ -1333,7 +1337,7 @@ rte_update2(struct channel *c, net *net, rte *new, struct rte_src *src)
{
stats->imp_withdraws_received++;
if (!net || !src)
if (!(nn = net_find(c->table, n)) || !src)
{
stats->imp_withdraws_ignored++;
rte_update_unlock();
......@@ -1342,9 +1346,9 @@ rte_update2(struct channel *c, net *net, rte *new, struct rte_src *src)
}
recalc:
rte_hide_dummy_routes(net, &dummy);
rte_recalculate(c, net, new, src);
rte_unhide_dummy_routes(net, &dummy);
rte_hide_dummy_routes(nn, &dummy);
rte_recalculate(c, nn, new, src);
rte_unhide_dummy_routes(nn, &dummy);
rte_update_unlock();
return;
......
source=bfd.c packets.c io.c
root-rel=../../
dir-name=proto/bfd
include ../../Rules
src := bfd.c io.c packets.c
obj := $(src-o-files)