BusyBox ifconfig doesn't like the "inet" argument.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@518 315857ad-0bdb-0310-b42e-dec37551a5f0
Add support for OpenWrt DNS management

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@519 315857ad-0bdb-0310-b42e-dec37551a5f0
Add script hooks

This is based loosely in concept on the Debian patch, and is also needed for
OpenWrt unless we want to add a bunch of OpenWrt-specific stuff in here too.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@520 315857ad-0bdb-0310-b42e-dec37551a5f0
Add COPYING file and clarify licences

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@521 315857ad-0bdb-0310-b42e-dec37551a5f0
Use /32 for netmask to iproute, not /255.255.255.255

Older versions of iproute (e.g. 2.6.18-7 on RHEL5.2) can't cope with seeing
/255.255.255.255.

Thanks to Andrew Daviel for pointing it out.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@522 315857ad-0bdb-0310-b42e-dec37551a5f0
redirect stderr from which (not grep) to /dev/null

Signed-off-by: Stuart Henderson <sthen@openbsd.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@523 315857ad-0bdb-0310-b42e-dec37551a5f0
handle creating/destroying the tun device on OpenBSD

Signed-off-by: Stuart Henderson <sthen@openbsd.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@524 315857ad-0bdb-0310-b42e-dec37551a5f0
Fix various issues on FreeBSD

- duplicate creation of tun devices
- cleanup of created tun device
- deadlock of vpnc holding an open file descriptor on /dev/tunN
- properly restoring /etc/resolv.conf

Signed-off-by: Emanuel Haupt <ehaupt@FreeBSD.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@525 315857ad-0bdb-0310-b42e-dec37551a5f0
vpnc-script: document "reason=reconnect"

After recent modification, a new value can be passed through
environment variable "reason".
Add it in comment header.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@526 315857ad-0bdb-0310-b42e-dec37551a5f0
cisco: handle t.attributes.type=0x0015

Issues with XAUTH and 2-factor authentication (Username/Password and
SecureID) and how I got mine working.

On Cisco 1941 with hybrid xauth.

I was having issues connecting to my work's Cisco VPN.
I would see the message:

> Enter a response from your token with serial number XXXXXXXXXX.

followed by:

> vpnc: xauth packet unsupported: (ISAKMP_N_ATTRIBUTES_NOT_SUPPORTED)(13)

without any prompting. Hard failure. This was happening after the
username/password prompt, during authentication phase. With --debug 99
set, I saw what the problem was:
   PARSING PAYLOAD type: 0e (ISAKMP_PAYLOAD_MODECFG_ATTR)
   next_type: 00 (ISAKMP_PAYLOAD_NONE)
   length: 0053
   modecfg.type: 01 (ISAKMP_MODECFG_CFG_REQUEST)
[...]
   t.attributes.type: 0015 (unknown)
   t.attributes.u.attr_16: 0002
   DONE PARSING PAYLOAD type: 0e (ISAKMP_PAYLOAD_MODECFG_ATTR)

t.attributes.type 0x0015? Surely that has a defined value somewhere! I
googled high-and-low, I tried the vpnc-nortel branch because it had an
enum value for that, I did everything I could think of but I could not
get past this phase until I finally said fuck it and made the
following change (to echo the attribute and value back to the server)

And it worked. What is attribute type 21(0x15)? Does anyone have any
insight? Apparently my job's VPN was pleased, and currently that's
good enough for me.
Dan Motles

This attribute 0x0015 is already used in Nortel branch
	= ISAKMP_XAUTH_02_ATTRIB_NEXT_PIN.
The patch in Nortel branch to handle this case is a little more complex.
Antonio Borneo

Signed-off-by: Daniel Motles <seltom.dan@gmail.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>

git-svn-id: http://svn.unix-ag.uni-kl.de/vpnc/trunk@527 315857ad-0bdb-0310-b42e-dec37551a5f0