From: Patrick McHardy <kaber@trash.net>
To: Michal Schmidt <mschmidt@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Marcela Maslanova <mmaslano@redhat.com>
Subject: Re: [PATCH] IPIP: Allow rebinding the tunnel to another interface
Date: Wed, 12 Dec 2007 17:00:14 +0100 [thread overview]
Message-ID: <4760058E.5080403@trash.net> (raw)
In-Reply-To: <20071212163451.498b5726@brian.englab.brq.redhat.com>
Michal Schmidt wrote:
> +static void ipip_tunnel_bind_dev(struct net_device *dev)
> +{
...
> + dev->iflink = tunnel->parms.link;
> +}
> +
> static int
> ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
> {
> @@ -723,6 +757,10 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
> t->parms.iph.ttl = p.iph.ttl;
> t->parms.iph.tos = p.iph.tos;
> t->parms.iph.frag_off = p.iph.frag_off;
> + if (t->parms.link != p.link) {
> + t->parms.link = p.link;
> + ipip_tunnel_bind_dev(dev);
> + }
If you change dev->iflink this should trigger a rtnetlink
notification.
next prev parent reply other threads:[~2007-12-12 16:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 15:34 [PATCH] IPIP: Allow rebinding the tunnel to another interface Michal Schmidt
2007-12-12 16:00 ` Patrick McHardy [this message]
2007-12-12 16:29 ` Michal Schmidt
2007-12-12 16:33 ` Patrick McHardy
2007-12-12 19:02 ` 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=4760058E.5080403@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=mmaslano@redhat.com \
--cc=mschmidt@redhat.com \
--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).