Skip to content

Commit

Permalink
Merge pull request #2134 from donaldsharp/zzz-top
Browse files Browse the repository at this point in the history
Clean up some issues found
  • Loading branch information
louberger authored Apr 29, 2018
2 parents d90b2b7 + 2222a71 commit 3971233
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 8 deletions.
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ else
fi
fi
AM_CONDITIONAL([DEV_BUILD], [test "x$enable_dev_build" = "xyes"])
AM_CONDITIONAL([SHARPD], [test "x$enable_dev_build" = "xyes"])

dnl always want these CFLAGS
AC_C_FLAG([-fno-omit-frame-pointer])
Expand Down Expand Up @@ -354,6 +353,10 @@ AC_ARG_ENABLE(isisd,
AS_HELP_STRING([--disable-isisd], [do not build isisd]))
AC_ARG_ENABLE(pimd,
AS_HELP_STRING([--disable-pimd], [do not build pimd]))
AC_ARG_ENABLE(pbrd,
AS_HELP_STRING([--disable-pbrd], [do not build pbrd]))
AC_ARG_ENABLE(sharpd,
AS_HELP_STRING([--enable-sharpd], [do not build sharpd]))
AC_ARG_ENABLE(bgp-announce,
AS_HELP_STRING([--disable-bgp-announce,], [turn off BGP route announcement]))
AC_ARG_ENABLE(bgp-vnc,
Expand Down Expand Up @@ -1378,6 +1381,7 @@ AM_CONDITIONAL(OSPF6D, test "${enable_ospf6d}" != "no")
AM_CONDITIONAL(ISISD, test "${enable_isisd}" != "no")
AM_CONDITIONAL(PIMD, test "${enable_pimd}" != "no")
AM_CONDITIONAL(PBRD, test "${enable_pbrd}" != "no")
AM_CONDITIONAL(SHARPD, test "${enable_sharpd}" = "yes")

if test "${enable_bgp_announce}" = "no";then
AC_DEFINE(DISABLE_BGP_ANNOUNCE,1,Disable BGP installation to zebra)
Expand Down
3 changes: 2 additions & 1 deletion tools/etc/iproute2/rt_protos.d/frr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
191 nhrp
192 eigrp
193 ldp
194 sharp
194 sharp
195 pbr
13 changes: 8 additions & 5 deletions tools/frr
Original file line number Diff line number Diff line change
Expand Up @@ -552,16 +552,19 @@ case "$1" in
# Additionally if a new protocol is added
# we need to add it here as well as
# in rt_netlink.h( follow the directions! )
ip route flush proto 4
ip route flush proto 11
ip route flush proto 42
ip route flush proto 186
ip route flush proto 187
ip route flush proto 188
ip route flush proto 4
ip route flush proto 189
ip route flush proto 190
ip route flush proto 11
ip route flush proto 187
ip route flush proto 192
ip route flush proto 42
ip route flush proto 191
ip route flush proto 192
ip route flush proto 193
ip route flush proto 194
ip route flush proto 195
else
[ -n "$dmn" ] && eval "${dmn/-/_}=0"
start_watchfrr
Expand Down
29 changes: 28 additions & 1 deletion zebra/rt_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ static inline int is_selfroute(int proto)
|| (proto == RTPROT_ISIS) || (proto == RTPROT_RIPNG)
|| (proto == RTPROT_NHRP) || (proto == RTPROT_EIGRP)
|| (proto == RTPROT_LDP) || (proto == RTPROT_BABEL)
|| (proto == RTPROT_RIP) || (proto == RTPROT_SHARP)) {
|| (proto == RTPROT_RIP) || (proto == RTPROT_SHARP)
|| (proto == RTPROT_PBR)) {
return 1;
}

Expand Down Expand Up @@ -142,7 +143,18 @@ static inline int zebra2proto(int proto)
case ZEBRA_ROUTE_SHARP:
proto = RTPROT_SHARP;
break;
case ZEBRA_ROUTE_PBR:
proto = RTPROT_PBR;
break;
default:
/*
* When a user adds a new protocol this will show up
* to let them know to do something about it. This
* is intentionally a warn because we should see
* this as part of development of a new protocol
*/
zlog_warn("%s: Please add this protocol(%d) to proper rt_netlink.c handling",
__PRETTY_FUNCTION__, proto);
proto = RTPROT_ZEBRA;
break;
}
Expand Down Expand Up @@ -184,7 +196,22 @@ static inline int proto2zebra(int proto, int family)
case RTPROT_STATIC:
proto = ZEBRA_ROUTE_STATIC;
break;
case RTPROT_SHARP:
proto = ZEBRA_ROUTE_SHARP;
break;
case RTPROT_PBR:
proto = ZEBRA_ROUTE_PBR;
break;
default:
/*
* When a user adds a new protocol this will show up
* to let them know to do something about it. This
* is intentionally a warn because we should see
* this as part of development of a new protocol
*/
zlog_warn("%s: Please add this protocol(%d) to proper rt_netlink.c handling",
__PRETTY_FUNCTION__,
proto);
proto = ZEBRA_ROUTE_KERNEL;
break;
}
Expand Down
1 change: 1 addition & 0 deletions zebra/rt_netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#define RTPROT_EIGRP 192
#define RTPROT_LDP 193
#define RTPROT_SHARP 194
#define RTPROT_PBR 195

void rt_netlink_init(void);

Expand Down

0 comments on commit 3971233

Please sign in to comment.