Linux Netfilter discussions
 help / color / mirror / Atom feed
* EPERM instead of ENETUNREACH for "to unreachable" route
@ 2013-04-15 13:28 markus lottmann
  2013-04-15 14:46 ` Bourne Without
  0 siblings, 1 reply; 2+ messages in thread
From: markus lottmann @ 2013-04-15 13:28 UTC (permalink / raw)
  To: netfilter

Hi everyone,

I am trying to set up a quite complex routing in which the packets from my software are tos marked and should then leave the system via different interfaces based on this marking. I thereby ran into a problem with a route which goes "to unreachable". The returned error code is EPERM instead of ENETUNREACH and I do not understand why. I broke down the setup to a minimum for the mailing list request to ease the discussion.
The setup is:

ip route shows:
default via 10.0.0.1 dev eth0
10.0.0/24 dev eth0 proto kernel scope link src 10.0.0.2

ip rule shows:
form all lookup local
from all fwmark 0x1 lookup 101
form all lookup main
from all lookup default

ip route show table 101 shows:
unreachable default

iptables only one entry and the default behaviour is set to ACCEPT for all tables:
iptabltes -t mangle -A OUTPUT -m tos --tos 0x1 -j MARK --set-mark 0x1

In this setup the command: ping -Q 1 8.8.8.8 yields EPERM instead of the expected ENETUNREACH. Does anyone have an explanation for this? The only thing I found in a web search was that EPERM is returned if an OUTPUT rule in the filter table is dropping packets.

Greetings,
Markus

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: EPERM instead of ENETUNREACH for "to unreachable" route
  2013-04-15 13:28 EPERM instead of ENETUNREACH for "to unreachable" route markus lottmann
@ 2013-04-15 14:46 ` Bourne Without
  0 siblings, 0 replies; 2+ messages in thread
From: Bourne Without @ 2013-04-15 14:46 UTC (permalink / raw)
  To: markus lottmann; +Cc: netfilter

On 15.04.2013 15:28, markus lottmann wrote:
[...]
> In this setup the command: ping -Q 1 8.8.8.8 yields EPERM instead of the expected ENETUNREACH. Does anyone have an explanation for this? The only thing I found in a web search was that EPERM is returned if an OUTPUT rule in the filter table is dropping packets.

http://marc.info/?l=netfilter-devel&m=136518055130415&w=2

might answer this


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-15 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15 13:28 EPERM instead of ENETUNREACH for "to unreachable" route markus lottmann
2013-04-15 14:46 ` Bourne Without

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox