diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2013-05-30 19:22:49 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2013-05-30 19:22:49 +0000 |
commit | 8d030ee927bd8cdab1200634cc86753dd5d1c98c (patch) | |
tree | 1096e367808a7b35dfb18b6d7ed60547c0d7cfac | |
parent | f18acc3c55f821a92db9c79c9543a77f44614385 (diff) |
setsockopt to see messages for interfaces in all routing domains again
instead of just the primary one.
problem reported along with the right idea on how to fix it by Sean
Gallagher (sean at teletech.com.au), actual fix by yours truly. Thanks Sean!
ok ryan claudio
-rw-r--r-- | usr.sbin/ifstated/ifstated.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/ifstated/ifstated.c b/usr.sbin/ifstated/ifstated.c index 7cf274cce06..0783d473d54 100644 --- a/usr.sbin/ifstated/ifstated.c +++ b/usr.sbin/ifstated/ifstated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifstated.c,v 1.40 2011/07/04 04:34:14 claudio Exp $ */ +/* $OpenBSD: ifstated.c,v 1.41 2013/05/30 19:22:48 henning Exp $ */ /* * Copyright (c) 2004 Marco Pfatschbacher <mpf@openbsd.org> @@ -169,7 +169,12 @@ startup_handler(int fd, short event, void *arg) rtfilter = ROUTE_FILTER(RTM_IFINFO); if (setsockopt(rt_fd, PF_ROUTE, ROUTE_MSGFILTER, &rtfilter, sizeof(rtfilter)) == -1) /* not fatal */ - log_warn("startup_handler: setsockopt"); + log_warn("startup_handler: setsockopt msgfilter"); + + rtfilter = RTABLE_ANY; + if (setsockopt(rt_fd, PF_ROUTE, ROUTE_TABLEFILTER, + &rtfilter, sizeof(rtfilter)) == -1) /* not fatal */ + log_warn("startup_handler: setsockopt tablefilter"); event_set(&rt_msg_ev, rt_fd, EV_READ|EV_PERSIST, rt_msg_handler, NULL); event_add(&rt_msg_ev, NULL); |