From: Patrick McHardy Date: Fri, 5 Apr 2013 06:41:10 +0000 (+0000) Subject: netfilter: ipv4: propagate routing errors from ip_route_me_harder() X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~65^2~81^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9e1673a0accf086dfce9b501d8bcb4ec6bbc1e9;p=pandora-kernel.git netfilter: ipv4: propagate routing errors from ip_route_me_harder() Propagate routing errors from ip_route_me_harder() when dropping a packet using NF_DROP_ERR(). This makes userspace get the proper error instead of EPERM for everything. Example: # ip r a unreachable default table 100 # ip ru add fwmark 0x1 lookup 100 # iptables -t mangle -A OUTPUT -d 8.8.8.8 -j MARK --set-mark 0x1 Current behaviour: PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted New behaviour: PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. ping: sendmsg: Network is unreachable ping: sendmsg: Network is unreachable ping: sendmsg: Network is unreachable ping: sendmsg: Network is unreachable Signed-off-by: Patrick McHardy Signed-off-by: Pablo Neira Ayuso --- Reading git-diff-tree failed