netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hirofumi@mail.parknet.co.jp
Cc: netdev@vger.kernel.org
Subject: Re: problem of "ipv4: revert Set rt->rt_iif more sanely on output routes."
Date: Wed, 06 Apr 2011 13:28:29 -0700 (PDT)	[thread overview]
Message-ID: <20110406.132829.116375350.davem@davemloft.net> (raw)
In-Reply-To: <87oc4kj1bt.fsf@devron.myhome.or.jp>

From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Date: Tue, 05 Apr 2011 22:05:10 +0900

> ipv4: Set rt->rt_iif more sanely on output routes.
> (1018b5c01636c7c6bda31a719bda34fc631db29a)
> 
> The above patch seems to be caused of avahi breakage.
> 
> I'm not debugging fully though, avahi is using IP_PKTINFO and checking
> in_pktinfo->ipi_ifindex > 0.
> 
> And if I reverted above patch, it seems to fix avahi's IP_PKTINFO problem.

in_pktinfo is given to the application only during recvmsg() calls, the
call chain is (for example):

udp_recvmsg()
	--> ip_cmsg_recv()
		--> ip_cmsg_recv_pktinfo()

Therefore we will only be working with receive packets, whose routes are
computed using ip_route_input*() which will fill in the rt_iif field
appropriately.

The only exception to this would be packets which are looped back, in
which case the cached output route attached to the packet will be used.

Your RFC patch should work, but we're trying to make "struct rtable"
smaller rather than larger.

In what way does routing break if you simply restore the original
rt_iif assignment in output route creation?  That's the most preferred
fix for this.

  parent reply	other threads:[~2011-04-06 20:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 13:05 problem of "ipv4: revert Set rt->rt_iif more sanely on output routes." OGAWA Hirofumi
2011-04-05 14:11 ` OGAWA Hirofumi
2011-04-05 14:57   ` OGAWA Hirofumi
2011-04-06 20:28 ` David Miller [this message]
2011-04-07  4:31   ` OGAWA Hirofumi
2011-04-07  5:34     ` David Miller
2011-04-07  5:42       ` David Miller
2011-04-07  7:19         ` OGAWA Hirofumi
2011-04-07  8:29           ` OGAWA Hirofumi
2011-04-07  8:32             ` OGAWA Hirofumi
2011-04-07 20:58               ` David Miller
2011-04-07 21:03             ` David Miller

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=20110406.132829.116375350.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).