netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: David Miller <davem@davemloft.net>
Cc: jsbronder@gentoo.org, netdev@vger.kernel.org, shemminger@vyatta.com
Subject: Re: vpnc-script fix for changed iproute output with newer kernels
Date: Fri, 29 Jul 2011 13:57:03 +0100	[thread overview]
Message-ID: <1311944244.17528.76.camel@i7.infradead.org> (raw)
In-Reply-To: <20110729.054649.1274733167127164255.davem@davemloft.net>

On Fri, 2011-07-29 at 05:46 -0700, David Miller wrote:
> From: David Woodhouse <dwmw2@infradead.org>
> Date: Fri, 29 Jul 2011 13:33:11 +0100
> 
> > Any suggestions that *aren't* going to be constantly broken?
> 
> You're going to have to be knowledgable about which attributes are
> part of the route, whether you want to do this with iproute2 as a tool
> or whether you do this directly with C code using netlink.

I don't think I really want to try shipping vpnc-script with C code.

The 'opt-in' approach seems like the best one for now, then. I suppose
we want just the 'via' and 'dev' and 'src' attributes... anything else?

I'll see if I can come up with a regex that can parse that, in the
knowledge that the interface itself might actually be called "src" or
"dev" or "via".

This may make my brain hurt.

> iproute2 is never going to allow you to mirror "route get" outputs
> into a "route add" call.  Because 'get' is going to always emit
> metrics and other transient state, upon which we will always
> potentially be buidling new items over time.

An option to make 'ip route get' do exactly that would be massively
appreciated :)

Or an option to make 'ip route set' ignore the ones it doesn't like,
perhaps.

-- 
dwmw2


  reply	other threads:[~2011-07-29 12:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110728021227.GA3620@gmail.com>
     [not found] ` <20110728021853.GB3620@gmail.com>
2011-07-29 12:33   ` vpnc-script fix for changed iproute output with newer kernels David Woodhouse
2011-07-29 12:46     ` David Miller
2011-07-29 12:57       ` David Woodhouse [this message]
2011-07-29 21:26         ` David Woodhouse

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=1311944244.17528.76.camel@i7.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=davem@davemloft.net \
    --cc=jsbronder@gentoo.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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).