mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 01:31:55 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
5004d02cb9
@ -42,11 +42,13 @@ AC_SUBST(srcdir_rel_mf)
|
|||||||
|
|
||||||
if test "$enable_ipv6" = yes ; then
|
if test "$enable_ipv6" = yes ; then
|
||||||
ip=ipv6
|
ip=ipv6
|
||||||
|
SUFFIX6=6
|
||||||
if test "$with_protocols" = all ; then
|
if test "$with_protocols" = all ; then
|
||||||
with_protocols=bgp,pipe,rip,static
|
with_protocols=bgp,pipe,rip,static
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
ip=ipv4
|
ip=ipv4
|
||||||
|
SUFFIX6=""
|
||||||
if test "$with_protocols" = all ; then
|
if test "$with_protocols" = all ; then
|
||||||
with_protocols=bgp,ospf,pipe,rip,static
|
with_protocols=bgp,ospf,pipe,rip,static
|
||||||
fi
|
fi
|
||||||
@ -208,6 +210,7 @@ if test "$enable_client" = yes ; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(CLIENT)
|
AC_SUBST(CLIENT)
|
||||||
AC_SUBST(CLIENT_LIBS)
|
AC_SUBST(CLIENT_LIBS)
|
||||||
|
AC_SUBST(SUFFIX6)
|
||||||
|
|
||||||
mkdir -p $objdir/sysdep
|
mkdir -p $objdir/sysdep
|
||||||
AC_CONFIG_HEADERS([$objdir/sysdep/autoconf.h:sysdep/autoconf.h.in])
|
AC_CONFIG_HEADERS([$objdir/sysdep/autoconf.h:sysdep/autoconf.h.in])
|
||||||
|
@ -396,8 +396,9 @@ symbol:
|
|||||||
case SYM_VARIABLE | T_PATH:
|
case SYM_VARIABLE | T_PATH:
|
||||||
case SYM_VARIABLE | T_PATH_MASK:
|
case SYM_VARIABLE | T_PATH_MASK:
|
||||||
case SYM_VARIABLE | T_CLIST:
|
case SYM_VARIABLE | T_CLIST:
|
||||||
$$->code = 'C';
|
$$->code = 'V';
|
||||||
$$->a1.p = $1->def;
|
$$->a1.p = $1->def;
|
||||||
|
$$->a2.p = $1->name;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
cf_error("%s: variable expected.", $1->name );
|
cf_error("%s: variable expected.", $1->name );
|
||||||
|
@ -64,6 +64,8 @@ pm_path_compare(struct f_path_mask *m1, struct f_path_mask *m2)
|
|||||||
while (1) {
|
while (1) {
|
||||||
if ((!m1) || (!m2))
|
if ((!m1) || (!m2))
|
||||||
return !((!m1) && (!m2));
|
return !((!m1) && (!m2));
|
||||||
|
|
||||||
|
if ((m1->kind != m2->kind) || (m1->val != m2->val)) return 1;
|
||||||
m1 = m1->next;
|
m1 = m1->next;
|
||||||
m2 = m2->next;
|
m2 = m2->next;
|
||||||
}
|
}
|
||||||
@ -136,7 +138,8 @@ val_compare(struct f_val v1, struct f_val v2)
|
|||||||
}
|
}
|
||||||
switch (v1.type) {
|
switch (v1.type) {
|
||||||
case T_ENUM:
|
case T_ENUM:
|
||||||
case T_INT:
|
case T_INT:
|
||||||
|
case T_BOOL:
|
||||||
case T_PAIR:
|
case T_PAIR:
|
||||||
if (v1.val.i == v2.val.i) return 0;
|
if (v1.val.i == v2.val.i) return 0;
|
||||||
if (v1.val.i < v2.val.i) return -1;
|
if (v1.val.i < v2.val.i) return -1;
|
||||||
@ -156,7 +159,7 @@ val_compare(struct f_val v1, struct f_val v2)
|
|||||||
case T_STRING:
|
case T_STRING:
|
||||||
return strcmp(v1.val.s, v2.val.s);
|
return strcmp(v1.val.s, v2.val.s);
|
||||||
default:
|
default:
|
||||||
debug( "Compare of unkown entities: %x\n", v1.type );
|
debug( "Compare of unknown entities: %x\n", v1.type );
|
||||||
return CMP_ERROR;
|
return CMP_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -501,6 +504,7 @@ interpret(struct f_inst *what)
|
|||||||
else
|
else
|
||||||
res.val.i = what->a2.i;
|
res.val.i = what->a2.i;
|
||||||
break;
|
break;
|
||||||
|
case 'V':
|
||||||
case 'C':
|
case 'C':
|
||||||
res = * ((struct f_val *) what->a1.p);
|
res = * ((struct f_val *) what->a1.p);
|
||||||
break;
|
break;
|
||||||
@ -868,10 +872,12 @@ i_same(struct f_inst *f1, struct f_inst *f2)
|
|||||||
case T_PREFIX_SET:
|
case T_PREFIX_SET:
|
||||||
if (!trie_same(f1->a2.p, f2->a2.p))
|
if (!trie_same(f1->a2.p, f2->a2.p))
|
||||||
return 0;
|
return 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case T_SET:
|
case T_SET:
|
||||||
if (!same_tree(f1->a2.p, f2->a2.p))
|
if (!same_tree(f1->a2.p, f2->a2.p))
|
||||||
return 0;
|
return 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case T_STRING:
|
case T_STRING:
|
||||||
if (strcmp(f1->a2.p, f2->a2.p))
|
if (strcmp(f1->a2.p, f2->a2.p))
|
||||||
@ -886,6 +892,10 @@ i_same(struct f_inst *f1, struct f_inst *f2)
|
|||||||
if (val_compare(* (struct f_val *) f1->a1.p, * (struct f_val *) f2->a1.p))
|
if (val_compare(* (struct f_val *) f1->a1.p, * (struct f_val *) f2->a1.p))
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
|
case 'V':
|
||||||
|
if (strcmp((char *) f1->a2.p, (char *) f2->a2.p))
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
case 'p': case 'L': ONEARG; break;
|
case 'p': case 'L': ONEARG; break;
|
||||||
case '?': TWOARGS; break;
|
case '?': TWOARGS; break;
|
||||||
case '0': case 'E': break;
|
case '0': case 'E': break;
|
||||||
|
@ -171,6 +171,9 @@ string s;
|
|||||||
|
|
||||||
b = true;
|
b = true;
|
||||||
print "Testing bool: ", b, ", ", !b;
|
print "Testing bool: ", b, ", ", !b;
|
||||||
|
|
||||||
|
if ( b = true ) then print "Testing bool comparison b = true: ", b;
|
||||||
|
else { print "*** FAIL: TRUE test failed" ; quitbird; }
|
||||||
|
|
||||||
pxs = [ 1.2.0.0/16, 1.4.0.0/16+];
|
pxs = [ 1.2.0.0/16, 1.4.0.0/16+];
|
||||||
print "Testing prefix sets: ";
|
print "Testing prefix sets: ";
|
||||||
@ -218,4 +221,4 @@ int j;
|
|||||||
accept "ok I take that";
|
accept "ok I take that";
|
||||||
}
|
}
|
||||||
|
|
||||||
eval __startup();
|
eval __startup();
|
||||||
|
@ -38,11 +38,11 @@ typedef u16 word;
|
|||||||
/* Path to configuration file */
|
/* Path to configuration file */
|
||||||
#ifdef IPV6
|
#ifdef IPV6
|
||||||
# ifdef DEBUGGING
|
# ifdef DEBUGGING
|
||||||
# define PATH_CONFIG "bird-6.conf"
|
# define PATH_CONFIG "bird6.conf"
|
||||||
# define PATH_CONTROL_SOCKET "bird-6.ctl"
|
# define PATH_CONTROL_SOCKET "bird6.ctl"
|
||||||
# else
|
# else
|
||||||
# define PATH_CONFIG PATH_CONFIG_DIR "/bird-6.conf"
|
# define PATH_CONFIG PATH_CONFIG_DIR "/bird6.conf"
|
||||||
# define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird-6.ctl"
|
# define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird6.ctl"
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# ifdef DEBUGGING
|
# ifdef DEBUGGING
|
||||||
|
@ -43,24 +43,24 @@ tags:
|
|||||||
cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
|
cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d $(sbindir) $(sysconfdir) $(localstatedir)
|
$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(localstatedir)
|
||||||
$(INSTALL_PROGRAM) -s $(exedir)/bird $(sbindir)/
|
$(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX6@
|
||||||
if test -n "@CLIENT@" ; then \
|
if test -n "@CLIENT@" ; then \
|
||||||
$(INSTALL_PROGRAM) -s $(exedir)/birdc $(sbindir)/ ; \
|
$(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX6@ ; \
|
||||||
fi
|
fi
|
||||||
if ! test -f $(sysconfdir)/bird.conf ; then \
|
if ! test -f $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; then \
|
||||||
$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(sysconfdir)/bird.conf ; \
|
$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; \
|
||||||
else \
|
else \
|
||||||
echo "Not overwriting old bird.conf" ; \
|
echo "Not overwriting old bird@SUFFIX@.conf" ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install-docs:
|
install-docs:
|
||||||
$(INSTALL) -d $(docdir)
|
$(INSTALL) -d $(DESTDIR)/$(docdir)
|
||||||
$(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(docdir)/
|
$(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
|
find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
|
||||||
rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl .dep-stamp
|
rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules
|
rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules
|
||||||
|
Loading…
Reference in New Issue
Block a user