1 From 4e7dbf76227e8c7be7897dc81def3011f637864d Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Thu, 30 May 2013 11:54:04 +0200
4 Subject: [PATCH] add support for dropping with FAILED_POLICY
7 include/linux/fib_rules.h | 4 ++++
8 include/linux/rtnetlink.h | 1 +
10 3 files changed, 9 insertions(+)
14 @@ -49,6 +49,8 @@ char *rtnl_rtntype_n2a(int id, char *buf
18 + case RTN_FAILED_POLICY:
19 + return "failed_policy";
21 snprintf(buf, len, "%d", id);
23 @@ -84,6 +86,8 @@ int rtnl_rtntype_a2n(int *id, char *arg)
25 else if (strcmp(arg, "throw") == 0)
27 + else if (strcmp(arg, "failed_policy") == 0)
28 + res = RTN_FAILED_POLICY;
30 res = strtoul(arg, &end, 0);
31 if (!end || end == arg || *end || res > 255)
32 --- a/include/uapi/linux/rtnetlink.h
33 +++ b/include/uapi/linux/rtnetlink.h
34 @@ -221,6 +221,7 @@ enum {
35 RTN_THROW, /* Not in this table */
36 RTN_NAT, /* Translate this address */
37 RTN_XRESOLVE, /* Use external resolver */
38 + RTN_FAILED_POLICY, /* Source address failed policy */