Commit 5dcc4017 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Filter away RTPROT_BOOT in the redistribute filter, not at the lower levels.

This changes the semantics of filters: RTPROT_BOOT will now be redistributed,
but only if it is explicitly mentioned in a redistribute filter.
parent 5ce0c1e8
/*
Copyright (c) 2007, 2008 by Juliusz Chroboczek
Copyright (c) 2007-2010 by Juliusz Chroboczek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -24,6 +24,13 @@ THE SOFTWARE.
#include <string.h>
#include <stdio.h>
#ifndef __APPLE__
/* For RTPROT_BOOT */
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#endif
#include "babeld.h"
#include "util.h"
#include "network.h"
......@@ -640,7 +647,12 @@ filter_match(struct filter *f, const unsigned char *id,
return 0;
} else if(proto == RTPROT_BABEL_LOCAL) {
return 0;
#ifndef __APPLE__
} else if(proto == RTPROT_BOOT) {
return 0;
#endif
}
return 1;
}
......
/*
Copyright 2007, 2008 by Grégoire Henry, Julien Cristau and Juliusz Chroboczek
Copyright 2007-2010 by Grégoire Henry, Julien Cristau and Juliusz Chroboczek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -1005,7 +1005,7 @@ filter_kernel_routes(struct nlmsghdr *nh, void *data)
rtm = (struct rtmsg*)NLMSG_DATA(nh);
len -= NLMSG_LENGTH(0);
if(rtm->rtm_protocol == RTPROT_BOOT || rtm->rtm_protocol == RTPROT_BABEL)
if(rtm->rtm_protocol == RTPROT_BABEL)
return 0;
if(rtm->rtm_src_len != 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment