diff options
author | Steven Barth <steven@midlink.org> | 2013-06-11 09:27:46 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-06-11 09:27:46 +0000 |
commit | 7a187e61cdea1d7b72d1bdf49fd74f3f495e3618 (patch) | |
tree | 2f89c40026a1ece375584603c95f8e7f1a11a1e1 /package/network/utils/iproute2/patches | |
parent | 81450bd00d65284f08cca66f0687f49aa6c3bcc2 (diff) | |
download | upstream-7a187e61cdea1d7b72d1bdf49fd74f3f495e3618.tar.gz upstream-7a187e61cdea1d7b72d1bdf49fd74f3f495e3618.tar.bz2 upstream-7a187e61cdea1d7b72d1bdf49fd74f3f495e3618.zip |
iproute2: add drop-failed rule action (patch by Jonas Gorski)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36910 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/iproute2/patches')
-rw-r--r-- | package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch b/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch new file mode 100644 index 0000000000..d6c5ccd7b2 --- /dev/null +++ b/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch @@ -0,0 +1,63 @@ +From 4e7dbf76227e8c7be7897dc81def3011f637864d Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Thu, 30 May 2013 11:54:04 +0200 +Subject: [PATCH] add support for dropping with FAILED_POLICY + +--- + include/linux/fib_rules.h | 4 ++++ + include/linux/rtnetlink.h | 1 + + ip/rtm_map.c | 4 ++++ + 3 files changed, 9 insertions(+) + +diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h +index 51da65b..3420838 100644 +--- a/include/linux/fib_rules.h ++++ b/include/linux/fib_rules.h +@@ -64,6 +64,10 @@ enum { + FR_ACT_BLACKHOLE, /* Drop without notification */ + FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */ + FR_ACT_PROHIBIT, /* Drop with EACCES */ ++ FR_ACT_RES8, ++ FR_ACT_RES9, ++ FR_ACT_RES10, ++ FR_ACT_FAILED_POLICY, /* Drop with EPERM */ + __FR_ACT_MAX, + }; + +diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h +index 93370bd..cfec9ff 100644 +--- a/include/linux/rtnetlink.h ++++ b/include/linux/rtnetlink.h +@@ -203,6 +203,7 @@ enum { + RTN_THROW, /* Not in this table */ + RTN_NAT, /* Translate this address */ + RTN_XRESOLVE, /* Use external resolver */ ++ RTN_FAILED_POLICY, /* Source address failed policy */ + __RTN_MAX + }; + +diff --git a/ip/rtm_map.c b/ip/rtm_map.c +index 21e818b..8ad2d07 100644 +--- a/ip/rtm_map.c ++++ b/ip/rtm_map.c +@@ -49,6 +49,8 @@ char *rtnl_rtntype_n2a(int id, char *buf, int len) + return "nat"; + case RTN_XRESOLVE: + return "xresolve"; ++ case RTN_FAILED_POLICY: ++ return "failed_policy"; + default: + snprintf(buf, len, "%d", id); + return buf; +@@ -84,6 +86,8 @@ int rtnl_rtntype_a2n(int *id, char *arg) + res = RTN_UNICAST; + else if (strcmp(arg, "throw") == 0) + res = RTN_THROW; ++ else if (strcmp(arg, "failed_policy") == 0) ++ res = RTN_FAILED_POLICY; + else { + res = strtoul(arg, &end, 0); + if (!end || end == arg || *end || res > 255) +-- +1.7.10.4 + |