Commit c32f2f63 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Filter out v4-mapped addresses by default.

parent 0ddb7103
...@@ -20,11 +20,21 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ...@@ -20,11 +20,21 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
#include "babel.h"
#include "util.h"
#include "filter.h"
static unsigned char v4prefix[16] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0 };
int int
import_filter(const unsigned char *id, import_filter(const unsigned char *id,
const unsigned char *prefix, unsigned short plen, const unsigned char *prefix, unsigned short plen,
const unsigned char *nexthop) const unsigned char *nexthop)
{ {
if(plen >= 96 && in_prefix(prefix, v4prefix, 96))
return 1;
return 0; return 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