public inbox for lartc@vger.kernel.org
 help / color / mirror / Atom feed
From: yb@rslinux.fun
To: lartc@vger.kernel.org
Subject: Policy routing and ICMP MTU message
Date: Mon, 07 Feb 2022 01:58:18 +0000	[thread overview]
Message-ID: <YgB8uv0vU320uawp@rslinux.fun> (raw)

I have a Linux server which forwards packets from/to a tun device for a
specific private IP address A0, but with a different routing table than
the default one, i.e.:

    ip route add A0 dev tun-device
    ip rule add from A0 lookup something-else

If using the default routing table, this server would use A1 as its
source address; on the other hand, with the special routing table,
it would use A2 as its source address.

Now, if a packet for A0 from A3 arrives but is too large to fit the MTU
of the tun device, an ICMP message from A1 to A3 that says something
like A0 is unreachable, MTU X is exceeded, and is sent with the default
routing table. The problem is, of course, A0 is only meaningful within the
network connected with the special routing table, the network connected
with the default routing table knows nothing about A0, and this ICMP
message is thus useless.

What I wanna achieve is to send this ICMP message with the same content,
but from A2 to A3 (instead of A1 to A3), and with the special routing
table (instead of the default one).

Is this possible? Or, are there better ways to handle this kind of
situation?

             reply	other threads:[~2022-02-07  1:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  1:58 yb [this message]
2022-02-07 17:29 ` Policy routing and ICMP MTU message Grant Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YgB8uv0vU320uawp@rslinux.fun \
    --to=yb@rslinux.fun \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox