diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-10-11 11:45:58 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-10-11 11:45:58 +0000 |
commit | 53f5bf14f05d657ca488d63435f48e9b3990ea1c (patch) | |
tree | efea289ac97646a42de6bb808d7c07b9aa0c7bf5 | |
parent | f85887c1b6d42fa8b68c78dc07cbae461a7bb81b (diff) |
bgpd needs to see all routing messages so set the ROUTE_TABLEFILTER to
RTABLE_ANY.
OK henning@
-rw-r--r-- | usr.sbin/bgpd/kroute.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index 3d15a86ffac..226605dee74 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.185 2010/09/30 08:57:37 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.186 2010/10/11 11:45:57 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -193,6 +193,7 @@ int kr_init(void) { int opt = 0, rcvbuf, default_rcvbuf; + unsigned int tid = RTABLE_ANY; socklen_t optlen; if ((kr_state.fd = socket(AF_ROUTE, SOCK_RAW, 0)) == -1) { @@ -218,6 +219,12 @@ kr_init(void) rcvbuf /= 2) ; /* nothing */ + if (setsockopt(kr_state.fd, AF_ROUTE, ROUTE_TABLEFILTER, &tid, + sizeof(tid)) == -1) { + log_warn("kr_init: setsockopt AF_ROUTE ROUTE_TABLEFILTER"); + return (-1); + } + kr_state.pid = getpid(); kr_state.rtseq = 1; |